Skip to content

Commit

Permalink
- fixed a sorting issue at the market result list
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyusung4698 committed Jun 22, 2020
1 parent 2882754 commit 9eb0021
Show file tree
Hide file tree
Showing 24 changed files with 184 additions and 51 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
- added trade filter setting (Incoming & Outgoing, Incoming)
- added trade layout setting (Top To Bottom, Bottom To Top)
- added trade window to be transparent if no active trades and the window is pinned
- update trade action finished to be always shown even if no trade has been initalized
- update trade action finished to be always shown even if no trade have been initalized
- fixed a focus issue occuring when using the trade whisper button
- fixed a sorting issue at the market result list

## 1.0.4 (2020-06-19)

Expand Down
113 changes: 112 additions & 1 deletion overlay.babel
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,117 @@
</concept_node>
</children>
</folder_node>
<folder_node>
<name>changelog-1-0-5</name>
<children>
<concept_node>
<name>message</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>title</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>
</children>
</folder_node>
<folder_node>
<name>commands</name>
<children>
Expand Down Expand Up @@ -16027,7 +16138,7 @@
</translation_file>
</translation_files>
<editor_configuration>
<save_empty_translations>true</save_empty_translations>
<save_empty_translations>false</save_empty_translations>
<copy_templates>
<copy_template>{{'%1' | translate}}</copy_template>
<copy_template>[label]="'%1' | translate"</copy_template>
Expand Down
3 changes: 2 additions & 1 deletion src/app/core/annotation/annotation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ const ANNOTATIONS: Annotation[] = [
id: 'support',
hotkey: Hotkey.SettingsToggle
},
{ id: 'thanks' }
{ id: 'thanks' },
{ id: 'changelog-1-0-5' },
];

@Injectable({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div appResize>
<app-header name="PoE Overlay" [closeable]="false">
<app-header name="PoE Overlay" [closeable]="false" [fixed]="true">
<ng-container *ngIf="message$ | async as message">
<app-background>
<div class="content">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ng-container *ngIf="settings$ | async as settings">
<app-header name="PoE Overlay - Settings">
<app-header name="PoE Overlay - Settings" [fixed]="true">
<mat-tab-group mat-stretch-tabs animationDuration="0ms" [selectedIndex]="selectedIndex$ | async"
(selectedIndexChange)="onSelectedIndexChange($event)">
<mat-tab [label]="'settings.general' | translate">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div appResize>
<app-header name="PoE Overlay - Evaluate">
<app-header name="PoE Overlay - Evaluate" [fixed]="true">
<ng-container *ngIf="data$ | async as data">
<app-evaluate-item-frame [item]="data.item" [language]="data.language" [settings]="data.settings"
(evaluateSelect)="onEvaluateSelect($event)">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div appResize>
<app-header name="PoE Overlay - Inspect">
<app-header name="PoE Overlay - Inspect" [fixed]="true">
<ng-container *ngIf="data$ | async as data">
<ng-container [ngSwitch]="data.item.category">
<app-inspect-map [item]="data.item" [settings]="data.settings" *ngSwitchCase="'map'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import { TradeFeatureSettings, TradeFilter, TradeLayout } from '@modules/trade/t
changeDetection: ChangeDetectionStrategy.OnPush
})
export class TradeSettingsComponent extends FeatureSettingsComponent<TradeFeatureSettings> {
public displayWithVolume = (volume: number) => `${volume}%`;

public layouts = new EnumValues(TradeLayout);
public filters = new EnumValues(TradeFilter);

constructor(private readonly audio: AudioService) {
super();
}

public layouts = new EnumValues(TradeLayout);
public filters = new EnumValues(TradeFilter);
public displayWithVolume = (volume: number) => `${volume}%`;

public load(): void { }

public onChange(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<ng-container *ngIf="getMessages(data) as messages">
<div class="content" [class.pinned]="data.settings.tradeWindowPinned" [class.active]="messages.length">
<app-header [name]="'PoE Overlay - Trade (' + messages.length + ')'" [closeable]="false" [pinnable]="true"
[frame]="false" [pinned]="data.settings.tradeWindowPinned" [reverse]="data.settings.tradeLayout === 1"
(pinnedChange)="onPinnedChange($event)" (settingsToggle)="onSettingsToggle()">
[fixed]="true" [frame]="false" [pinned]="data.settings.tradeWindowPinned"
[reverse]="data.settings.tradeLayout === 1" (pinnedChange)="onPinnedChange($event)"
(settingsToggle)="onSettingsToggle()">
<ng-container ngProjectAs="controls">
<mat-icon (click)="toggle = !toggle" class="indicator"
[class.open]="data.settings.tradeLayout === 1 ? !toggle : toggle">keyboard_arrow_down
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div class="header" [style.width.px]="width" [class.reverse]="reverse" (mousedown)="draggable && onDrag($event)">
<div class="header" [style.width.px]="width" [class.reverse]="reverse" [class.fixed]="fixed"
(mousedown)="draggable && onDrag($event)">
<div class="controls left">
<ng-content select="controls"></ng-content>
</div>
Expand All @@ -16,6 +17,7 @@
</mat-icon>
</div>
</div>
<div class="content" [class.frame]="frame" [class.inline]="inline" [style.width.px]="width" [class.reverse]="reverse">
<div class="content" [class.frame]="frame" [class.inline]="inline" [class.fixed]="fixed" [style.width.px]="width"
[class.reverse]="reverse">
<ng-content></ng-content>
</div>
38 changes: 23 additions & 15 deletions src/app/shared/module/odk/component/header/header.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ $border-color: #1a1a1a;
}

.header {
position: fixed;
z-index: 1000;
left: 0;
right: 0;
position: relative;
height: $header-size;
line-height: $header-size + 2px;
background: $header-background;
Expand All @@ -39,12 +36,19 @@ $border-color: #1a1a1a;
text-align: center;
}

&:not(.reverse) {
top: 0;
}
&.fixed {
position: fixed;
z-index: 1000;
left: 0;
right: 0;

&:not(.reverse) {
top: 0;
}

&.reverse {
bottom: 0;
&.reverse {
bottom: 0;
}
}
}

Expand Down Expand Up @@ -84,18 +88,22 @@ $border-color: #1a1a1a;
}

.content {
width: 100%;

&:not(.inline) {
height: calc(100% - 30px);
}
width: 100%;
padding: 30px 0 0 0;

&.fixed {
padding: 30px 0 0 0;

&.reverse {
padding: 0 0 30px 0;
}
}

&.frame {
border: 1px solid $border-color;
border-top: none;
}

&.reverse {
padding: 0 0 30px 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export class HeaderComponent implements OnInit {
@Input()
public reverse = false;

@Input()
public fixed = false;

@Input()
public frame = true;

Expand Down
4 changes: 3 additions & 1 deletion src/app/shared/module/poe/trade/fetch/trade-fetch.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export class TradeFetchService {
map(responses => responses
.filter(x => x.result?.length)
.reduce<TradeFetchHttpResult[]>((a, b) => a.concat(b.result), cached)
.filter(x => x?.id?.length)),
.filter(x => x?.id?.length)
.sort((a, b) => ids.indexOf(a.id) - ids.indexOf(b.id))
),
map(results => results.map(result => {
const key = `${CACHE_PREFIX}_${exchange}_${result.id}`;
return this.cache.store(key, result, CACHE_EXPIRY);
Expand Down
4 changes: 4 additions & 0 deletions src/assets/i18n/english.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"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-5": {
"message": "- added support page with discord and github issues\n- added trade filter setting (Incoming & Outgoing, Incoming)\n- added trade layout setting (Top To Bottom, Bottom To Top)\n- added trade window to be transparent if no active trades and the window is pinned\n- update trade action finished to be always shown even if no trade have been initalized\n- fixed a focus issue occuring when using the trade whisper button\n- fixed a sorting issue at the market result list",
"title": "What's new in 1.0.5?"
},
"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.",
"title": "Commands"
Expand Down
4 changes: 2 additions & 2 deletions src/assets/i18n/french.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"filter": {
"message": "Cliquez sur l'icône en surbrillance pour ouvrir le filtre. Ajustez les valeurs à votre guise.",
"title": ""
"title": "Filtre"
},
"message": "Le marché vous permet de parcourir les articles listés et d'échanger des devises dans le jeu.\n\nPeut être basculé en appuyant sur la touche de raccourci ci-dessous:",
"reset": {
Expand Down Expand Up @@ -107,7 +107,7 @@
},
"thanks": {
"message": "C'est tout pour le moment. J'espère que vous apprécierez mon application.\n\n- Cordialement, Kyusung4698",
"title": ""
"title": "Je vous remercie!"
},
"trade": {
"highlight": {
Expand Down
4 changes: 2 additions & 2 deletions src/assets/i18n/german.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"filter": {
"message": "Klicken Sie auf das hervorgehobene Symbol, um den Filter zu öffnen. Passen Sie die Werte an Ihre Bedürfnisse an.",
"title": ""
"title": "Filter"
},
"message": "Auf dem Markt können Sie aufgelistete Gegenstände durchsuchen und Währungen im Spiel austauschen.\n\nKann durch Drücken des folgenden Hotkeys umgeschaltet werden:",
"reset": {
Expand Down Expand Up @@ -107,7 +107,7 @@
},
"thanks": {
"message": "Das war es fürs Erste. Hoffe dir gefällt meine App.\n\n- Mit freundlichen Grüßen, Kyusung4698",
"title": ""
"title": "Vielen Dank!"
},
"trade": {
"highlight": {
Expand Down
4 changes: 2 additions & 2 deletions src/assets/i18n/korean.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"filter": {
"message": "강조 표시된 아이콘을 클릭하여 필터를 엽니 다. 원하는대로 값을 조정하십시오.",
"title": ""
"title": "필터"
},
"message": "시장에서는 게임 내에서 나열된 항목을 찾아보고 통화를 교환 할 수 있습니다.\n\n아래 핫키를 눌러 전환 할 수 있습니다.",
"reset": {
Expand Down Expand Up @@ -107,7 +107,7 @@
},
"thanks": {
"message": "그게 다야. 내 앱을 즐기시기 바랍니다.\n\n-Kyusung4698 감사합니다",
"title": ""
"title": "고맙습니다!"
},
"trade": {
"highlight": {
Expand Down
4 changes: 2 additions & 2 deletions src/assets/i18n/polish.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"filter": {
"message": "Kliknij podświetloną ikonę, aby otworzyć filtr. Dostosuj wartości do swoich potrzeb.",
"title": ""
"title": "filtr"
},
"message": "Rynek pozwala przeglądać wymienione przedmioty i wymieniać waluty w grze.\n\nMożna go przełączać, naciskając poniższy skrót:",
"reset": {
Expand Down Expand Up @@ -107,7 +107,7 @@
},
"thanks": {
"message": "Na razie tyle. Mam nadzieję, że podoba Ci się moja aplikacja.\n\n- Z pozdrowieniami, Kyusung4698",
"title": ""
"title": "Dziękuję Ci!"
},
"trade": {
"highlight": {
Expand Down
Loading

0 comments on commit 9eb0021

Please sign in to comment.