diff --git a/manifest.json b/manifest.json index 63165a28..4bde8066 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "meta": { "name": "PoE Overlay", "author": "Kyusung4698", - "version": "1.0.7", + "version": "1.0.8", "minimum-overwolf-version": "0.147.0", "description": "Search the market and send trade offers. Get current market values for your item. View insights for maps and items.", "dock_button_title": "PoE Overlay", diff --git a/overlay.babel b/overlay.babel index e5f37aae..7be3ca94 100644 --- a/overlay.babel +++ b/overlay.babel @@ -130,7 +130,7 @@ - changelog-1-0-7 + changelog-1-0-8 message diff --git a/package.json b/package.json index 4258c970..90bc55ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "poe-overlay-overwolf", - "version": "1.0.7", + "version": "1.0.8", "scripts": { "watch": "ng build --watch", "watch:prod": "ng build --watch --prod", diff --git a/src/app/app-error-handler.ts b/src/app/app-error-handler.ts index 1a67499c..f0b87f0a 100644 --- a/src/app/app-error-handler.ts +++ b/src/app/app-error-handler.ts @@ -7,7 +7,7 @@ export class AppErrorHandler implements ErrorHandler { StackTrace.fromError(error).then(stackframes => { const message = error.message ?? error; const stack = stackframes.splice(0, 20).map(x => x.toString()).join('\n'); - console.error('An unexpected application error occured.', JSON.stringify({ message, stack })); + console.error(`An unexpected application error occured. ${JSON.stringify({ message, stack })}`); }); throw error; } diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 0ea33acf..dfce405c 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -47,7 +47,7 @@ export class AppComponent implements OnInit, OnDestroy { flatMap(() => OWWindows.getCurrentWindow()), retryWhen(errors => errors.pipe( flatMap(error => { - console.warn(`An unexpected error occured while loading PoE Overlay. ${error.message ?? JSON.stringify(error)}`); + console.warn(`An unexpected error occured while loading PoE Overlay. ${error?.message ?? JSON.stringify(error)}`); return OWWindows.displayMessageBox({ message_title: 'PoE Overlay could not be loaded.', message_body: 'An unexpected error occured while loading PoE Overlay.\n' + diff --git a/src/app/core/annotation/annotation.service.ts b/src/app/core/annotation/annotation.service.ts index 4ea0414f..4bd3ae30 100644 --- a/src/app/core/annotation/annotation.service.ts +++ b/src/app/core/annotation/annotation.service.ts @@ -95,7 +95,7 @@ const ANNOTATIONS: Annotation[] = [ hotkey: Hotkey.SettingsToggle }, { id: 'thanks' }, - { id: 'changelog-1-0-7' }, + { id: 'changelog-1-0-8' }, ]; @Injectable({ diff --git a/src/app/core/odk/ow-audio.ts b/src/app/core/odk/ow-audio.ts index 0d234867..509764e0 100644 --- a/src/app/core/odk/ow-audio.ts +++ b/src/app/core/odk/ow-audio.ts @@ -5,7 +5,6 @@ export class OWAudio { public static create(url: string): Observable { const promise = new Promise((resolve, reject) => { overwolf.media.audio.create(url, result => { - console.log(result); if (result.success) { resolve(result.id); } else { @@ -19,7 +18,6 @@ export class OWAudio { public static play(id: string): Observable { const promise = new Promise((resolve, reject) => { overwolf.media.audio.play(id, result => { - console.log(result); if (result.success) { resolve(); } else { @@ -33,7 +31,6 @@ export class OWAudio { public static stop(id: string): Observable { const promise = new Promise((resolve, reject) => { overwolf.media.audio.stopById(id, result => { - console.log(result); if (result.success) { resolve(); } else { @@ -47,7 +44,6 @@ export class OWAudio { public static resume(id: string): Observable { const promise = new Promise((resolve, reject) => { overwolf.media.audio.resumeById(id, result => { - console.log(result); if (result.success) { resolve(); } else { @@ -61,7 +57,6 @@ export class OWAudio { public static setVolume(volume: number): Observable { const promise = new Promise((resolve, reject) => { overwolf.media.audio.setVolume(volume, result => { - console.log(result); if (result.success) { resolve(); } else { diff --git a/src/app/core/odk/ow-games-events-listener.ts b/src/app/core/odk/ow-games-events-listener.ts index e463038d..961cd729 100644 --- a/src/app/core/odk/ow-games-events-listener.ts +++ b/src/app/core/odk/ow-games-events-listener.ts @@ -45,7 +45,7 @@ export class OWGamesEventsListener { )), map(features => !!features?.length), catchError(error => { - console.error(`Could not set required features.`, this.requiredFeatures, error); + console.error(`Could not set required features: ${JSON.stringify(this.requiredFeatures)}, error: ${error?.message ?? JSON.stringify(error)}`); return of(false); }) ); diff --git a/src/app/core/odk/ow-replay.ts b/src/app/core/odk/ow-replay.ts index c794fb9a..3e60c9eb 100644 --- a/src/app/core/odk/ow-replay.ts +++ b/src/app/core/odk/ow-replay.ts @@ -30,7 +30,6 @@ export class OWReplay { public static getHighlightsFeatures(gameId: number): Observable { const promise = new Promise((resolve, reject) => { overwolf.media.replays.getHighlightsFeatures(gameId, result => { - console.log(result); if (result.success) { resolve(); } else { @@ -44,14 +43,12 @@ export class OWReplay { public static capture(pastDuration: number, futureDuration: number): Observable { const promise = new Promise((resolve, reject) => { overwolf.media.replays.capture(pastDuration, futureDuration, result => { - console.log('finished', result); if (result.success) { resolve(result.url); } else { reject(result.error); } }, result => { - console.log('called', result, pastDuration, futureDuration); if (!result.success) { reject(result); } diff --git a/src/app/layout/service/launcher-window.service.ts b/src/app/layout/service/launcher-window.service.ts index 43571e27..55569f33 100644 --- a/src/app/layout/service/launcher-window.service.ts +++ b/src/app/layout/service/launcher-window.service.ts @@ -26,7 +26,7 @@ export class LauncherWindowService { if (monitor) { const [x, y] = monitor.Location.split(',').map(loc => +loc.trim()); const [width, height] = monitor.Resolution.split(',').map(res => +res.trim()); - console.log('monitor', x, y, width, height); + console.log(`monitor x: ${x}, y: ${y}, w: ${width}, h: ${height}`, x, y, width, height); const left = x + (width / 2) - (WIN_WIDTH / 2); const top = y + (height / 2) - (WIN_HEIGHT / 2); diff --git a/src/app/layout/window/background-window/background-window.component.ts b/src/app/layout/window/background-window/background-window.component.ts index 76d5f59f..2f4f0835 100644 --- a/src/app/layout/window/background-window/background-window.component.ts +++ b/src/app/layout/window/background-window/background-window.component.ts @@ -247,6 +247,6 @@ export class BackgroundWindowComponent implements OnInit, OnDestroy { } public onLogError(error: string): void { - console.error('An unexpected error occured while listening to the Client.txt file.', error); + console.error(`An unexpected error occured while listening to the Client.txt file. ${error}`, error); } } diff --git a/src/app/modules/commands/commands.module.ts b/src/app/modules/commands/commands.module.ts index 622a6a90..47032409 100644 --- a/src/app/modules/commands/commands.module.ts +++ b/src/app/modules/commands/commands.module.ts @@ -82,7 +82,7 @@ export class CommandsModule implements FeatureModule { const { text } = settings.commands[index - 1]; if (text?.length) { this.command.execute(text, settings).subscribe(() => { }, error => { - console.warn(`Could not execute command.`, error, text); + console.warn(`Could not execute command: ${text}, ${error?.message ?? JSON.stringify(error)}`, error, text); this.notification.show('commands.execute-error'); }); } diff --git a/src/app/modules/replay/replay.module.ts b/src/app/modules/replay/replay.module.ts index 523d06f4..022710c1 100644 --- a/src/app/modules/replay/replay.module.ts +++ b/src/app/modules/replay/replay.module.ts @@ -68,7 +68,7 @@ export class ReplayModule implements FeatureModule { settings.replayCaptureManuallyPastDuration, settings.replayCaptureManuallyFutureDuration ).subscribe(() => { }, error => { - console.warn('Could not capture a manually triggered event.', error); + console.warn(`Could not capture a manually triggered event. ${error?.message ?? JSON.stringify(error)}`, error); this.notification.show('replay.capture-error'); }); } @@ -84,7 +84,7 @@ export class ReplayModule implements FeatureModule { settings.replayCaptureDeathPastDuration, settings.replayCaptureDeathFutureDuration ).subscribe(() => { }, error => { - console.warn('Could not capture the death event.', event, error); + console.warn(`Could not capture the death event. ${error?.message ?? JSON.stringify(error)}`, event, error); this.notification.show('replay.capture-error'); }); } @@ -95,7 +95,7 @@ export class ReplayModule implements FeatureModule { settings.replayCaptureKillPastDuration, settings.replayCaptureKillFutureDuration ).subscribe(() => { }, error => { - console.warn('Could not capture the kill event.', event, error); + console.warn(`Could not capture the kill event. ${error?.message ?? JSON.stringify(error)}`, event, error); this.notification.show('replay.capture-error'); }); } @@ -128,7 +128,7 @@ export class ReplayModule implements FeatureModule { this.notification.show('replay.started'); } }, error => { - console.warn('Could not start the replay capturing.', error); + console.warn(`Could not start the replay capturing. ${error?.message ?? JSON.stringify(error)}`, error); this.notification.show('replay.start-error'); }); } @@ -139,7 +139,7 @@ export class ReplayModule implements FeatureModule { this.notification.show('replay.stopped'); } }, error => { - console.warn('Could not stop the replay capturing.', error); + console.warn(`Could not stop the replay capturing. ${error?.message ?? JSON.stringify(error)}`, error); this.notification.show('replay.stop-error'); }); } diff --git a/src/app/modules/trade/component/trade-message/trade-message.component.ts b/src/app/modules/trade/component/trade-message/trade-message.component.ts index b427e8b1..a4a8289d 100644 --- a/src/app/modules/trade/component/trade-message/trade-message.component.ts +++ b/src/app/modules/trade/component/trade-message/trade-message.component.ts @@ -196,7 +196,7 @@ export class TradeMessageComponent implements OnInit { return throwError('character name was not set.'); }) ).subscribe(name => this.chat.kick(name), error => { - console.warn(`Could not kick character.`, error); + console.warn(`Could not kick character. ${error?.message ?? JSON.stringify(error)}`, error); this.notification.show('trade.kick-error'); }); } else { diff --git a/src/app/shared/module/odk/component/header/header.component.scss b/src/app/shared/module/odk/component/header/header.component.scss index 8d693fe2..8d8f07d1 100644 --- a/src/app/shared/module/odk/component/header/header.component.scss +++ b/src/app/shared/module/odk/component/header/header.component.scss @@ -133,14 +133,14 @@ $border-color: #1a1a1a; padding: $header-size 0 0 0; &.has-footer { - padding: $header-size 0 $footer-size 0; + padding: $header-size 0 $footer-size - 1px 0; } &.reverse { padding: 0 0 $header-size 0; &.has-footer { - padding: $footer-size 0 $header-size 0; + padding: $footer-size 0 $header-size - 1px 0; } } } diff --git a/src/app/shared/module/poe/item/frame/item-frame/item-frame.component.scss b/src/app/shared/module/poe/item/frame/item-frame/item-frame.component.scss index 4e6c7992..d270febb 100644 --- a/src/app/shared/module/poe/item/frame/item-frame/item-frame.component.scss +++ b/src/app/shared/module/poe/item/frame/item-frame/item-frame.component.scss @@ -6,13 +6,11 @@ text-align: center; font-style: 14.3px; font-family: FontinSmallCaps; - display: inline-block; .detail { position: relative; padding: 2px; min-width: 396px; - // min-height: 115px; white-space: pre; } } diff --git a/src/app/shared/module/poe/trade/chat/trade-chat-parser.service.spec.ts b/src/app/shared/module/poe/trade/chat/trade-chat-parser.service.spec.ts index b3597680..9978b779 100644 --- a/src/app/shared/module/poe/trade/chat/trade-chat-parser.service.spec.ts +++ b/src/app/shared/module/poe/trade/chat/trade-chat-parser.service.spec.ts @@ -32,7 +32,6 @@ fdescribe('TradeChatParserService', () => { logs.forEach(log => { it(`should not get result for log: '${log.slice(0, 30)}'`, () => { const result = sut.parse(log); - console.log(JSON.stringify(result, undefined, 2)); expect(result.type !== TradeParserType.Ignored).toBeTruthy(); }); }); diff --git a/src/app/shared/module/poe/trade/fetch/trade-fetch-item.pipe.ts b/src/app/shared/module/poe/trade/fetch/trade-fetch-item.pipe.ts index 10727e3e..709b72f7 100644 --- a/src/app/shared/module/poe/trade/fetch/trade-fetch-item.pipe.ts +++ b/src/app/shared/module/poe/trade/fetch/trade-fetch-item.pipe.ts @@ -14,6 +14,9 @@ export class TradeFetchItemPipe implements PipeTransform { private readonly processor: ItemProcessorService) { } public transform(fetchItem: TradeFetchEntryItem): Item { + if (!fetchItem) { + return null; + } const item = this.parser.parse(fetchItem.text, null, fetchItem.hashes.reduce((filter, key) => { filter[key] = true; diff --git a/src/app/shared/module/poe/trade/fetch/trade-fetch.service.ts b/src/app/shared/module/poe/trade/fetch/trade-fetch.service.ts index 505e96d5..19e547b2 100644 --- a/src/app/shared/module/poe/trade/fetch/trade-fetch.service.ts +++ b/src/app/shared/module/poe/trade/fetch/trade-fetch.service.ts @@ -74,68 +74,68 @@ export class TradeFetchService { private map(results: TradeFetchHttpResult[], url: string, total: number, checkExchange: boolean): TradeFetchResponse { const entries = results.filter(result => { if (!result?.listing) { - console.log(`Listing was null or undefined.`, result); + console.log(`Listing was null or undefined. ${JSON.stringify(result)}`, result); return false; } if (!moment(result.listing.indexed).isValid()) { - console.log(`Indexed was not a valid date.`, result); + console.log(`Indexed was not a valid date. ${JSON.stringify(result)}`, result); return false; } if (!result.listing.account?.name?.length) { - console.log(`Account name was empty or undefined.`, result); + console.log(`Account name was empty or undefined. ${JSON.stringify(result)}`, result); return false; } const { price } = result.listing; if (!price) { - console.log(`Price was null or undefined.`, result); + console.log(`Price was null or undefined. ${JSON.stringify(result)}`, result); return false; } if (checkExchange) { const { exchange } = price; if (!exchange) { - console.log(`Price exchange was null or undefined.`, result); + console.log(`Price exchange was null or undefined. ${JSON.stringify(result)}`, result); return false; } if (!exchange.currency?.length) { - console.log(`Price exchange currency was empty or undefined.`, result); + console.log(`Price exchange currency was empty or undefined. ${JSON.stringify(result)}`, result); return false; } if (exchange.amount === null || exchange.amount === undefined || exchange.amount === 0) { - console.log(`Price exchange amount was null or undefined or zero.`, result); + console.log(`Price exchange amount was null or undefined or zero. ${JSON.stringify(result)}`, result); return false; } const { item } = price; if (!item) { - console.log(`Price item was null or undefined.`, result); + console.log(`Price item was null or undefined. ${JSON.stringify(result)}`, result); return false; } if (!item.currency?.length) { - console.log(`Price item currency was empty or undefined.`, result); + console.log(`Price item currency was empty or undefined. ${JSON.stringify(result)}`, result); return false; } if (item.amount === null || item.amount === undefined || item.amount <= 0) { - console.log(`Price item amount was null or undefined or zero.`, result); + console.log(`Price item amount was null or undefined or zero. ${JSON.stringify(result)}`, result); return false; } if (item.stock === null || item.stock === undefined || item.stock <= 0) { - console.log(`Price item stock was null or undefined or zero.`, result); + console.log(`Price item stock was null or undefined or zero. ${JSON.stringify(result)}`, result); return false; } } else { if (price.amount === null || price.amount === undefined || price.amount <= 0) { - console.log(`Price amount was null or undefined or zero.`, result); + console.log(`Price amount was null or undefined or zero. ${JSON.stringify(result)}`, result); return false; } if (!price.currency?.length) { - console.log(`Price currency was empty or undefined.`, result); + console.log(`Price currency was empty or undefined. ${JSON.stringify(result)}`, result); return false; } } if (!result.item?.icon?.length) { - console.log(`Item icon was empty or undefined.`, result); + console.log(`Item icon was empty or undefined. ${JSON.stringify(result)}`, result); return false; } return true; diff --git a/src/assets/i18n/english.json b/src/assets/i18n/english.json index 60bf8a55..132d8e02 100644 --- a/src/assets/i18n/english.json +++ b/src/assets/i18n/english.json @@ -4,9 +4,9 @@ "message": "Opens a webpage on hotkey press in the in-game browser.\n\nTry the hotkey below to open poe.ninja.", "title": "Bookmarks" }, - "changelog-1-0-7": { - "message": "- added the version number at the evaluate, inspect and settings window\n- update trade action still interested to be always shown for incoming requests\n- update the market history to only show unique requests\n- fixed an focus issue occurring when using the trade whisper button\n- fixed an issue accessing the clipboard\n- fixed an issue querying the map tier", - "title": "What's new in 1.0.7?" + "changelog-1-0-8": { + "message": "- added support for the new cluster jewels stats\n- added a new hotkey (default on F10) to manually capture replays\n- added a toggle to disable the leaving of a party via kick using the trade finished action\n- added a audio button at the trade settings to customize the notification sound\n- added a lower opacity for market results once they have been requested\n- added the seller name for items and bulk exchanges at the market\n- fixed an issue at the market type filter resulting in a unknown category error", + "title": "What's new in 1.0.8?" }, "commands": { "message": "All game commands can be bound to hotkeys.\n\nThere are also placeholders like @char available which will be replaced before executing the command.\n\nTry the hotkey below to teleport into your hideout.", diff --git a/src/main.ts b/src/main.ts index 1c889e2c..13cc8977 100644 --- a/src/main.ts +++ b/src/main.ts @@ -9,4 +9,4 @@ if (environment.production) { } platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error('An unexpected error occured while bootstrapping the AppModule.', err.message ?? JSON.stringify(err))); + .catch(err => console.error(`An unexpected error occured while bootstrapping the AppModule. ${err?.message ?? JSON.stringify(err)}`));