From 9c4582cf1fdd4a77e44b6ef0aec0bc527fd77b38 Mon Sep 17 00:00:00 2001 From: Nicklas Ronge Date: Thu, 17 Sep 2020 18:57:09 +0200 Subject: [PATCH] - added replays location as tooltip --- overlay.babel | 53 +++++++++++++++++++ src/app/core/odk/ow-replay.ts | 13 +++++ .../replay-settings.component.html | 6 +-- .../replay-settings.component.ts | 12 ++++- .../component/card/card.component.html | 1 + .../component/card/card.component.scss | 16 ++++++ .../material/component/card/card.component.ts | 3 ++ src/assets/i18n/english.json | 1 + src/assets/i18n/french.json | 1 + src/assets/i18n/german.json | 1 + src/assets/i18n/korean.json | 1 + src/assets/i18n/polish.json | 1 + src/assets/i18n/portuguese.json | 1 + src/assets/i18n/russian.json | 1 + src/assets/i18n/simplified-chinese.json | 1 + src/assets/i18n/spanish.json | 1 + src/assets/i18n/thai.json | 1 + src/assets/i18n/traditional-chinese.json | 1 + 18 files changed, 110 insertions(+), 5 deletions(-) diff --git a/overlay.babel b/overlay.babel index 84929f82..0cb9d763 100644 --- a/overlay.babel +++ b/overlay.babel @@ -12010,6 +12010,59 @@ + + help + false + + + + + + de-DE + false + + + en-US + false + + + es-ES + false + + + fr-FR + false + + + ko-KR + false + + + pl-PL + false + + + pt-BR + false + + + ru-RU + false + + + th-TH + false + + + zh-CHS + false + + + zh-CHT + false + + + kill false diff --git a/src/app/core/odk/ow-replay.ts b/src/app/core/odk/ow-replay.ts index 3e60c9eb..c6a8f08b 100644 --- a/src/app/core/odk/ow-replay.ts +++ b/src/app/core/odk/ow-replay.ts @@ -1,6 +1,19 @@ import { from, Observable } from 'rxjs'; export class OWReplay { + public static path(): Observable { + const promise = new Promise((resolve, reject) => { + overwolf.settings.getOverwolfVideosFolder(result => { + if (result.success && result.path?.Value) { + resolve(result.path.Value); + } else { + reject(result.error); + } + }); + }); + return from(promise); + } + public static turnOn(settings: any): Observable { const promise = new Promise((resolve, reject) => { overwolf.media.replays.turnOn(settings, result => { diff --git a/src/app/modules/replay/component/replay-settings/replay-settings.component.html b/src/app/modules/replay/component/replay-settings/replay-settings.component.html index 3a467921..0251b9f6 100644 --- a/src/app/modules/replay/component/replay-settings/replay-settings.component.html +++ b/src/app/modules/replay/component/replay-settings/replay-settings.component.html @@ -1,4 +1,4 @@ - +
- +
- +
{ +export class ReplaySettingsComponent extends FeatureSettingsComponent implements OnInit { + public path$: Observable; + public displayDuration = (value: number) => `${value}s`; + public ngOnInit(): void { + this.path$ = OWReplay.path(); + } + public load(): void { } public onCaptureChange(): void { diff --git a/src/app/shared/module/material/component/card/card.component.html b/src/app/shared/module/material/component/card/card.component.html index d27466bf..b6d64bc8 100644 --- a/src/app/shared/module/material/component/card/card.component.html +++ b/src/app/shared/module/material/component/card/card.component.html @@ -4,6 +4,7 @@
{{title | translate}} + help
diff --git a/src/app/shared/module/material/component/card/card.component.scss b/src/app/shared/module/material/component/card/card.component.scss index 3996a048..6d6f46c2 100644 --- a/src/app/shared/module/material/component/card/card.component.scss +++ b/src/app/shared/module/material/component/card/card.component.scss @@ -1,8 +1,24 @@ +$help-size: 18px; + ::ng-deep { app-card { > .mat-card { padding: 14px 10px; } + + mat-label, + mat-icon { + display: inline-block; + } + + .mat-icon { + height: $help-size; + width: $help-size; + font-size: $help-size; + line-height: $help-size; + margin-left: 8px; + vertical-align: text-top; + } } } diff --git a/src/app/shared/module/material/component/card/card.component.ts b/src/app/shared/module/material/component/card/card.component.ts index 4143805d..560a443b 100644 --- a/src/app/shared/module/material/component/card/card.component.ts +++ b/src/app/shared/module/material/component/card/card.component.ts @@ -9,4 +9,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; export class CardComponent { @Input() public title: string; + + @Input() + public help: string; } diff --git a/src/assets/i18n/english.json b/src/assets/i18n/english.json index 6741b731..7b27d761 100644 --- a/src/assets/i18n/english.json +++ b/src/assets/i18n/english.json @@ -373,6 +373,7 @@ "capture-error": "The event could not be captured.", "death": "Death event", "future-duration": "Future duration", + "help": "Replays are saved at: '{{path}}'\nOld videos are deleted after reaching a size threshold.", "kill": "Kill event", "manually": "Manually", "name": "Replay", diff --git a/src/assets/i18n/french.json b/src/assets/i18n/french.json index 1868f3ea..25281b7a 100644 --- a/src/assets/i18n/french.json +++ b/src/assets/i18n/french.json @@ -369,6 +369,7 @@ "capture-error": "L'événement n'a pas pu être capturé.", "death": "Événement de décès", "future-duration": "Durée future", + "help": "Les rediffusions sont enregistrées à l'adresse: \"{{path}}\"\nLes anciennes vidéos sont supprimées après avoir atteint un seuil de taille.", "kill": "Tuer l'événement", "manually": "Manuellement", "name": "Rejouer", diff --git a/src/assets/i18n/german.json b/src/assets/i18n/german.json index fcaf4d05..bee6c2e0 100644 --- a/src/assets/i18n/german.json +++ b/src/assets/i18n/german.json @@ -369,6 +369,7 @@ "capture-error": "Das Ereignis konnte nicht erfasst werden.", "death": "Todesereignis", "future-duration": "Zukünftige Dauer", + "help": "Wiederholungen werden gespeichert unter: '{{path}}'\nAlte Videos werden nach Erreichen eines Größenschwellenwerts gelöscht.", "kill": "Tötungsereignis", "manually": "Manuell", "name": "Wiederholung", diff --git a/src/assets/i18n/korean.json b/src/assets/i18n/korean.json index 13862773..04357223 100644 --- a/src/assets/i18n/korean.json +++ b/src/assets/i18n/korean.json @@ -369,6 +369,7 @@ "capture-error": "이벤트를 캡처 할 수 없습니다.", "death": "죽음의 사건", "future-duration": "향후 기간", + "help": "리플레이는 '{{path}}'에 저장됩니다.\n크기 임계 값에 도달하면 오래된 비디오가 삭제됩니다.", "kill": "킬 이벤트", "manually": "수동으로", "name": "다시 하다", diff --git a/src/assets/i18n/polish.json b/src/assets/i18n/polish.json index 707ebfbe..4c255a50 100644 --- a/src/assets/i18n/polish.json +++ b/src/assets/i18n/polish.json @@ -369,6 +369,7 @@ "capture-error": "Nie można zarejestrować zdarzenia.", "death": "Zdarzenie śmierci", "future-duration": "Przyszły czas trwania", + "help": "Powtórki są zapisywane w: „{{path}}”\nStare filmy są usuwane po osiągnięciu progu rozmiaru.", "kill": "Zabij zdarzenie", "manually": "ręcznie", "name": "Powtórna rozgrywka", diff --git a/src/assets/i18n/portuguese.json b/src/assets/i18n/portuguese.json index ccbfd3ef..fa5968e4 100644 --- a/src/assets/i18n/portuguese.json +++ b/src/assets/i18n/portuguese.json @@ -369,6 +369,7 @@ "capture-error": "O evento não pôde ser capturado.", "death": "Evento de morte", "future-duration": "Duração futura", + "help": "As repetições são salvas em: '{{path}}'\nVídeos antigos são excluídos após atingir um limite de tamanho.", "kill": "Matar evento", "manually": "Manualmente", "name": "Repetir", diff --git a/src/assets/i18n/russian.json b/src/assets/i18n/russian.json index 01f17f49..38ce90af 100644 --- a/src/assets/i18n/russian.json +++ b/src/assets/i18n/russian.json @@ -369,6 +369,7 @@ "capture-error": "Событие не может быть захвачено.", "death": "Событие смерти", "future-duration": "Будущая продолжительность", + "help": "Повторы сохраняются в: '{{path}}'\nСтарые видео удаляются по достижении порогового размера.", "kill": "Убить событие", "manually": "вручную", "name": "переигровка", diff --git a/src/assets/i18n/simplified-chinese.json b/src/assets/i18n/simplified-chinese.json index af05b158..afc9d220 100644 --- a/src/assets/i18n/simplified-chinese.json +++ b/src/assets/i18n/simplified-chinese.json @@ -369,6 +369,7 @@ "capture-error": "无法捕获该事件。", "death": "死亡事件", "future-duration": "未来持续时间", + "help": "重放保存在:'{{path}}'\n达到大小阈值后,旧视频将被删除。", "kill": "杀死事件", "manually": "手动地", "name": "重播", diff --git a/src/assets/i18n/spanish.json b/src/assets/i18n/spanish.json index 6d8de0fc..f0ca89ca 100644 --- a/src/assets/i18n/spanish.json +++ b/src/assets/i18n/spanish.json @@ -369,6 +369,7 @@ "capture-error": "El evento no pudo ser capturado.", "death": "Evento de muerte", "future-duration": "Duración futura", + "help": "Las repeticiones se guardan en: '{{path}}'\nLos videos antiguos se eliminan después de alcanzar un umbral de tamaño.", "kill": "Evento de muerte", "manually": "a mano", "name": "Repetición", diff --git a/src/assets/i18n/thai.json b/src/assets/i18n/thai.json index d86feb68..640f339c 100644 --- a/src/assets/i18n/thai.json +++ b/src/assets/i18n/thai.json @@ -369,6 +369,7 @@ "capture-error": "ไม่สามารถจับกิจกรรม", "death": "เหตุการณ์ความตาย", "future-duration": "อนาคตระยะเวลา", + "help": "การเล่นซ้ำจะถูกบันทึกไว้ที่: \"{{path}}\"\nวิดีโอเก่าจะถูกลบหลังจากถึงเกณฑ์ขนาด", "kill": "ฆ่าเหตุการณ์", "manually": "ด้วยมือ", "name": "เล่นใหม่", diff --git a/src/assets/i18n/traditional-chinese.json b/src/assets/i18n/traditional-chinese.json index eb9e5913..f59f9533 100644 --- a/src/assets/i18n/traditional-chinese.json +++ b/src/assets/i18n/traditional-chinese.json @@ -369,6 +369,7 @@ "capture-error": "無法獲取該事件。", "death": "死亡事件", "future-duration": "未來幾秒內", + "help": "重放保存在:'{{path}}'\n達到大小閾值後,舊視頻將被刪除。", "kill": "擊殺事件", "manually": "手動地", "name": "重播",