Last Shakeout before Release (#2253)

* [skip ci] Weblate Changes (#2250)

* [skip ci] Translated using Weblate (Korean)

Currently translated at 100.0% (1486 of 1486 strings)

Translation: Kavita/ui
Translate-URL: https://hosted.weblate.org/projects/kavita/ui/ko/

* [skip ci] Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (1486 of 1486 strings)

Translation: Kavita/ui
Translate-URL: https://hosted.weblate.org/projects/kavita/ui/zh_Hans/

* Translated using Weblate (Chinese (Simplified))

Currently translated at 100.0% (161 of 161 strings)

Translation: Kavita/backend
Translate-URL: https://hosted.weblate.org/projects/kavita/backend/zh_Hans/

* Translated using Weblate (Korean)

Currently translated at 100.0% (161 of 161 strings)

Translation: Kavita/backend
Translate-URL: https://hosted.weblate.org/projects/kavita/backend/ko/

* Translated using Weblate (Czech)

Currently translated at 100.0% (161 of 161 strings)

Translation: Kavita/backend
Translate-URL: https://hosted.weblate.org/projects/kavita/backend/cs/

* [skip ci] Translated using Weblate (Czech)

Currently translated at 15.7% (234 of 1486 strings)

Translation: Kavita/ui
Translate-URL: https://hosted.weblate.org/projects/kavita/ui/cs/

* [skip ci] Translated using Weblate (Spanish)

Currently translated at 88.5% (1316 of 1486 strings)

Translation: Kavita/ui
Translate-URL: https://hosted.weblate.org/projects/kavita/ui/es/

* Translated using Weblate (Spanish)

Currently translated at 100.0% (161 of 161 strings)

Translation: Kavita/backend
Translate-URL: https://hosted.weblate.org/projects/kavita/backend/es/

* [skip ci] Translated using Weblate (Dutch)

Currently translated at 72.2% (1073 of 1486 strings)

Translation: Kavita/ui
Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/

* Translated using Weblate (Italian)

Currently translated at 100.0% (161 of 161 strings)

Translation: Kavita/backend
Translate-URL: https://hosted.weblate.org/projects/kavita/backend/it/

* [skip ci] Translated using Weblate (Italian)

Currently translated at 100.0% (1486 of 1486 strings)

Translation: Kavita/ui
Translate-URL: https://hosted.weblate.org/projects/kavita/ui/it/

---------

Co-authored-by: LeeWan1210 <dldhks456@live.com>
Co-authored-by: aleixcox <18121624@qq.com>
Co-authored-by: Jiří Heger <jiri.heger@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com>
Co-authored-by: Florestano Pepe <florestano.pepe@gmail.com>

* Fixed bookmark page not sorting and ordering correctly.

---------

Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: LeeWan1210 <dldhks456@live.com>
Co-authored-by: aleixcox <18121624@qq.com>
Co-authored-by: Jiří Heger <jiri.heger@gmail.com>
Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com>
Co-authored-by: Florestano Pepe <florestano.pepe@gmail.com>
This commit is contained in:
Joe Milazzo 2023-09-03 06:42:55 -07:00 committed by GitHub
parent 5a947fa525
commit ea4571b3d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 265 additions and 236 deletions

View file

@ -32,7 +32,6 @@ import { CardDetailLayoutComponent } from '../../../cards/card-detail-layout/car
import { BulkOperationsComponent } from '../../../cards/bulk-operations/bulk-operations.component';
import { SideNavCompanionBarComponent } from '../../../sidenav/_components/side-nav-companion-bar/side-nav-companion-bar.component';
import {translate, TranslocoDirective, TranslocoService} from "@ngneat/transloco";
import {FilterField} from "../../../_models/metadata/v2/filter-field";
import {SeriesFilterV2} from "../../../_models/metadata/v2/series-filter-v2";
import {Title} from "@angular/platform-browser";
@ -128,7 +127,8 @@ export class BookmarksComponent implements OnInit {
switch (action.action) {
case Action.DownloadBookmark:
this.downloadService.download('bookmark', this.bookmarks.filter(bmk => seriesIds.includes(bmk.seriesId)), (d) => {
this.downloadService.download('bookmark', this.bookmarks.filter(bmk => seriesIds.includes(bmk.seriesId)),
(d) => {
if (!d) {
this.bulkSelectionService.deselectAll();
}
@ -156,24 +156,18 @@ export class BookmarksComponent implements OnInit {
this.readerService.getAllBookmarks(this.filter).pipe(take(1)).subscribe(bookmarks => {
this.bookmarks = bookmarks;
this.seriesIds = {};
this.bookmarks.forEach(bmk => {
if (!this.seriesIds.hasOwnProperty(bmk.seriesId)) {
this.seriesIds[bmk.seriesId] = 1;
} else {
this.seriesIds[bmk.seriesId] += 1;
}
this.downloadingSeries[bmk.seriesId] = false;
this.clearingSeries[bmk.seriesId] = false;
});
const ids = Object.keys(this.seriesIds).map(k => parseInt(k, 10));
this.seriesService.getAllSeriesByIds(ids).subscribe(series => {
this.jumpbarKeys = this.jumpbarService.getJumpKeys(series, (t: Series) => t.name);
this.series = series;
this.loadingBookmarks = false;
this.cdRef.markForCheck();
const distinctSeriesMap = new Map();
this.bookmarks.forEach(b => {
distinctSeriesMap.set(b.series.id, b.series);
});
this.series = Array.from(distinctSeriesMap.values());
this.jumpbarKeys = this.jumpbarService.getJumpKeys(this.series, (t: Series) => t.name);
this.loadingBookmarks = false;
this.cdRef.markForCheck();
});
}
@ -201,10 +195,6 @@ export class BookmarksComponent implements OnInit {
});
}
getBookmarkPages(seriesId: number) {
return this.seriesIds[seriesId];
}
downloadBookmarks(series: Series) {
this.downloadingSeries[series.id] = true;
this.cdRef.markForCheck();