Polish for Release (#2841)
This commit is contained in:
parent
a76de06087
commit
e6e228c3d9
15 changed files with 46 additions and 36 deletions
|
@ -115,6 +115,7 @@ export class AccountService {
|
|||
}
|
||||
|
||||
hasValidLicense(forceCheck: boolean = false) {
|
||||
console.log('hasValidLicense being called: ', forceCheck);
|
||||
return this.httpClient.get<string>(this.baseUrl + 'license/valid-license?forceCheck=' + forceCheck, TextResonse)
|
||||
.pipe(
|
||||
map(res => res === "true"),
|
||||
|
|
|
@ -49,16 +49,21 @@ export class LicenseComponent implements OnInit {
|
|||
this.formGroup.addControl('licenseKey', new FormControl('', [Validators.required]));
|
||||
this.formGroup.addControl('email', new FormControl('', [Validators.required]));
|
||||
this.formGroup.addControl('discordId', new FormControl('', [Validators.pattern(/\d+/)]));
|
||||
|
||||
this.isChecking = true;
|
||||
this.cdRef.markForCheck();
|
||||
|
||||
this.accountService.hasAnyLicense().subscribe(res => {
|
||||
this.hasLicense = res;
|
||||
this.cdRef.markForCheck();
|
||||
});
|
||||
this.isChecking = true;
|
||||
this.cdRef.markForCheck();
|
||||
this.accountService.hasValidLicense().subscribe(res => {
|
||||
this.hasValidLicense = res;
|
||||
this.isChecking = false;
|
||||
this.cdRef.markForCheck();
|
||||
|
||||
if (this.hasLicense) {
|
||||
this.accountService.hasValidLicense().subscribe(res => {
|
||||
this.hasValidLicense = res;
|
||||
this.isChecking = false;
|
||||
this.cdRef.markForCheck();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<input width="100%" #title ngbAutofocus type="text" class="form-control mb-2" id="add-rlist" formControlName="title">
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<button type="submit" class="btn btn-primary" (click)="create()">{{t('create')}}</button>
|
||||
<button type="submit" class="btn btn-primary" [disabled]="isCreating" (click)="create()">{{t('create')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -48,6 +48,7 @@ export class BulkAddToCollectionComponent implements OnInit, AfterViewInit {
|
|||
*/
|
||||
lists: Array<UserCollection> = [];
|
||||
loading: boolean = false;
|
||||
isCreating: boolean = false;
|
||||
listForm: FormGroup = new FormGroup({});
|
||||
|
||||
ngOnInit(): void {
|
||||
|
@ -77,9 +78,13 @@ export class BulkAddToCollectionComponent implements OnInit, AfterViewInit {
|
|||
}
|
||||
|
||||
create() {
|
||||
if (this.isCreating) return;
|
||||
const tagName = this.listForm.value.title;
|
||||
this.isCreating = true;
|
||||
this.cdRef.markForCheck();
|
||||
this.collectionService.addByMultiple(0, this.seriesIds, tagName).subscribe(() => {
|
||||
this.toastr.success(translate('toasts.series-added-to-collection', {collectionName: tagName}));
|
||||
this.isCreating = false;
|
||||
this.modal.close();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -299,8 +299,8 @@ export class MetadataFilterRowComponent implements OnInit {
|
|||
case FilterField.Penciller: return this.getPersonOptions(PersonRole.Penciller);
|
||||
case FilterField.Publisher: return this.getPersonOptions(PersonRole.Publisher);
|
||||
case FilterField.Imprint: return this.getPersonOptions(PersonRole.Imprint);
|
||||
case FilterField.Team: return this.getPersonOptions(PersonRole.Imprint);
|
||||
case FilterField.Location: return this.getPersonOptions(PersonRole.Imprint);
|
||||
case FilterField.Team: return this.getPersonOptions(PersonRole.Team);
|
||||
case FilterField.Location: return this.getPersonOptions(PersonRole.Location);
|
||||
case FilterField.Translators: return this.getPersonOptions(PersonRole.Translator);
|
||||
case FilterField.Writers: return this.getPersonOptions(PersonRole.Writer);
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
<div>{{t('no-data')}}</div>
|
||||
} @else {
|
||||
<ngb-progressbar-stacked>
|
||||
<ngb-progressbar type="danger" [value]="errorPercent" [ngbTooltip]="t('errored-series-label') + ' ' + breakdown.erroredSeries"></ngb-progressbar>
|
||||
<ngb-progressbar type="success" [value]="completedPercent" [ngbTooltip]="t('completed-series-label') + ' ' + breakdown.seriesCompleted"></ngb-progressbar>
|
||||
<ngb-progressbar type="danger" [showValue]="true" [value]="errorPercent" [ngbTooltip]="t('errored-series-label') + ' ' + breakdown.erroredSeries"></ngb-progressbar>
|
||||
<ngb-progressbar type="success" [showValue]="true" [value]="completedPercent" [ngbTooltip]="t('completed-series-label') + ' ' + breakdown.seriesCompleted"></ngb-progressbar>
|
||||
</ngb-progressbar-stacked>
|
||||
@if (breakdown.seriesCompleted >= breakdown.totalSeries) {
|
||||
<p>{{t('complete') }}
|
||||
|
|
|
@ -60,7 +60,7 @@ export class ManageScrobblingProvidersComponent implements OnInit {
|
|||
loaded: boolean = false;
|
||||
|
||||
constructor() {
|
||||
this.accountService.hasValidLicense().subscribe(res => {
|
||||
this.accountService.hasValidLicense$.subscribe(res => {
|
||||
this.hasValidLicense = res;
|
||||
this.cdRef.markForCheck();
|
||||
if (this.hasValidLicense) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue