From 81f86c8ba475e5a6dd544fd01fb91276778838d4 Mon Sep 17 00:00:00 2001 From: Joseph Milazzo Date: Wed, 5 Feb 2025 15:40:50 -0600 Subject: [PATCH] Small cleanup on UX for selecting a match --- .../match-series-result-item.component.html | 36 +- .../match-series-result-item.component.ts | 10 +- .../app/admin/license/license.component.html | 314 +++++++++--------- UI/Web/src/assets/langs/en.json | 3 +- 4 files changed, 193 insertions(+), 170 deletions(-) diff --git a/UI/Web/src/app/_single-module/match-series-result-item/match-series-result-item.component.html b/UI/Web/src/app/_single-module/match-series-result-item/match-series-result-item.component.html index 6d0e47e9c..977e4e548 100644 --- a/UI/Web/src/app/_single-module/match-series-result-item/match-series-result-item.component.html +++ b/UI/Web/src/app/_single-module/match-series-result-item/match-series-result-item.component.html @@ -1,4 +1,5 @@ +
@if (item.series.coverUrl) { @@ -11,7 +12,7 @@ @for(synm of item.series.synonyms; track synm; let last = $last) { {{synm}} @if (!last) { - , + , } }
@@ -23,16 +24,27 @@
-
- {{t('details')}} - @if ((item.series.volumeCount || 0) > 0 || (item.series.chapterCount || 0) > 0) { - {{t('volume-count', {num: item.series.volumeCount})}} - {{t('chapter-count', {num: item.series.chapterCount})}} - } @else { - {{t('releasing')}} - } + @if (isSelected) { +
+ + {{t('updating-metadata-status')}} +
+ } @else { +
+ {{t('details')}} + @if ((item.series.volumeCount || 0) > 0 || (item.series.chapterCount || 0) > 0) { + {{t('volume-count', {num: item.series.volumeCount})}} + {{t('chapter-count', {num: item.series.chapterCount})}} + } @else { + {{t('releasing')}} + } + + {{item.series.plusMediaFormat | plusMediaFormat}} + ({{item.matchRating | translocoPercent}}) +
+ } + + + - {{item.series.plusMediaFormat | plusMediaFormat}} - ({{item.matchRating | translocoPercent}}) -
diff --git a/UI/Web/src/app/_single-module/match-series-result-item/match-series-result-item.component.ts b/UI/Web/src/app/_single-module/match-series-result-item/match-series-result-item.component.ts index fe482824b..4bb02f72e 100644 --- a/UI/Web/src/app/_single-module/match-series-result-item/match-series-result-item.component.ts +++ b/UI/Web/src/app/_single-module/match-series-result-item/match-series-result-item.component.ts @@ -15,6 +15,7 @@ import {TranslocoPercentPipe} from "@jsverse/transloco-locale"; import {ReadMoreComponent} from "../../shared/read-more/read-more.component"; import {TranslocoDirective} from "@jsverse/transloco"; import {PlusMediaFormatPipe} from "../../_pipes/plus-media-format.pipe"; +import {LoadingComponent} from "../../shared/loading/loading.component"; @Component({ selector: 'app-match-series-result-item', @@ -24,7 +25,8 @@ import {PlusMediaFormatPipe} from "../../_pipes/plus-media-format.pipe"; TranslocoPercentPipe, ReadMoreComponent, TranslocoDirective, - PlusMediaFormatPipe + PlusMediaFormatPipe, + LoadingComponent ], templateUrl: './match-series-result-item.component.html', styleUrl: './match-series-result-item.component.scss', @@ -37,7 +39,13 @@ export class MatchSeriesResultItemComponent { @Input({required: true}) item!: ExternalSeriesMatch; @Output() selected: EventEmitter = new EventEmitter(); + isSelected = false; + selectItem() { + if (this.isSelected) return; + + this.isSelected = true; + this.cdRef.markForCheck(); this.selected.emit(this.item); } diff --git a/UI/Web/src/app/admin/license/license.component.html b/UI/Web/src/app/admin/license/license.component.html index 9cfb5a27a..34a4ac196 100644 --- a/UI/Web/src/app/admin/license/license.component.html +++ b/UI/Web/src/app/admin/license/license.component.html @@ -6,166 +6,165 @@

{{t('kavita+-desc-part-1')}} {{t('kavita+-desc-part-2')}} {{t('kavita+-desc-part-3')}}

-
-
-
- - - - - - @if (hasLicense) { - ********* - - @if (isChecking) { -
- {{t('loading')}} -
- } @else { - @if (licenseInfo?.isActive) { - - {{t('license-valid')}} - - } @else { - - {{t('license-not-valid')}} - } - } - @if (!isChecking && hasLicense && !licenseInfo) { -
{{t('license-mismatch')}}
- } + +
+ + @if (hasLicense) { + ********* - } @else { - {{t('no-license-key')}} - } - - - -
- - -
-
- - -
-
- - - {{t('help-label')}} - - @if (formGroup.dirty || !formGroup.untouched) { -
- @if (formGroup.get('discordId')?.errors?.pattern) { -
- {{t('discord-validation')}} -
+ @if (isChecking) { +
+ {{t('loading')}} +
+ } @else { + @if (licenseInfo?.isActive) { + + {{t('license-valid')}} + + } @else { + + {{t('license-not-valid')}} + } -
- } -
- -
- - - - - - -
- -
- - - @if (hasLicense) { - @if (licenseInfo?.isActive) { - {{t('manage')}} } @else { - {{t('renew')}} + {{t('no-license-key')}} } - } @else { - {{t('buy')}} - - } - -
-
-
+ + +
+ + +
+
+ + +
+
+ + + {{t('help-label')}} + + @if (formGroup.dirty || !formGroup.untouched) { +
+ @if (formGroup.get('discordId')?.errors?.pattern) { +
+ {{t('discord-validation')}} +
+ } +
+ } +
+ +
+ + + + + + +
- @if (hasLicense && licenseInfo) { -
+
-
-

{{t('info-title')}}

-
- - - @if (isChecking) { - {{null | defaultValue}} + + @if (hasLicense) { + @if (licenseInfo?.isActive) { + {{t('manage')}} + } @else { + {{t('renew')}} + } } @else { - - {{licenseInfo.isActive ? t('valid') : t('invalid')}] - + {{t('buy')}} + }
+ -
- - - - {{isValidVersion ? t('valid') : t('invalid')}] - - - -
-
- - - {{licenseInfo.expirationDate | utcToLocalTime | defaultValue}} - - -
-
- - - {{licenseInfo.totalMonthsSubbed | number}} - - -
+ @if (hasLicense && licenseInfo) { +
-
- - +
+

{{t('info-title')}}

+
+ + + @if (isChecking) { + {{null | defaultValue}} + } @else { + + {{licenseInfo.isActive ? t('valid') : t('invalid')}] + + } + + +
+ +
+ + + + {{isValidVersion ? t('valid') : t('invalid')}] + + + +
+ +
+ + + {{licenseInfo.expirationDate | utcToLocalTime | defaultValue}} + + +
+ +
+ + + {{licenseInfo.totalMonthsSubbed | number}} + + +
+ +
+ + @if (showEmail) { {{licenseInfo.registeredEmail}} @@ -173,28 +172,31 @@

{{t('info-title')}}

*************** }
-
-
-
+ + +
-
+
- -

{{t('actions-title')}}

+ +

{{t('actions-title')}}

-
- - - +
+ + + +
+ +
+ + {{t('manage')}} + +
+ } +
+ -
- - {{t('manage')}} - -
-
- } diff --git a/UI/Web/src/assets/langs/en.json b/UI/Web/src/assets/langs/en.json index d9dbc76a5..cf2feec71 100644 --- a/UI/Web/src/assets/langs/en.json +++ b/UI/Web/src/assets/langs/en.json @@ -981,7 +981,8 @@ "volume-count": "{{server-stats.volume-count}}", "chapter-count": "{{common.chapter-count}}", "releasing": "Releasing", - "details": "View page" + "details": "View page", + "updating-metadata-status": "Updating Metadata" }, "metadata-fields": {