Skip to content

Commit

Permalink
- 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyusung4698 committed Jul 9, 2020
1 parent 0d572bd commit 070e85c
Show file tree
Hide file tree
Showing 21 changed files with 39 additions and 47 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion overlay.babel
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
</children>
</folder_node>
<folder_node>
<name>changelog-1-0-7</name>
<name>changelog-1-0-8</name>
<children>
<concept_node>
<name>message</name>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/app/app-error-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' +
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/annotation/annotation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const ANNOTATIONS: Annotation[] = [
hotkey: Hotkey.SettingsToggle
},
{ id: 'thanks' },
{ id: 'changelog-1-0-7' },
{ id: 'changelog-1-0-8' },
];

@Injectable({
Expand Down
5 changes: 0 additions & 5 deletions src/app/core/odk/ow-audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export class OWAudio {
public static create(url: string): Observable<string> {
const promise = new Promise<string>((resolve, reject) => {
overwolf.media.audio.create(url, result => {
console.log(result);
if (result.success) {
resolve(result.id);
} else {
Expand All @@ -19,7 +18,6 @@ export class OWAudio {
public static play(id: string): Observable<void> {
const promise = new Promise<void>((resolve, reject) => {
overwolf.media.audio.play(id, result => {
console.log(result);
if (result.success) {
resolve();
} else {
Expand All @@ -33,7 +31,6 @@ export class OWAudio {
public static stop(id: string): Observable<void> {
const promise = new Promise<void>((resolve, reject) => {
overwolf.media.audio.stopById(id, result => {
console.log(result);
if (result.success) {
resolve();
} else {
Expand All @@ -47,7 +44,6 @@ export class OWAudio {
public static resume(id: string): Observable<void> {
const promise = new Promise<void>((resolve, reject) => {
overwolf.media.audio.resumeById(id, result => {
console.log(result);
if (result.success) {
resolve();
} else {
Expand All @@ -61,7 +57,6 @@ export class OWAudio {
public static setVolume(volume: number): Observable<void> {
const promise = new Promise<void>((resolve, reject) => {
overwolf.media.audio.setVolume(volume, result => {
console.log(result);
if (result.success) {
resolve();
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/odk/ow-games-events-listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})
);
Expand Down
3 changes: 0 additions & 3 deletions src/app/core/odk/ow-replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export class OWReplay {
public static getHighlightsFeatures(gameId: number): Observable<void> {
const promise = new Promise<void>((resolve, reject) => {
overwolf.media.replays.getHighlightsFeatures(gameId, result => {
console.log(result);
if (result.success) {
resolve();
} else {
Expand All @@ -44,14 +43,12 @@ export class OWReplay {
public static capture(pastDuration: number, futureDuration: number): Observable<string> {
const promise = new Promise<string>((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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout/service/launcher-window.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/app/modules/commands/commands.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class CommandsModule implements FeatureModule<CommandsFeatureSettings> {
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');
});
}
Expand Down
10 changes: 5 additions & 5 deletions src/app/modules/replay/replay.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class ReplayModule implements FeatureModule<ReplayFeatureSettings> {
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');
});
}
Expand All @@ -84,7 +84,7 @@ export class ReplayModule implements FeatureModule<ReplayFeatureSettings> {
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');
});
}
Expand All @@ -95,7 +95,7 @@ export class ReplayModule implements FeatureModule<ReplayFeatureSettings> {
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');
});
}
Expand Down Expand Up @@ -128,7 +128,7 @@ export class ReplayModule implements FeatureModule<ReplayFeatureSettings> {
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');
});
}
Expand All @@ -139,7 +139,7 @@ export class ReplayModule implements FeatureModule<ReplayFeatureSettings> {
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');
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
28 changes: 14 additions & 14 deletions src/app/shared/module/poe/trade/fetch/trade-fetch.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/assets/i18n/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`));

0 comments on commit 070e85c

Please sign in to comment.