mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-17 19:01:29 +03:00
Improved UX in share dialog and video info dialog
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<h4 mat-dialog-title>
|
||||
{{file.title}}
|
||||
<div class="favorite-button">
|
||||
<button mat-icon-button (click)="editing = !editing"><mat-icon>edit</mat-icon></button>
|
||||
<button [disabled]="!initialized || retrieving_file" (click)="toggleFavorite()" mat-icon-button ><mat-icon>{{file.favorite ? 'favorite_filled' : 'favorite_outline'}}</mat-icon></button>
|
||||
<button [disabled]="!initialized || retrieving_file || !write_access" mat-icon-button (click)="editing = !editing"><mat-icon>edit</mat-icon></button>
|
||||
<button [disabled]="!initialized || retrieving_file || !write_access" (click)="toggleFavorite()" mat-icon-button ><mat-icon>{{file.favorite ? 'favorite_filled' : 'favorite_outline'}}</mat-icon></button>
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ export class VideoInfoDialogComponent implements OnInit {
|
||||
editing = false;
|
||||
initialized = false;
|
||||
retrieving_file = false;
|
||||
write_access = false;
|
||||
|
||||
constructor(@Inject(MAT_DIALOG_DATA) public data: any, public postsService: PostsService, private datePipe: DatePipe) { }
|
||||
|
||||
@@ -29,6 +30,7 @@ export class VideoInfoDialogComponent implements OnInit {
|
||||
this.initializeFile(this.data.file);
|
||||
}
|
||||
this.postsService.reloadCategories();
|
||||
this.write_access = !this.file.user_uid || (this.file.user_uid && this.postsService.user?.uid === this.file.user_uid);
|
||||
}
|
||||
|
||||
initializeFile(file: DatabaseFile): void {
|
||||
|
||||
Reference in New Issue
Block a user