Skip to content

Commit

Permalink
- added market search history
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyusung4698 committed Jun 24, 2020
1 parent 7f49cbf commit 0b7fe4c
Show file tree
Hide file tree
Showing 22 changed files with 440 additions and 55 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog

## 1.0.5 (2020-06-22)
## 1.0.6 (2020-06-25)

- added market search history
- added trade offer received timer
- added trade player name
- added trade go to hideout action
- added harvest seeds evaluate support
- fixed an issue at the market which resulted in crashing the app

## 1.0.5 (2020-06-23)

- added support page with discord and GitHub issues
- added colors for life, mana and energy shield pseudo stats
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ The complete guide with pictures can be found [here](INSTALLING.md).
| Market | Search History | 🚧 |
| Market | Save Queries | 📚 |
| Market | Sort Results | 📚 |
| Stash | Highlight Item | 📚 |
| Stash | Filter Category | 📚 |
| Stash | Navigation | ⚡ | Waiting 🐺
| Trade | Parsing Offers | ⚡ | Waiting 🐺
| Commands | @latest_whisper | ⚡ | Waiting 🐺

🚧 In Progress 📚 Backlog ⚡ Blocked 🐺 Overwolf
Expand Down
57 changes: 55 additions & 2 deletions overlay.babel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<babeledit_project version="1.2" be_version="2.7.0">
<babeledit_project be_version="2.7.0" version="1.2">
<!--

BabelEdit project file
Expand Down Expand Up @@ -130,7 +130,7 @@
</children>
</folder_node>
<folder_node>
<name>changelog-1-0-5</name>
<name>changelog-1-0-6</name>
<children>
<concept_node>
<name>message</name>
Expand Down Expand Up @@ -14269,6 +14269,59 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>hideout</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>de-DE</language>
<approved>false</approved>
</translation>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-ES</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-FR</language>
<approved>false</approved>
</translation>
<translation>
<language>ko-KR</language>
<approved>false</approved>
</translation>
<translation>
<language>pl-PL</language>
<approved>false</approved>
</translation>
<translation>
<language>pt-BR</language>
<approved>false</approved>
</translation>
<translation>
<language>ru-RU</language>
<approved>false</approved>
</translation>
<translation>
<language>th-TH</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHS</language>
<approved>false</approved>
</translation>
<translation>
<language>zh-CHT</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>interested</name>
<definition_loaded>false</definition_loaded>
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-5' },
{ id: 'changelog-1-0-6' },
];

@Injectable({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<div class="wrapper">
<input #input (keyup)="onKeyup(input)" [placeholder]="'market.exchange.highlight' | translate">
<button class="small" appAnnotation="market.filter" (click)="onToggleClick()" [title]="'market.bar.toggle' | translate">
<button class="small" appAnnotation="market.filter" (click)="onToggleClick()"
[title]="'market.bar.toggle' | translate">
<mat-icon> filter_list </mat-icon>
</button>
<button class="small" appAnnotation="market.reset" (click)="onClearClick()" [title]="'market.bar.reset' | translate">
<button class="small" appAnnotation="market.reset" (click)="onResetClick()"
[title]="'market.bar.reset' | translate">
<mat-icon> history </mat-icon>
</button>
<ng-container *ngIf="records$ | async as records">
<button class="small" (click)="recordsVisible$.next(!recordsVisible$.value)"
[title]="'market.bar.history' | translate" [disabled]="!records.length">
<mat-icon> history_edu </mat-icon>
</button>
<div class="records" *ngIf="recordsVisible$ | async">
<div class="record" *ngFor="let record of records" (click)="onResetClick(record)">
{{record | tradeExchangeText}}
</div>
</div>
</ng-container>
<button (click)="onSearch()" appAnnotation="market.search">{{'market.bar.search' | translate}}</button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -9,11 +11,17 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Output } from '@angul
export class MarketExchangeBarComponent {
private toggled = false;

public records$ = new BehaviorSubject<TradeExchangeRequest[]>([]);
public recordsVisible$ = new BehaviorSubject<boolean>(false);

@Input()
public request: TradeExchangeRequest;

@Output()
public highlight = new EventEmitter<string>();

@Output()
public clear = new EventEmitter<void>();
public reset = new EventEmitter<TradeExchangeRequest>();

@Output()
public toggle = new EventEmitter<boolean>();
Expand All @@ -25,8 +33,9 @@ export class MarketExchangeBarComponent {
this.highlight.next((input.value || '').toLowerCase());
}

public onClearClick(): void {
this.clear.next();
public onResetClick(request?: TradeExchangeRequest): void {
this.recordsVisible$.next(false);
this.reset.next(request);
}

public onToggleClick(): void {
Expand All @@ -35,6 +44,12 @@ export class MarketExchangeBarComponent {
}

public onSearch(): void {
this.recordsVisible$.next(false);
this.records$.value.unshift(JSON.parse(JSON.stringify(this.request)));
if (this.records$.value.length > 10) {
this.records$.value.pop();
}
this.records$.next(this.records$.value);
this.search.next();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<app-market-exchange-bar (search)="onSearch()" (toggle)="onToggle($event)" (highlight)="onHighlight($event)"
(clear)="onClear()">
<app-market-exchange-bar [request]="request" (search)="onSearch()" (toggle)="onToggle($event)"
(highlight)="onHighlight($event)" (reset)="onReset($event)">
</app-market-exchange-bar>

<div class="content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export class MarketExchangeComponent implements OnInit, OnDestroy {
this.page$.next(this.page$.value + 1);
}

public onClear(): void {
this.request = DEFAULT_REQUEST();
public onReset(request?: TradeExchangeRequest): void {
this.request = request || DEFAULT_REQUEST();
this.initSearch();
this.clear();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
<div class="input-container">
<input #input [placeholder]="'market.search.search' | translate" (keyup)="onKeyup()" (focus)="onFocus()"
(blur)="onBlur($event)">
<button class="small" appAnnotation="market.filter" (click)="onToggleClick()" [title]="'market.bar.toggle' | translate">
<button class="small" appAnnotation="market.filter" (click)="onToggleClick()"
[title]="'market.bar.toggle' | translate">
<mat-icon> filter_list </mat-icon>
</button>
<button class="small" appAnnotation="market.reset" (click)="onClearClick()" [title]="'market.bar.reset' | translate">
<mat-icon> history </mat-icon>
<button class="small" appAnnotation="market.reset" (click)="onResetClick()"
[title]="'market.bar.reset' | translate">
<mat-icon> restore </mat-icon>
</button>
<button (click)="onSearch()" appAnnotation="market.search">{{'market.bar.search' | translate}}</button>
<cdk-virtual-scroll-viewport class="filter" [class.shown]="filterVisible$ | async" itemSize="30" minBufferPx="200"
maxBufferPx="400">
<div class="entry" [class.group]="entry.group" [class.item]="!entry.group" [innerHTML]="entry.text"
(click)="onItemClick(entry.value)" *cdkVirtualFor="let entry of entries$ | async; templateCacheSize: 0">
<ng-container *ngIf="records$ | async as records">
<button class="small" (click)="recordsVisible$.next(!recordsVisible$.value)"
[title]="'market.bar.history' | translate" [disabled]="!records.length">
<mat-icon> history_edu </mat-icon>
</button>
<div class="records" *ngIf="recordsVisible$ | async">
<div class="record" *ngFor="let record of records" (click)="onResetClick(record)">
{{record | tradeSearchText}}
</div>
</div>
</cdk-virtual-scroll-viewport>
</ng-container>
<button (click)="onSearch()" appAnnotation="market.search">{{'market.bar.search' | translate}}</button>
<ng-container *ngIf="entries$ | async as entries">
<cdk-virtual-scroll-viewport class="filter"
[style.height.px]="(entries.length * 30 > 240 ? 240 : entries.length * 30)"
[class.shown]="filterVisible$ | async" itemSize="30" minBufferPx="200" maxBufferPx="400">
<div class="entry" [class.group]="entry.group" [class.item]="!entry.group" [innerHTML]="entry.text"
(click)="onItemClick(entry.value)" *cdkVirtualFor="let entry of entries; templateCacheSize: 0">
</div>
</cdk-virtual-scroll-viewport>
</ng-container>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
left: 0;
right: 0;
height: 240px;
background: $black-transparent;
min-height: 30px;
background: $black;
border: 1px solid $brown;

&.shown {
Expand All @@ -54,3 +55,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;
}
}
Loading

0 comments on commit 0b7fe4c

Please sign in to comment.