Bugfixes! (#2187)
* Updated readme to have progress bars on localization to help motivate users. * Fixed a bug where downloads could trigger on lazy loaded module boundaries. * Updated all packages to latest * Fixed a bug where remove from on deck would show on all series cards when it shouldn't have. * Fixed a bug where virtualized reading list page wasn't showing the correct order on the UI * Localization fixes from shakeout * Fixed fullscreen mode broken in nightly from localization. * Fixed a bug where duplicate series add events could show duplicate items in library detail page. * Translations update from Hosted Weblate (#2184) * Added translation using Weblate (Kannada) * Added translation using Weblate (Hindi) * Added translation using Weblate (German) * Added translation using Weblate (Russian) * Added translation using Weblate (Malay) * Translated using Weblate (Dutch) Currently translated at 20.8% (296 of 1423 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/nl/ * Translated using Weblate (Portuguese) Currently translated at 5.2% (75 of 1423 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/pt/ * Translated using Weblate (German) Currently translated at 98.7% (156 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/de/ * Translated using Weblate (Japanese) Currently translated at 1.9% (28 of 1423 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/ja/ * Translated using Weblate (Spanish) Currently translated at 1.8% (3 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/es/ * Translated using Weblate (Hindi) Currently translated at 100.0% (158 of 158 strings) Translation: Kavita/backend Translate-URL: https://hosted.weblate.org/projects/kavita/backend/hi/ * Translated using Weblate (German) Currently translated at 7.3% (105 of 1423 strings) Translation: Kavita/ui Translate-URL: https://hosted.weblate.org/projects/kavita/ui/de/ * Deleted translation using Weblate (Undetermined) * Added translation using Weblate (Italian) --------- Co-authored-by: Shashank Pujari <shashankppujari@gmail.com> Co-authored-by: Andre <andruecha32@gmail.com> Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com> Co-authored-by: Duarte Silva <smallflake@protonmail.com> Co-authored-by: Andre Smith <andrepsmithjr@gmail.com> Co-authored-by: ThePromidius <thepromidiusyt@gmail.com> Co-authored-by: majora2007 <kavitareader@gmail.com> Co-authored-by: Tomas Battistini <tomas.battistini@gmail.com> --------- Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Shashank Pujari <shashankppujari@gmail.com> Co-authored-by: Andre <andruecha32@gmail.com> Co-authored-by: Hans Kalisvaart <hans.kalisvaart@gmail.com> Co-authored-by: Duarte Silva <smallflake@protonmail.com> Co-authored-by: Andre Smith <andrepsmithjr@gmail.com> Co-authored-by: ThePromidius <thepromidiusyt@gmail.com> Co-authored-by: majora2007 <kavitareader@gmail.com> Co-authored-by: Tomas Battistini <tomas.battistini@gmail.com>
This commit is contained in:
parent
e9f8ecfc27
commit
7358ba7220
30 changed files with 7838 additions and 771 deletions
|
|
@ -24,6 +24,30 @@ import {RelationshipPipe} from "../../pipe/relationship.pipe";
|
|||
import {Device} from "../../_models/device/device";
|
||||
import {TranslocoService} from "@ngneat/transloco";
|
||||
|
||||
function deepClone(obj: any): any {
|
||||
if (obj === null || typeof obj !== 'object') {
|
||||
return obj;
|
||||
}
|
||||
|
||||
if (obj instanceof Array) {
|
||||
return obj.map(item => deepClone(item));
|
||||
}
|
||||
|
||||
const clonedObj: any = {};
|
||||
|
||||
for (const key in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
||||
clonedObj[key] = deepClone(obj[key]);
|
||||
} else {
|
||||
clonedObj[key] = obj[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return clonedObj;
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: 'app-series-card',
|
||||
standalone: true,
|
||||
|
|
@ -85,11 +109,12 @@ export class SeriesCardComponent implements OnInit, OnChanges {
|
|||
|
||||
ngOnChanges(changes: any) {
|
||||
if (this.data) {
|
||||
this.actions = this.actionFactoryService.getSeriesActions((action: ActionItem<Series>, series: Series) => this.handleSeriesActionCallback(action, series));
|
||||
this.actions = [...this.actionFactoryService.getSeriesActions((action: ActionItem<Series>, series: Series) => this.handleSeriesActionCallback(action, series))];
|
||||
if (this.isOnDeck) {
|
||||
const othersIndex = this.actions.findIndex(obj => obj.title === 'others');
|
||||
if (this.actions[othersIndex].children.findIndex(o => o.action === Action.RemoveFromOnDeck) < 0) {
|
||||
this.actions[othersIndex].children.push({
|
||||
const othersAction = deepClone(this.actions[othersIndex]) as ActionItem<Series>;
|
||||
if (othersAction.children.findIndex(o => o.action === Action.RemoveFromOnDeck) < 0) {
|
||||
othersAction.children.push({
|
||||
action: Action.RemoveFromOnDeck,
|
||||
title: 'remove-from-on-deck',
|
||||
callback: (action: ActionItem<Series>, series: Series) => this.handleSeriesActionCallback(action, series),
|
||||
|
|
@ -97,6 +122,7 @@ export class SeriesCardComponent implements OnInit, OnChanges {
|
|||
requiresAdmin: false,
|
||||
children: [],
|
||||
});
|
||||
this.actions[othersIndex] = othersAction;
|
||||
}
|
||||
}
|
||||
this.cdRef.markForCheck();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue