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 5dfbfb81..2f4f0835 100644
--- a/src/app/layout/window/background-window/background-window.component.ts
+++ b/src/app/layout/window/background-window/background-window.component.ts
@@ -74,7 +74,6 @@ export class BackgroundWindowComponent implements OnInit, OnDestroy {
});
});
});
- this.hotkeys.start();
this.game.start();
});
}
@@ -118,11 +117,6 @@ export class BackgroundWindowComponent implements OnInit, OnDestroy {
this.shouldQuit = false;
this.launcherWindow.close();
- const path = info.executionPath.split('/');
- path.pop();
- const log = `${path.join('/')}/logs/Client.txt`;
- this.log.start(log);
-
forkJoin([
this.annotationWindow.open(info.width, info.height),
this.notificationWindow.open(info.width, info.height)
@@ -135,6 +129,13 @@ export class BackgroundWindowComponent implements OnInit, OnDestroy {
module.onInfo(info, settings);
}
});
+
+ const path = info.executionPath.split('/');
+ path.pop();
+ const log = `${path.join('/')}/logs/Client.txt`;
+ this.log.start(log);
+
+ this.hotkeys.start();
});
if (!result) {
this.notification.show('event.start-error');
@@ -246,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/layout/window/settings-window/settings-window.component.html b/src/app/layout/window/settings-window/settings-window.component.html
index 8e977b97..8773dfd7 100644
--- a/src/app/layout/window/settings-window/settings-window.component.html
+++ b/src/app/layout/window/settings-window/settings-window.component.html
@@ -1,28 +1,34 @@
-
-
-
-
-
-
-
-
-
- {{feature.name | translate}}
-
- {{feature.name | translate}}
-
-
-
-
-
+
+
+
+
+
+
+
+
+ {{feature.name | translate}}
+
+ {{feature.name | translate}}
+
+
+
+
+
+ {{'support.name' | translate}}
+
+
+
+
\ No newline at end of file
diff --git a/src/app/layout/window/settings-window/settings-window.component.scss b/src/app/layout/window/settings-window/settings-window.component.scss
index 9ed81eb2..cc605cff 100644
--- a/src/app/layout/window/settings-window/settings-window.component.scss
+++ b/src/app/layout/window/settings-window/settings-window.component.scss
@@ -1,11 +1,7 @@
@import "../../../../styles/variables";
-.content {
- padding-bottom: 36px;
-
- .tab-content {
- padding: 12px 12px 0px 12px;
- }
+.tab-content {
+ padding: 12px;
}
::ng-deep {
diff --git a/src/app/layout/window/settings-window/settings-window.component.ts b/src/app/layout/window/settings-window/settings-window.component.ts
index 3b0e0cca..bed37939 100644
--- a/src/app/layout/window/settings-window/settings-window.component.ts
+++ b/src/app/layout/window/settings-window/settings-window.component.ts
@@ -5,7 +5,7 @@ import { FeatureSettingsService } from '@app/feature/feature-settings.service';
import { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs';
import { flatMap, throttleTime } from 'rxjs/operators';
import { SettingsFeatureContainerComponent } from '../../component';
-import { SettingsWindowService } from '../../service';
+import { SettingsFeature, SettingsWindowService } from '../../service';
@Component({
selector: 'app-settings-window',
@@ -67,8 +67,14 @@ export class SettingsWindowComponent implements OnInit, AfterViewInit, OnDestroy
}
}
- private updateTab(activeFeature: string): void {
- const feature = this.features.findIndex(x => x.name === activeFeature);
+ public onSupportToggle(): void {
+ this.window.open(SettingsFeature.Support).subscribe();
+ }
+
+ private updateTab(activeFeature: SettingsFeature): void {
+ const feature = activeFeature !== SettingsFeature.Support
+ ? this.features.findIndex(x => x.name === activeFeature)
+ : this.features.length + 1;
const index = feature + 1;
if (index > 0) {
this.selectedIndex$.next(0);
diff --git a/src/app/modules/bookmarks/component/bookmarks-settings/bookmarks-settings.component.html b/src/app/modules/bookmarks/component/bookmarks-settings/bookmarks-settings.component.html
index b6f10004..3494eb78 100644
--- a/src/app/modules/bookmarks/component/bookmarks-settings/bookmarks-settings.component.html
+++ b/src/app/modules/bookmarks/component/bookmarks-settings/bookmarks-settings.component.html
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/src/app/modules/commands/commands.module.ts b/src/app/modules/commands/commands.module.ts
index 9bf251c2..47032409 100644
--- a/src/app/modules/commands/commands.module.ts
+++ b/src/app/modules/commands/commands.module.ts
@@ -81,8 +81,8 @@ export class CommandsModule implements FeatureModule
{
const index = +hotkey.replace('command', '');
const { text } = settings.commands[index - 1];
if (text?.length) {
- this.command.execute(text).subscribe(() => { }, error => {
- console.warn(`Could not execute command.`, error, text);
+ this.command.execute(text, settings).subscribe(() => { }, error => {
+ 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/commands/component/commands-settings/commands-settings.component.html b/src/app/modules/commands/component/commands-settings/commands-settings.component.html
index 4d2c268c..9fcbf895 100644
--- a/src/app/modules/commands/component/commands-settings/commands-settings.component.html
+++ b/src/app/modules/commands/component/commands-settings/commands-settings.component.html
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/src/app/modules/commands/service/command.service.ts b/src/app/modules/commands/service/command.service.ts
index 6d7e2837..853a1b09 100644
--- a/src/app/modules/commands/service/command.service.ts
+++ b/src/app/modules/commands/service/command.service.ts
@@ -1,8 +1,9 @@
import { Injectable } from '@angular/core';
import { ChatService } from '@shared/module/poe/chat';
import { EventService } from '@shared/module/poe/event';
-import { Observable } from 'rxjs';
-import { map, tap } from 'rxjs/operators';
+import { Observable, of, throwError } from 'rxjs';
+import { flatMap } from 'rxjs/operators';
+import { CommandsFeatureSettings } from '../commands-feature-settings';
@Injectable({
providedIn: 'root'
@@ -13,16 +14,26 @@ export class CommandService {
private readonly chat: ChatService,
private readonly event: EventService) { }
- public execute(command: string): Observable {
- // TODO: Error handling
- return this.event.getCharacter().pipe(
- tap(character => {
- if (character?.name.length) {
- command = command.replace('@char', character.name);
- }
- this.chat.send(command);
- }),
- map(() => null)
- );
+ public execute(command: string, settings: CommandsFeatureSettings): Observable {
+ if (command.includes('@char')) {
+ return this.event.getCharacter().pipe(
+ flatMap(character => {
+ if (character?.name?.length) {
+ command = command.replace('@char', character.name);
+ } else {
+ if (settings.characterName?.length) {
+ command = command.replace('@char', settings.characterName);
+ } else {
+ return throwError('character name was not set.');
+ }
+ }
+ this.chat.send(command);
+ return of(null);
+ })
+ );
+ } else {
+ this.chat.send(command);
+ return of(null);
+ }
}
}
diff --git a/src/app/modules/evaluate/component/evaluate-settings/evaluate-settings.component.html b/src/app/modules/evaluate/component/evaluate-settings/evaluate-settings.component.html
index 8542e439..36731e06 100644
--- a/src/app/modules/evaluate/component/evaluate-settings/evaluate-settings.component.html
+++ b/src/app/modules/evaluate/component/evaluate-settings/evaluate-settings.component.html
@@ -71,7 +71,7 @@
-
+
{{'evaluate.item-search.query.initial' | translate}}
@@ -111,12 +111,12 @@
-
+
+
{{'evaluate.item-search.filter.name' | translate}}
-
+
-
+
{{'evaluate.item-search.property.name' | translate}}
-
+
-
+
{{'evaluate.item-search.stat.name' | translate}}
-->
-
-
-
+
+
\ No newline at end of file
diff --git a/src/app/modules/evaluate/window/evaluate-window/evaluate-window.component.html b/src/app/modules/evaluate/window/evaluate-window/evaluate-window.component.html
index 2ee0940e..5ad20550 100644
--- a/src/app/modules/evaluate/window/evaluate-window/evaluate-window.component.html
+++ b/src/app/modules/evaluate/window/evaluate-window/evaluate-window.component.html
@@ -1,5 +1,5 @@
-
+
diff --git a/src/app/modules/evaluate/window/evaluate-window/evaluate-window.component.ts b/src/app/modules/evaluate/window/evaluate-window/evaluate-window.component.ts
index 6f2d8902..716f9407 100644
--- a/src/app/modules/evaluate/window/evaluate-window/evaluate-window.component.ts
+++ b/src/app/modules/evaluate/window/evaluate-window/evaluate-window.component.ts
@@ -2,12 +2,12 @@ import { ChangeDetectionStrategy, Component, HostListener, NgZone, OnDestroy, On
import { EventSubscription } from '@app/event';
import { NotificationService } from '@app/notification';
import { OWGames } from '@app/odk';
-import { SettingsWindowService } from '@layout/service';
+import { SettingsFeature, SettingsWindowService } from '@layout/service';
import { EvaluateSelectEvent } from '@modules/evaluate/class';
import { EvaluateWindowData, EvaluateWindowService } from '@modules/evaluate/service';
import { StashPriceTagType, StashService } from '@shared/module/poe/stash';
import { BehaviorSubject, Subject, Subscription } from 'rxjs';
-import { buffer, debounceTime, filter } from 'rxjs/operators';
+import { buffer, debounceTime, filter, flatMap } from 'rxjs/operators';
const DISPOSE_TIMEOUT = 1000 * 15;
@@ -54,7 +54,15 @@ export class EvaluateWindowComponent implements OnInit, OnDestroy {
}
public onToggleSettings(): void {
- this.settings.toggle('evaluate.name').subscribe();
+ this.settings.toggle(SettingsFeature.Evaluate).subscribe();
+ }
+
+ public onEvaluateSelect(event: EvaluateSelectEvent): void {
+ this.selectQueue.next(event);
+ }
+
+ public onSupportToggle(): void {
+ this.settings.toggle(SettingsFeature.Support).subscribe();
}
private onMouseUp = (event: overwolf.games.inputTracking.MouseEvent): void => {
@@ -63,10 +71,6 @@ export class EvaluateWindowComponent implements OnInit, OnDestroy {
}
}
- public onEvaluateSelect(event: EvaluateSelectEvent): void {
- this.selectQueue.next(event);
- }
-
private dispose(): void {
this.removeEvents();
this.removeSubscription();
@@ -84,17 +88,17 @@ export class EvaluateWindowComponent implements OnInit, OnDestroy {
buffer(this.selectQueue.pipe(
debounceTime(250)
)),
- filter(events => events.length > 0)
- ).subscribe(([event, double]) => {
- const { amount, currency, count } = event;
- const type = double ? StashPriceTagType.Negotiable : StashPriceTagType.Exact;
- this.notification.show(double ? 'evaluate.tag.negotiable' : 'evaluate.tag.exact');
- this.stash.copyPrice({
- amount, currency,
- count, type
- });
- this.reset();
- });
+ filter(events => events.length > 0),
+ flatMap(([event, double]) => {
+ const { amount, currency, count } = event;
+ const type = double ? StashPriceTagType.Negotiable : StashPriceTagType.Exact;
+ this.notification.show(double ? 'evaluate.tag.negotiable' : 'evaluate.tag.exact');
+ return this.stash.copyPrice({
+ amount, currency,
+ count, type
+ });
+ })
+ ).subscribe(() => this.reset());
}
private unregisterQueue(): void {
diff --git a/src/app/modules/inspect/component/inspect-item/inspect-item.component.ts b/src/app/modules/inspect/component/inspect-item/inspect-item.component.ts
index ebe42861..1d04be25 100644
--- a/src/app/modules/inspect/component/inspect-item/inspect-item.component.ts
+++ b/src/app/modules/inspect/component/inspect-item/inspect-item.component.ts
@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
+import { InspectFeatureSettings } from '@modules/inspect/inspect-feature-settings';
import { Item } from '@shared/module/poe/item';
import { WikiMapService } from '@shared/module/poe/wiki';
-import { InspectFeatureSettings } from '@modules/inspect/inspect-feature-settings';
@Component({
selector: 'app-inspect-item',
@@ -10,7 +10,10 @@ import { InspectFeatureSettings } from '@modules/inspect/inspect-feature-setting
changeDetection: ChangeDetectionStrategy.OnPush
})
export class InspectItemComponent implements OnInit {
- public properties = [];
+ public properties = [
+ 'weaponCriticalStrikeChance',
+ 'weaponAttacksPerSecond'
+ ];
public maps: string[];
@Input()
diff --git a/src/app/modules/inspect/window/inspect-window/inspect-window.component.html b/src/app/modules/inspect/window/inspect-window/inspect-window.component.html
index fc0a33a9..c21fbedd 100644
--- a/src/app/modules/inspect/window/inspect-window/inspect-window.component.html
+++ b/src/app/modules/inspect/window/inspect-window/inspect-window.component.html
@@ -1,5 +1,5 @@
-
+
diff --git a/src/app/modules/inspect/window/inspect-window/inspect-window.component.ts b/src/app/modules/inspect/window/inspect-window/inspect-window.component.ts
index 8f6f0ef0..db40335c 100644
--- a/src/app/modules/inspect/window/inspect-window/inspect-window.component.ts
+++ b/src/app/modules/inspect/window/inspect-window/inspect-window.component.ts
@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component, HostListener, NgZone, OnDestroy, OnInit } from '@angular/core';
import { EventSubscription } from '@app/event';
import { OWGames } from '@app/odk';
-import { SettingsWindowService } from '@layout/service';
+import { SettingsFeature, SettingsWindowService } from '@layout/service';
import { InspectWindowData, InspectWindowService } from '@modules/inspect/service';
import { BehaviorSubject, Subscription } from 'rxjs';
import { debounceTime, filter } from 'rxjs/operators';
@@ -46,7 +46,11 @@ export class InspectWindowComponent implements OnInit, OnDestroy {
}
public onToggleSettings(): void {
- this.settings.toggle('inspect.name').subscribe();
+ this.settings.toggle(SettingsFeature.Inspect).subscribe();
+ }
+
+ public onSupportToggle(): void {
+ this.settings.toggle(SettingsFeature.Support).subscribe();
}
private onMouseUp = (event: overwolf.games.inputTracking.MouseEvent): void => {
diff --git a/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.html b/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.html
index 9c6a0599..53def1dd 100644
--- a/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.html
+++ b/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.html
@@ -1,10 +1,23 @@
-
\ No newline at end of file
diff --git a/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.scss b/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.scss
index c7f8fbff..dd3256d6 100644
--- a/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.scss
+++ b/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.scss
@@ -14,3 +14,22 @@
}
}
}
+
+.records {
+ position: absolute;
+ z-index: 2000;
+ top: 35px;
+ left: 0;
+ right: 0;
+ background: $black;
+ border: 1px solid $brown;
+}
+
+.record {
+ padding: $gutter $gutter * 2;
+ cursor: pointer;
+
+ &:hover {
+ background: $light-brown;
+ }
+}
diff --git a/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.ts b/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.ts
index 5b9d65d8..c629144d 100644
--- a/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.ts
+++ b/src/app/modules/market/component/market-exchange-bar/market-exchange-bar.component.ts
@@ -1,4 +1,6 @@
-import { ChangeDetectionStrategy, Component, EventEmitter, Output } from '@angular/core';
+import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
+import { TradeExchangeRequest } from '@shared/module/poe/trade/exchange';
+import { BehaviorSubject } from 'rxjs';
@Component({
selector: 'app-market-exchange-bar',
@@ -9,11 +11,17 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Output } from '@angul
export class MarketExchangeBarComponent {
private toggled = false;
+ public records$ = new BehaviorSubject([]);
+ public recordsVisible$ = new BehaviorSubject(false);
+
+ @Input()
+ public request: TradeExchangeRequest;
+
@Output()
- public highlight = new EventEmitter();
+ public requestChange = new EventEmitter();
@Output()
- public clear = new EventEmitter();
+ public highlight = new EventEmitter();
@Output()
public toggle = new EventEmitter();
@@ -25,8 +33,13 @@ export class MarketExchangeBarComponent {
this.highlight.next((input.value || '').toLowerCase());
}
- public onClearClick(): void {
- this.clear.next();
+ public onResetClick(request?: TradeExchangeRequest): void {
+ this.recordsVisible$.next(false);
+ if (request) {
+ this.requestChange.next(JSON.parse(JSON.stringify(request)));
+ } else {
+ this.requestChange.next();
+ }
}
public onToggleClick(): void {
@@ -35,6 +48,15 @@ export class MarketExchangeBarComponent {
}
public onSearch(): void {
+ this.recordsVisible$.next(false);
+ const { value } = this.records$;
+ const hash = JSON.stringify(this.request);
+ const records = value.filter(request => JSON.stringify(request) !== hash);
+ records.unshift(JSON.parse(JSON.stringify(this.request)));
+ if (records.length > 10) {
+ records.pop();
+ }
+ this.records$.next(records);
this.search.next();
}
}
diff --git a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.html b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.html
index 22178009..fcce375d 100644
--- a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.html
+++ b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.html
@@ -46,8 +46,8 @@
\ No newline at end of file
diff --git a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.scss b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.scss
index 35449078..a50eeabe 100644
--- a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.scss
+++ b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.scss
@@ -2,8 +2,6 @@
::ng-deep {
app-market-exchange-price {
- display: flex;
-
&:nth-child(even) {
> .item,
> .values,
@@ -19,6 +17,20 @@
}
}
+:host {
+ display: flex;
+ opacity: 1;
+ transition: all 0.2s ease-in;
+
+ &.whispered {
+ opacity: 0.3;
+ }
+
+ &:hover {
+ opacity: 1;
+ }
+}
+
.item,
.values,
.actions {
@@ -81,12 +93,6 @@
position: relative;
color: $purple;
- .status {
- position: absolute;
- top: $gutter-half;
- right: $gutter-half;
- }
-
button {
min-width: auto;
}
diff --git a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.ts b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.ts
index b187c697..233f78a7 100644
--- a/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.ts
+++ b/src/app/modules/market/component/market-exchange-price/market-exchange-price.component.ts
@@ -1,7 +1,7 @@
-import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';
import { TradeFetchListingPrice } from '@shared/module/poe/trade';
-export interface SendEvent {
+export interface WhisperEvent {
itemAmount: number;
valueAmount: number;
}
@@ -17,14 +17,20 @@ export class MarketExchangePriceComponent implements OnInit {
public min: number;
public value: number;
+ @HostBinding('class.whispered')
+ public whispered = false;
+
@Input()
public status: string;
+ @Input()
+ public seller: string;
+
@Input()
public price: TradeFetchListingPrice;
@Output()
- public send = new EventEmitter();
+ public whisper = new EventEmitter();
public ngOnInit(): void {
this.min = 1;
@@ -32,8 +38,9 @@ export class MarketExchangePriceComponent implements OnInit {
this.value = 1;
}
- public onSend(itemAmount: number, valueAmount: number): void {
- this.send.next({
+ public onWhisper(itemAmount: number, valueAmount: number): void {
+ this.whispered = true;
+ this.whisper.next({
itemAmount,
valueAmount
});
diff --git a/src/app/modules/market/component/market-exchange/market-exchange.component.html b/src/app/modules/market/component/market-exchange/market-exchange.component.html
index 075fe795..476eab9c 100644
--- a/src/app/modules/market/component/market-exchange/market-exchange.component.html
+++ b/src/app/modules/market/component/market-exchange/market-exchange.component.html
@@ -1,5 +1,5 @@
-
+
@@ -12,8 +12,9 @@
-
+
+
diff --git a/src/app/modules/market/component/market-exchange/market-exchange.component.ts b/src/app/modules/market/component/market-exchange/market-exchange.component.ts
index be09c90f..2100c42f 100644
--- a/src/app/modules/market/component/market-exchange/market-exchange.component.ts
+++ b/src/app/modules/market/component/market-exchange/market-exchange.component.ts
@@ -4,7 +4,7 @@ import { TradeFetchResultEntry, TradeFetchService } from '@shared/module/poe/tra
import { TradeExchangeRequest, TradeExchangeResponse, TradeExchangeService } from '@shared/module/poe/trade/exchange';
import { BehaviorSubject, Observable, of, Subject } from 'rxjs';
import { catchError, flatMap, map, switchMap, takeUntil, tap } from 'rxjs/operators';
-import { SendEvent } from '../market-exchange-price/market-exchange-price.component';
+import { WhisperEvent } from '../market-exchange-price/market-exchange-price.component';
const DEFAULT_REQUEST = () => {
const request: TradeExchangeRequest = {
@@ -93,13 +93,13 @@ export class MarketExchangeComponent implements OnInit, OnDestroy {
this.page$.next(this.page$.value + 1);
}
- public onClear(): void {
- this.request = DEFAULT_REQUEST();
+ public onRequestChange(request?: TradeExchangeRequest): void {
+ this.request = request || DEFAULT_REQUEST();
this.initSearch();
this.clear();
}
- public onSend(whisper: string, event: SendEvent): void {
+ public onWhisper(whisper: string, event: WhisperEvent): void {
let copy = whisper.slice();
copy = copy.replace('{0}', `${event.itemAmount}`);
copy = copy.replace('{1}', `${event.valueAmount}`);
diff --git a/src/app/modules/market/component/market-item-search-bar/market-item-search-bar.component.html b/src/app/modules/market/component/market-item-search-bar/market-item-search-bar.component.html
index 03e70d43..7075e5d9 100644
--- a/src/app/modules/market/component/market-item-search-bar/market-item-search-bar.component.html
+++ b/src/app/modules/market/component/market-item-search-bar/market-item-search-bar.component.html
@@ -1,17 +1,33 @@