Add cover lock in metadata edit
This commit is contained in:
+15
-13
@@ -3,9 +3,11 @@
|
||||
<div class="overflow-y-scroll flex-1">
|
||||
|
||||
<div class="flex flex-row w-full gap-4">
|
||||
|
||||
<img [src]="urlHelper.getCoverUrl(metadata.bookId, metadata?.coverUpdatedOn)" alt="Image" width="225"/>
|
||||
|
||||
<div class="flex flex-col items-center gap-4">
|
||||
<img [src]="urlHelper.getCoverUrl(metadata.bookId, metadata?.coverUpdatedOn)" alt="Image" width="225"/>
|
||||
<p-button *ngIf="!metadata['coverLocked']" icon="pi pi-lock-open" [outlined]="true" (onClick)="toggleLock('thumbnailUrl')" severity="success"></p-button>
|
||||
<p-button *ngIf="metadata['coverLocked']" icon="pi pi-lock" [outlined]="true" (onClick)="toggleLock('thumbnailUrl')" severity="warn"></p-button>
|
||||
</div>
|
||||
<div class="flex flex-col flex-grow pl-2">
|
||||
|
||||
<!-- Title and Subtitle -->
|
||||
@@ -152,17 +154,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row w-full gap-4 mt-2 pb-1">
|
||||
<div class="flex flex-col gap-1 w-full">
|
||||
<label for="description">Description</label>
|
||||
<div class="flex justify-between items-center gap-2">
|
||||
<textarea rows="9" pTextarea id="description" formControlName="description" class="w-full"></textarea>
|
||||
<p-button *ngIf="!metadata['descriptionLocked']" icon="pi pi-lock-open" [outlined]="true" (onClick)="toggleLock('description')" severity="success"></p-button>
|
||||
<p-button *ngIf="metadata['descriptionLocked']" icon="pi pi-lock" [outlined]="true" (onClick)="toggleLock('description')" severity="warn"></p-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row w-full pb-1">
|
||||
<div class="flex flex-col gap-1 w-full">
|
||||
<label for="description">Description</label>
|
||||
<div class="flex justify-between items-center gap-2">
|
||||
<textarea rows="12" pTextarea id="description" formControlName="description" class="w-full"></textarea>
|
||||
<p-button *ngIf="!metadata['descriptionLocked']" icon="pi pi-lock-open" [outlined]="true" (onClick)="toggleLock('description')" severity="success"></p-button>
|
||||
<p-button *ngIf="metadata['descriptionLocked']" icon="pi pi-lock" [outlined]="true" (onClick)="toggleLock('description')" severity="warn"></p-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+3
-1
@@ -74,6 +74,7 @@ export class MetadataEditorComponent implements OnInit {
|
||||
seriesNameLocked: new FormControl(false),
|
||||
seriesNumberLocked: new FormControl(false),
|
||||
seriesTotalLocked: new FormControl(false),
|
||||
thumbnailUrlLocked: new FormControl(false),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -116,6 +117,7 @@ export class MetadataEditorComponent implements OnInit {
|
||||
seriesNameLocked: metadata.seriesNameLocked || false,
|
||||
seriesNumberLocked: metadata.seriesNumberLocked || false,
|
||||
seriesTotalLocked: metadata.seriesTotalLocked || false,
|
||||
thumbnailUrlLocked: metadata.coverLocked || false,
|
||||
});
|
||||
|
||||
if (metadata.titleLocked) this.metadataForm.get('title')?.disable();
|
||||
@@ -220,7 +222,7 @@ export class MetadataEditorComponent implements OnInit {
|
||||
seriesNameLocked: this.metadataForm.get('seriesNameLocked')?.value,
|
||||
seriesNumberLocked: this.metadataForm.get('seriesNumberLocked')?.value,
|
||||
seriesTotalLocked: this.metadataForm.get('seriesTotalLocked')?.value,
|
||||
|
||||
coverLocked: this.metadataForm.get('thumbnailUrlLocked')?.value,
|
||||
};
|
||||
return updatedBookMetadata;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user