Nightly Issues (#2618)
This commit is contained in:
parent
0ff6d4a6fc
commit
d145dca0e7
28 changed files with 138 additions and 100 deletions
|
|
@ -93,6 +93,8 @@ export class AppComponent implements OnInit {
|
|||
// Bootstrap anything that's needed
|
||||
this.themeService.getThemes().subscribe();
|
||||
this.libraryService.getLibraryNames().pipe(take(1), shareReplay({refCount: true, bufferSize: 1})).subscribe();
|
||||
// On load, make an initial call for valid license
|
||||
this.accountService.hasValidLicense().subscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,7 +277,6 @@ export class CardItemComponent implements OnInit {
|
|||
});
|
||||
|
||||
this.download$ = this.downloadService.activeDownloads$.pipe(takeUntilDestroyed(this.destroyRef), map((events) => {
|
||||
console.log('Card Item download obv called for entity: ', this.entity);
|
||||
return this.downloadService.mapToEntityType(events, this.entity);
|
||||
}));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export class EventsWidgetComponent implements OnInit, OnDestroy {
|
|||
|
||||
activeEvents: number = 0;
|
||||
|
||||
debugMode: boolean = true;
|
||||
debugMode: boolean = false;
|
||||
|
||||
protected readonly EVENTS = EVENTS;
|
||||
|
||||
|
|
|
|||
|
|
@ -692,16 +692,6 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
|
|||
}
|
||||
}
|
||||
|
||||
// loadRecommendations() {
|
||||
// this.seriesService.getRecommendationsForSeries(this.seriesId).subscribe(rec => {
|
||||
// rec.ownedSeries.map(r => {
|
||||
// this.seriesService.getMetadata(r.id).subscribe(m => r.summary = m.summary);
|
||||
// });
|
||||
// this.combinedRecs = [...rec.ownedSeries, ...rec.externalSeries];
|
||||
// this.hasRecommendations = this.combinedRecs.length > 0;
|
||||
// this.cdRef.markForCheck();
|
||||
// });
|
||||
// }
|
||||
|
||||
loadPlusMetadata(seriesId: number) {
|
||||
this.metadataService.getSeriesMetadataFromPlus(seriesId).subscribe(data => {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
<i class="fa-solid fa-circle-check ms-1 confirm-icon" aria-hidden="true" [ngbTooltip]="t('token-valid')"></i>
|
||||
<span class="visually-hidden">{{t('token-valid')}}</span>
|
||||
} @else {
|
||||
<i class="fa-solid fa-circle ms-1 confirm-icon error" aria-hidden="true" [ngbTooltip]="t('token-not-valid')"></i>
|
||||
<span class="visually-hidden">{{t('token-not-valid')}}</span>
|
||||
<i class="fa-solid fa-circle ms-1 confirm-icon error" aria-hidden="true" [ngbTooltip]="t('token-expired')"></i>
|
||||
<span class="visually-hidden">{{t('token-expired')}}</span>
|
||||
}
|
||||
</h4>
|
||||
|
||||
|
|
|
|||
|
|
@ -436,8 +436,10 @@
|
|||
}
|
||||
|
||||
@defer (when tab.fragment === FragmentID.Scrobbling; prefetch on idle) {
|
||||
<app-user-scrobble-history></app-user-scrobble-history>
|
||||
<app-user-holds></app-user-holds>
|
||||
@if(hasActiveLicense) {
|
||||
<app-user-scrobble-history></app-user-scrobble-history>
|
||||
<app-user-holds></app-user-holds>
|
||||
}
|
||||
}
|
||||
</ng-template>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -81,6 +81,19 @@ enum FragmentID {
|
|||
})
|
||||
export class UserPreferencesComponent implements OnInit, OnDestroy {
|
||||
|
||||
private readonly destroyRef = inject(DestroyRef);
|
||||
private readonly accountService = inject(AccountService);
|
||||
private readonly toastr = inject(ToastrService);
|
||||
private readonly bookService = inject(BookService);
|
||||
private readonly titleService = inject(Title);
|
||||
private readonly route = inject(ActivatedRoute);
|
||||
private readonly settingsService = inject(SettingsService);
|
||||
private readonly router = inject(Router);
|
||||
private readonly cdRef = inject(ChangeDetectorRef);
|
||||
private readonly localizationService = inject(LocalizationService);
|
||||
protected readonly AccordionPanelID = AccordionPanelID;
|
||||
protected readonly FragmentID = FragmentID;
|
||||
|
||||
readingDirectionsTranslated = readingDirections.map(this.translatePrefOptions);
|
||||
scalingOptionsTranslated = scalingOptions.map(this.translatePrefOptions);
|
||||
pageSplitOptionsTranslated = pageSplitOptions.map(this.translatePrefOptions);
|
||||
|
|
@ -115,19 +128,9 @@ export class UserPreferencesComponent implements OnInit, OnDestroy {
|
|||
opdsEnabled: boolean = false;
|
||||
opdsUrl: string = '';
|
||||
makeUrl: (val: string) => string = (val: string) => { return this.opdsUrl; };
|
||||
hasActiveLicense = false;
|
||||
|
||||
|
||||
private readonly destroyRef = inject(DestroyRef);
|
||||
private readonly accountService = inject(AccountService);
|
||||
private readonly toastr = inject(ToastrService);
|
||||
private readonly bookService = inject(BookService);
|
||||
private readonly titleService = inject(Title);
|
||||
private readonly route = inject(ActivatedRoute);
|
||||
private readonly settingsService = inject(SettingsService);
|
||||
private readonly router = inject(Router);
|
||||
private readonly cdRef = inject(ChangeDetectorRef);
|
||||
private readonly localizationService = inject(LocalizationService);
|
||||
protected readonly AccordionPanelID = AccordionPanelID;
|
||||
protected readonly FragmentID = FragmentID;
|
||||
|
||||
|
||||
constructor() {
|
||||
|
|
@ -144,9 +147,12 @@ export class UserPreferencesComponent implements OnInit, OnDestroy {
|
|||
this.cdRef.markForCheck();
|
||||
});
|
||||
|
||||
this.accountService.hasValidLicense().subscribe(res => {
|
||||
|
||||
|
||||
this.accountService.hasValidLicense$.pipe(take(1), takeUntilDestroyed(this.destroyRef)).subscribe(res => {
|
||||
if (res) {
|
||||
this.tabs.push({title: 'scrobbling-tab', fragment: FragmentID.Scrobbling});
|
||||
this.hasActiveLicense = true;
|
||||
this.cdRef.markForCheck();
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +165,7 @@ export class UserPreferencesComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
this.cdRef.markForCheck();
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
this.settingsService.getOpdsEnabled().subscribe(res => {
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@
|
|||
"scrobbling-providers": {
|
||||
"title": "Scrobbling Providers",
|
||||
"requires": "This feature requires an active {{product}} license",
|
||||
"token-valid": "Token Valid",
|
||||
"token-expired": "Token Expired",
|
||||
"no-token-set": "No Token Set",
|
||||
"token-set": "Token Set",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import {Injectable} from "@angular/core";
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {Translation, TranslocoLoader} from "@ngneat/transloco";
|
||||
|
||||
import cacheBusting from 'i18n-cache-busting.json'; // allowSyntheticDefaultImports must be true
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class HttpLoader implements TranslocoLoader {
|
||||
|
|
@ -9,6 +9,7 @@ export class HttpLoader implements TranslocoLoader {
|
|||
|
||||
getTranslation(langPath: string) {
|
||||
const tokens = langPath.split('/');
|
||||
return this.http.get<Translation>(`assets/langs/${tokens[tokens.length - 1]}.json`);
|
||||
const langCode = tokens[tokens.length - 1];
|
||||
return this.http.get<Translation>(`assets/langs/${langCode}.json?v=${(cacheBusting as { [key: string]: string })[langCode]}`);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue