viewer: disable unused buttons in nx
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/head
parent
bad7610ead
commit
6642e0c577
|
@ -55,7 +55,7 @@
|
||||||
<template #icon> <LivePhotoIcon :size="24" /> </template>
|
<template #icon> <LivePhotoIcon :size="24" /> </template>
|
||||||
</NcActionButton>
|
</NcActionButton>
|
||||||
<NcActionButton
|
<NcActionButton
|
||||||
v-if="!routeIsPublic"
|
v-if="!routeIsPublic && !isLocal"
|
||||||
:aria-label="t('memories', 'Favorite')"
|
:aria-label="t('memories', 'Favorite')"
|
||||||
@click="favoriteCurrent"
|
@click="favoriteCurrent"
|
||||||
:close-after-click="true"
|
:close-after-click="true"
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
:aria-label="t('memories', 'Download')"
|
:aria-label="t('memories', 'Download')"
|
||||||
@click="downloadCurrent"
|
@click="downloadCurrent"
|
||||||
:close-after-click="true"
|
:close-after-click="true"
|
||||||
v-if="!this.state_noDownload"
|
v-if="!this.state_noDownload && !isLocal"
|
||||||
>
|
>
|
||||||
{{ t('memories', 'Download') }}
|
{{ t('memories', 'Download') }}
|
||||||
<template #icon>
|
<template #icon>
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
</template>
|
</template>
|
||||||
</NcActionButton>
|
</NcActionButton>
|
||||||
<NcActionButton
|
<NcActionButton
|
||||||
v-if="!routeIsPublic && !routeIsAlbum"
|
v-if="!routeIsPublic && !routeIsAlbum && !isLocal"
|
||||||
:aria-label="t('memories', 'View in folder')"
|
:aria-label="t('memories', 'View in folder')"
|
||||||
@click="viewInFolder"
|
@click="viewInFolder"
|
||||||
:close-after-click="true"
|
:close-after-click="true"
|
||||||
|
@ -310,6 +310,11 @@ export default defineComponent({
|
||||||
return Boolean(this.currentPhoto?.liveid);
|
return Boolean(this.currentPhoto?.liveid);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** Is the current slide a local photo */
|
||||||
|
isLocal(): boolean {
|
||||||
|
return Boolean((this.currentPhoto?.flag ?? 0) & this.c.FLAG_IS_LOCAL);
|
||||||
|
},
|
||||||
|
|
||||||
/** Show bottom bar info such as date taken */
|
/** Show bottom bar info such as date taken */
|
||||||
showBottomBar(): boolean {
|
showBottomBar(): boolean {
|
||||||
return !this.isVideo && this.fullyOpened && Boolean(this.currentPhoto?.imageInfo);
|
return !this.isVideo && this.fullyOpened && Boolean(this.currentPhoto?.imageInfo);
|
||||||
|
@ -774,7 +779,7 @@ export default defineComponent({
|
||||||
// Get full image URL
|
// Get full image URL
|
||||||
const fullUrl = isvideo
|
const fullUrl = isvideo
|
||||||
? null
|
? null
|
||||||
: photo.flag & this.c.FLAG_IS_LOCAL
|
: this.isLocal
|
||||||
? nativex.API.IMAGE_FULL(photo.fileid)
|
? nativex.API.IMAGE_FULL(photo.fileid)
|
||||||
: API.IMAGE_DECODABLE(photo.fileid, photo.etag);
|
: API.IMAGE_DECODABLE(photo.fileid, photo.etag);
|
||||||
const fullLoadCond = this.config.full_res_always ? 'always' : this.config.full_res_on_zoom ? 'zoom' : 'never';
|
const fullLoadCond = this.config.full_res_always ? 'always' : this.config.full_res_on_zoom ? 'zoom' : 'never';
|
||||||
|
@ -962,7 +967,7 @@ export default defineComponent({
|
||||||
globalThis.mSidebar.setTab('memories-metadata');
|
globalThis.mSidebar.setTab('memories-metadata');
|
||||||
photo ??= this.currentPhoto!;
|
photo ??= this.currentPhoto!;
|
||||||
|
|
||||||
if (this.routeIsPublic || Boolean(photo.flag & this.c.FLAG_IS_LOCAL)) {
|
if (this.routeIsPublic || this.isLocal) {
|
||||||
globalThis.mSidebar.open(photo);
|
globalThis.mSidebar.open(photo);
|
||||||
} else {
|
} else {
|
||||||
const fileInfo = (await dav.getFiles([photo]))[0];
|
const fileInfo = (await dav.getFiles([photo]))[0];
|
||||||
|
|
Loading…
Reference in New Issue