keyboard_arrow_down
diff --git a/src/app/modules/trade/window/trade-window/trade-window.component.ts b/src/app/modules/trade/window/trade-window/trade-window.component.ts
index 3c779af6..d9495fbd 100644
--- a/src/app/modules/trade/window/trade-window/trade-window.component.ts
+++ b/src/app/modules/trade/window/trade-window/trade-window.component.ts
@@ -1,6 +1,7 @@
import { ChangeDetectionStrategy, Component, NgZone, OnDestroy, OnInit } from '@angular/core';
import { EventSubscription } from '@app/event';
import { FeatureSettingsService } from '@app/feature/feature-settings.service';
+import { SettingsWindowService } from '@layout/service';
import { TradeWindowData, TradeWindowService } from '@modules/trade/service';
import { TradeFeatureSettings } from '@modules/trade/trade-feature-settings';
import { TradeExchangeMessage } from '@shared/module/poe/trade/chat';
@@ -21,7 +22,8 @@ export class TradeWindowComponent implements OnInit, OnDestroy {
constructor(
private readonly window: TradeWindowService,
private readonly ngZone: NgZone,
- private readonly settings: FeatureSettingsService) { }
+ private readonly settings: FeatureSettingsService,
+ private readonly settingsWindow: SettingsWindowService) { }
public ngOnInit(): void {
this.data$.next(this.window.data$.get());
@@ -45,4 +47,8 @@ export class TradeWindowComponent implements OnInit, OnDestroy {
settings.tradeWindowPinned = pinned
).subscribe();
}
+
+ public onSettingsToggle(): void {
+ this.settingsWindow.toggle('trade.name').subscribe();
+ }
}
diff --git a/src/app/shared/module/odk/component/header/header.component.html b/src/app/shared/module/odk/component/header/header.component.html
index 9b86af77..c28bf79d 100644
--- a/src/app/shared/module/odk/component/header/header.component.html
+++ b/src/app/shared/module/odk/component/header/header.component.html
@@ -8,6 +8,8 @@
close
push_pin
+ settings
+
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 0d5423fa..faf2c1cb 100644
--- a/src/app/shared/module/odk/component/header/header.component.scss
+++ b/src/app/shared/module/odk/component/header/header.component.scss
@@ -14,6 +14,10 @@ $border-color: #1a1a1a;
width: $icon-size;
font-size: $icon-size;
line-height: $icon-size;
+
+ & + .mat-icon{
+ margin-left: 3px;
+ }
}
}
}
@@ -48,12 +52,15 @@ $border-color: #1a1a1a;
left: 10px;
}
+ .settings,
.pin {
height: $icon-size - 3px;
width: $icon-size - 3px;
font-size: $icon-size - 3px;
line-height: $icon-size - 3px;
+ }
+ .pin {
will-change: transform, top;
transition: transform ease-in-out 200ms, top ease-in 100ms;
diff --git a/src/app/shared/module/odk/component/header/header.component.ts b/src/app/shared/module/odk/component/header/header.component.ts
index 47b355ea..040b2803 100644
--- a/src/app/shared/module/odk/component/header/header.component.ts
+++ b/src/app/shared/module/odk/component/header/header.component.ts
@@ -40,6 +40,9 @@ export class HeaderComponent implements OnInit {
@Input()
public margin: number;
+ @Output()
+ public settingsToggle = new EventEmitter();
+
public ngOnInit(): void {
this.obtained$ = this.window.assureObtained()
.pipe(
@@ -68,4 +71,9 @@ export class HeaderComponent implements OnInit {
this.pinned = !this.pinned;
this.pinnedChange.next(this.pinned);
}
+
+ public onSettings(event: MouseEvent): void {
+ event.preventDefault();
+ this.settingsToggle.next();
+ }
}
diff --git a/src/app/shared/module/poe/context/context.factory.ts b/src/app/shared/module/poe/context/context.factory.ts
index 691f7c7e..1d30b487 100644
--- a/src/app/shared/module/poe/context/context.factory.ts
+++ b/src/app/shared/module/poe/context/context.factory.ts
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
-import { Observable } from 'rxjs';
-import { map } from 'rxjs/operators';
+import { Observable, of } from 'rxjs';
+import { catchError, map } from 'rxjs/operators';
import { TradeLeaguesProvider } from '../trade/leagues/trade-leagues.provider';
import { Context } from './context';
@@ -12,6 +12,13 @@ export class ContextFactory {
public create(context: Context): Observable {
return this.leaguesProvider.provide(context.language).pipe(
+ catchError(error => {
+ console.error(`Could not establish a connection to the GGG API: ${error?.message ?? JSON.stringify(error)}`);
+ return of([
+ { id: 'Standard', text: 'Standard' },
+ { id: 'Hardcore', text: 'Hardcore' }
+ ]);
+ }),
map(leagues => {
const result: Context = {
...context,
diff --git a/src/app/shared/module/poe/stash/stash.service.ts b/src/app/shared/module/poe/stash/stash.service.ts
index 3fdd8805..8440a6c5 100644
--- a/src/app/shared/module/poe/stash/stash.service.ts
+++ b/src/app/shared/module/poe/stash/stash.service.ts
@@ -1,13 +1,44 @@
import { Injectable } from '@angular/core';
import { OWUtils } from '@app/odk/ow-utils';
+import { Subject } from 'rxjs';
+import { delay, mergeMap, tap } from 'rxjs/operators';
import { StashPriceTag } from './stash-price-tag';
+interface HighlightEvent {
+ term: string;
+}
+
@Injectable({
providedIn: 'root'
})
export class StashService {
+ private readonly queue$ = new Subject();
+
+ constructor() {
+ this.init();
+ }
+
public copyPrice(tag: StashPriceTag): void {
const content = `${tag.type} ${(tag.count ? `${tag.amount}/${tag.count}` : tag.amount)} ${tag.currency}`;
OWUtils.placeOnClipboard(content);
}
+
+ public highlight(term: string): void {
+ this.queue$.next({ term });
+ }
+
+ private init(): void {
+ this.queue$.pipe(
+ mergeMap(event => OWUtils.getFromClipboard().pipe(
+ tap(() => OWUtils.placeOnClipboard(event.term)),
+ delay(10),
+ tap(() => OWUtils.sendKeyStroke('Ctrl+F')),
+ delay(175),
+ tap(() => OWUtils.sendKeyStroke('Ctrl+V')),
+ delay(75),
+ tap(text => OWUtils.placeOnClipboard(text)),
+ delay(10),
+ ), 1)
+ ).subscribe();
+ }
}
diff --git a/src/assets/i18n/english.json b/src/assets/i18n/english.json
index 7583e224..2e5892ba 100644
--- a/src/assets/i18n/english.json
+++ b/src/assets/i18n/english.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "Highlight",
+ "highlight": "Stash Highlight",
"name": "Misc",
"navigation": "Navigation",
"navigations": {
diff --git a/src/assets/i18n/french.json b/src/assets/i18n/french.json
index 25072e83..8c38213c 100644
--- a/src/assets/i18n/french.json
+++ b/src/assets/i18n/french.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "Surbrillance",
+ "highlight": "Surbrillance Stash",
"name": "Divers",
"navigation": "Défilement",
"navigations": {
diff --git a/src/assets/i18n/german.json b/src/assets/i18n/german.json
index 98e05c47..003478ab 100644
--- a/src/assets/i18n/german.json
+++ b/src/assets/i18n/german.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "Markieren",
+ "highlight": "Stash Highlight",
"name": "Sonstiges",
"navigation": "Navigation",
"navigations": {
diff --git a/src/assets/i18n/korean.json b/src/assets/i18n/korean.json
index 523c0516..b48750f2 100644
--- a/src/assets/i18n/korean.json
+++ b/src/assets/i18n/korean.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "가장 밝은 부분",
+ "highlight": "스 태쉬 하이라이트",
"name": "기타",
"navigation": "항해",
"navigations": {
diff --git a/src/assets/i18n/polish.json b/src/assets/i18n/polish.json
index 9da50032..82eac6ff 100644
--- a/src/assets/i18n/polish.json
+++ b/src/assets/i18n/polish.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "Podświetl przedmiot",
+ "highlight": "Podświetl Skrytkę",
"name": "Różne",
"navigation": "Przełączanie pomiędzy zakładkami",
"navigations": {
diff --git a/src/assets/i18n/portuguese.json b/src/assets/i18n/portuguese.json
index acfd0e63..a75e391a 100644
--- a/src/assets/i18n/portuguese.json
+++ b/src/assets/i18n/portuguese.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "Realçar",
+ "highlight": "Stash Highlight",
"name": "Misc",
"navigation": "Navegação",
"navigations": {
diff --git a/src/assets/i18n/russian.json b/src/assets/i18n/russian.json
index d03fff6e..d6cc3eb4 100644
--- a/src/assets/i18n/russian.json
+++ b/src/assets/i18n/russian.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "Выделить",
+ "highlight": "Stash Highlight",
"name": "Разное",
"navigation": "Навигация",
"navigations": {
diff --git a/src/assets/i18n/simplified-chinese.json b/src/assets/i18n/simplified-chinese.json
index b85ee57e..5c9aca11 100644
--- a/src/assets/i18n/simplified-chinese.json
+++ b/src/assets/i18n/simplified-chinese.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "突出",
+ "highlight": "隐藏重点",
"name": "杂项",
"navigation": "导航",
"navigations": {
diff --git a/src/assets/i18n/spanish.json b/src/assets/i18n/spanish.json
index b41769fd..4885c5c5 100644
--- a/src/assets/i18n/spanish.json
+++ b/src/assets/i18n/spanish.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "Realce",
+ "highlight": "Stash Highlight",
"name": "Misceláneos",
"navigation": "Navegación",
"navigations": {
diff --git a/src/assets/i18n/thai.json b/src/assets/i18n/thai.json
index 56b75b9f..201e0e8c 100644
--- a/src/assets/i18n/thai.json
+++ b/src/assets/i18n/thai.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "ไฮไลท์",
+ "highlight": "ไฮไลต์ที่เก็บ",
"name": "อื่น ๆ",
"navigation": "การเดินเรือ",
"navigations": {
diff --git a/src/assets/i18n/traditional-chinese.json b/src/assets/i18n/traditional-chinese.json
index 3d1ff962..5b830236 100644
--- a/src/assets/i18n/traditional-chinese.json
+++ b/src/assets/i18n/traditional-chinese.json
@@ -318,7 +318,7 @@
}
},
"misc": {
- "highlight": "突出",
+ "highlight": "隱藏重點",
"name": "其它",
"navigation": "導航",
"navigations": {