feat: preview mobile dropdown
parent
be8683f556
commit
778734419d
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<header v-if="!isEditor">
|
<header v-if="!isEditor && !isPreview">
|
||||||
<div>
|
<div>
|
||||||
<button @click="openSidebar" :aria-label="$t('buttons.toggleSidebar')" :title="$t('buttons.toggleSidebar')" class="action">
|
<button @click="openSidebar" :aria-label="$t('buttons.toggleSidebar')" :title="$t('buttons.toggleSidebar')" class="action">
|
||||||
<i class="material-icons">menu</i>
|
<i class="material-icons">menu</i>
|
||||||
|
@ -108,6 +108,7 @@ export default {
|
||||||
'selectedCount',
|
'selectedCount',
|
||||||
'isFiles',
|
'isFiles',
|
||||||
'isEditor',
|
'isEditor',
|
||||||
|
'isPreview',
|
||||||
'isListing',
|
'isListing',
|
||||||
'isLogged'
|
'isLogged'
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -9,11 +9,17 @@
|
||||||
<span>{{ this.name }}</span>
|
<span>{{ this.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<button @click="openMore" id="more" :aria-label="$t('buttons.more')" :title="$t('buttons.more')" class="action">
|
||||||
|
<i class="material-icons">more_vert</i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div id="dropdown" :class="{ active : showMore }">
|
||||||
<rename-button :disabled="loading" v-if="user.perm.rename"></rename-button>
|
<rename-button :disabled="loading" v-if="user.perm.rename"></rename-button>
|
||||||
<delete-button :disabled="loading" v-if="user.perm.delete"></delete-button>
|
<delete-button :disabled="loading" v-if="user.perm.delete"></delete-button>
|
||||||
<download-button :disabled="loading" v-if="user.perm.download"></download-button>
|
<download-button :disabled="loading" v-if="user.perm.download"></download-button>
|
||||||
<info-button :disabled="loading"></info-button>
|
<info-button :disabled="loading"></info-button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="loading" v-if="loading">
|
<div class="loading" v-if="loading">
|
||||||
<div class="spinner">
|
<div class="spinner">
|
||||||
|
@ -51,6 +57,8 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<div v-show="showMore" @click="resetPrompts" class="overlay"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -109,6 +117,9 @@ export default {
|
||||||
},
|
},
|
||||||
raw () {
|
raw () {
|
||||||
return `${this.previewUrl}&inline=true`
|
return `${this.previewUrl}&inline=true`
|
||||||
|
},
|
||||||
|
showMore () {
|
||||||
|
return this.$store.state.show === 'more'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -189,6 +200,12 @@ export default {
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
openMore () {
|
||||||
|
this.$store.commit('showHover', 'more')
|
||||||
|
},
|
||||||
|
resetPrompts () {
|
||||||
|
this.$store.commit('closeHovers')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ const getters = {
|
||||||
isFiles: state => !state.loading && state.route.name === 'Files',
|
isFiles: state => !state.loading && state.route.name === 'Files',
|
||||||
isListing: (state, getters) => getters.isFiles && state.req.isDir,
|
isListing: (state, getters) => getters.isFiles && state.req.isDir,
|
||||||
isEditor: (state, getters) => getters.isFiles && (state.req.type === 'text' || state.req.type === 'textImmutable'),
|
isEditor: (state, getters) => getters.isFiles && (state.req.type === 'text' || state.req.type === 'textImmutable'),
|
||||||
|
isPreview: state => state.previewMode,
|
||||||
selectedCount: state => state.selected.length,
|
selectedCount: state => state.selected.length,
|
||||||
progress : state => {
|
progress : state => {
|
||||||
if (state.upload.progress.length == 0) {
|
if (state.upload.progress.length == 0) {
|
||||||
|
|
Loading…
Reference in New Issue