add entry media upload menu

This commit is contained in:
X4Lo committed 2024-08-30 14:25:58 +01:00
1 parent 4c318fb569
commit c46309e458
14 files changed
+616 -2

No files matched your search

@@ -160,6 +160,12 @@
update
</span>
</button>
<button class="btn btn-icon-only-success wh-48" (click)="mediaModal()">
<span class="material-symbols-outlined">
image
</span>
</button>
</div>
<!-- End Interraction buttons -->
</div>
@@ -20,6 +20,7 @@ import { LibraryService } from '../../../core/services/library.service';
import { ToastrService } from 'ngx-toastr';
import { EntrySeen } from '../../../shared/models/entrySeen.model';
import { EpisodeSeenModalComponent } from '../../../shared/components/modals/episode-seen-modal/episode-seen-modal.component';
import { MediaModalComponent } from '../media-modal/media-modal.component';
@Component({
selector: 'app-entry-page',
@@ -205,7 +206,7 @@ export class EntryPageComponent implements OnInit {
// ? from the watchlist, so now we need to refrech libraryService in order to
// ? update the watchlist page
if (this.entry.watchlist) {
this.libraryService.refrechEntries().subscribe();
this.libraryService.refreshEntries().subscribe();
}
}
},
@@ -608,6 +609,26 @@ export class EntryPageComponent implements OnInit {
window.open(poster, '_blank');
}
mediaModal() {
const dialogRef = this.dialog.open(MediaModalComponent, {
width: '800px',
height: '600px',
minHeight: '50%',
panelClass: 'media-dialog-container',
data: {
entry: this.entry,
},
});
dialogRef.afterClosed().subscribe((result) => {
if (result) {
// TODO show notification
} else {
// console.log('Seen dialog was cancelled');
}
});
}
// * getters
get status() {
return this.entry.status;