diff --git a/src/components/viewer/Viewer.vue b/src/components/viewer/Viewer.vue index a5e294a3..3c665258 100644 --- a/src/components/viewer/Viewer.vue +++ b/src/components/viewer/Viewer.vue @@ -37,7 +37,7 @@ @@ -334,15 +334,21 @@ export default defineComponent({ : null; }, - /** Allow opening editor */ + /** Show edit buttons */ canEdit(): boolean { return ( this.currentPhoto?.mimetype?.startsWith("image/") && - !this.currentPhoto.liveid + !this.currentPhoto.liveid && + this.currentPhoto.imageInfo?.permissions?.includes("U") ); }, - /** Does the browser support native share API */ + /** Show delete button */ + canDelete(): boolean { + return this.currentPhoto?.imageInfo?.permissions?.includes("D"); + }, + + /** Show share button */ canShare(): boolean { return "share" in navigator && this.currentPhoto && !this.isVideo; },