mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 00:02:15 +00:00
- fixed more actions in public shared folder
- 'There is nothing' title changed in new folder - Play video after click on full preview - Expanded close cookie disclaimer area - Show fileinfopanel as default - Hidden file icons in DesktopToolbar.vue on ipad landscape - Changed background color in context menu dark mode mobile
This commit is contained in:
@@ -59,7 +59,6 @@
|
||||
|
||||
<CookieDisclaimer/>
|
||||
|
||||
<!--Background vignette-->
|
||||
<Vignette/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -25,22 +25,22 @@
|
||||
<SearchBar/>
|
||||
</div>
|
||||
|
||||
<!--Files controlls-->
|
||||
<!--Creating controls-->
|
||||
<div class="toolbar-button-wrapper" v-if="$checkPermission(['master', 'editor'])">
|
||||
<ToolbarButtonUpload :class="{ 'is-inactive': canUploadInView || !hasCapacity }" :action="$t('actions.upload')"/>
|
||||
<ToolbarButton :class="{ 'is-inactive': canCreateFolderInView }" @click.native="createFolder" source="folder-plus" :action="$t('actions.create_folder')"/>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-button-wrapper" v-if="$checkPermission(['master', 'editor'])">
|
||||
<!--File Controls-->
|
||||
<div class="toolbar-button-wrapper" v-if="$checkPermission(['master', 'editor']) && ! $isMobile()">
|
||||
<ToolbarButton source="move" :class="{ 'is-inactive': canMoveInView }" :action="$t('actions.move')" @click.native="moveItem"/>
|
||||
<ToolbarButton v-if="!$isThisLocation(['public'])" source="share" :class="{ 'is-inactive': canShareInView }" :action="$t('actions.share')" @click.native="shareItem"/>
|
||||
<ToolbarButton source="trash" :class="{ 'is-inactive': canDeleteInView }" :action="$t('actions.delete')" @click.native="deleteItem"/>
|
||||
</div>
|
||||
|
||||
<!--View options-->
|
||||
<!--View Controls-->
|
||||
<div class="toolbar-button-wrapper">
|
||||
<ToolbarButton source="preview-sorting" class="preview-sorting" :action="$t('actions.sorting_view')" :class="{ active: sortingAndPreview }" @click.stop.native="sortingAndPreview = !sortingAndPreview"/>
|
||||
|
||||
<ToolbarButton :action="$t('actions.info_panel')" :class="{ active: fileInfoVisible }" @click.native="$store.dispatch('fileInfoToggle')" source="info"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,72 +1,77 @@
|
||||
<template>
|
||||
<MultiSelected :title="title" :subtitle="subtitle" id="multi-select-ui" v-show="dragged" />
|
||||
<MultiSelected :title="title" :subtitle="subtitle" id="multi-select-ui" v-show="isVisible"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MultiSelected from '@/components/FilesView/MultiSelected'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {events} from '@/bus'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { events } from '@/bus'
|
||||
|
||||
export default {
|
||||
name:"DragUI",
|
||||
components: {MultiSelected},
|
||||
computed: {
|
||||
...mapGetters(['fileInfoDetail']),
|
||||
title(){
|
||||
export default {
|
||||
name: 'DragUI',
|
||||
components: { MultiSelected },
|
||||
computed: {
|
||||
...mapGetters(['fileInfoDetail']),
|
||||
title() {
|
||||
let filesLength = this.fileInfoDetail.length,
|
||||
hasDraggedItem = this.fileInfoDetail.includes(this.draggedItem)
|
||||
|
||||
// Title for multiple selected items
|
||||
if(this.fileInfoDetail.length > 1 && this.fileInfoDetail.includes(this.draggedItem)) {
|
||||
return this.$t('file_detail.selected_multiple')
|
||||
}
|
||||
// Title for multiple selected items
|
||||
if (filesLength > 1 && hasDraggedItem) {
|
||||
return this.$t('file_detail.selected_multiple')
|
||||
}
|
||||
|
||||
// Title for single item
|
||||
if((this.fileInfoDetail.length < 2 || !this.fileInfoDetail.includes(this.draggedItem)) && this.draggedItem ) {
|
||||
return this.draggedItem.name
|
||||
}
|
||||
},
|
||||
subtitle(){
|
||||
// Subtitle for multiple selected items
|
||||
if(this.fileInfoDetail.length > 1 && this.fileInfoDetail.includes(this.draggedItem) ) {
|
||||
return this.fileInfoDetail.length + ' ' + this.$tc('file_detail.items', this.fileInfoDetail.length)
|
||||
}
|
||||
|
||||
if((this.fileInfoDetail.length < 2 || !this.fileInfoDetail.includes(this.draggedItem)) && this.draggedItem) {
|
||||
|
||||
// Subtitle for single folder
|
||||
if(this.draggedItem.type === 'folder') {
|
||||
return this.draggedItem.items == 0 ? this.$t('folder.empty') : this.$tc('folder.item_counts', this.draggedItem.items)
|
||||
}
|
||||
|
||||
// Subtitle for single file
|
||||
if(this.draggedItem !== 'folder' && this.draggedItem.mimetype){
|
||||
return '.'+this.draggedItem.mimetype
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
dragged: false,
|
||||
draggedItem: undefined
|
||||
// Title for single item
|
||||
if ((filesLength < 2 || !hasDraggedItem) && this.draggedItem) {
|
||||
return this.draggedItem.name
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
subtitle() {
|
||||
let filesLength = this.fileInfoDetail.length,
|
||||
hasDraggedItem = this.fileInfoDetail.includes(this.draggedItem)
|
||||
|
||||
// Hnadle Drag & Drop Ghost show
|
||||
|
||||
events.$on('dragstart', (data) => {
|
||||
setTimeout(() => {
|
||||
this.dragged = true
|
||||
}, 50);
|
||||
this.draggedItem = data
|
||||
})
|
||||
events.$on('drop', () => {
|
||||
this.dragged = false
|
||||
})
|
||||
|
||||
// Subtitle for multiple selected items
|
||||
if (filesLength > 1 && hasDraggedItem) {
|
||||
return filesLength + ' ' + this.$tc('file_detail.items', filesLength)
|
||||
}
|
||||
|
||||
if ((filesLength < 2 || !hasDraggedItem) && this.draggedItem) {
|
||||
|
||||
// Subtitle for single folder
|
||||
if (this.draggedItem.type === 'folder') {
|
||||
return this.draggedItem.items == 0 ? this.$t('folder.empty') : this.$tc('folder.item_counts', this.draggedItem.items)
|
||||
}
|
||||
|
||||
// Subtitle for single file
|
||||
if (this.draggedItem !== 'folder' && this.draggedItem.mimetype) {
|
||||
return '.' + this.draggedItem.mimetype
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isVisible: false,
|
||||
draggedItem: undefined
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// Handle Drag & Drop Ghost show
|
||||
events.$on('dragstart', data => {
|
||||
this.draggedItem = data
|
||||
|
||||
setTimeout(() => {
|
||||
this.isVisible = true
|
||||
}, 100)
|
||||
})
|
||||
|
||||
events.$on('drop', () => {
|
||||
this.isVisible = false
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -82,38 +87,44 @@ import {events} from '@/bus'
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 7px 25px 1px rgba(0, 0, 0, 0.12);
|
||||
background:white;
|
||||
/deep/.text{
|
||||
.title {
|
||||
color: $text;
|
||||
}
|
||||
.count {
|
||||
color: $text-muted;
|
||||
}
|
||||
background: white;
|
||||
|
||||
/deep/ .text {
|
||||
.title {
|
||||
color: $text;
|
||||
}
|
||||
/deep/.icon-wrapper {
|
||||
.icon {
|
||||
stroke: $theme;
|
||||
}
|
||||
|
||||
.count {
|
||||
color: $text-muted;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .icon-wrapper {
|
||||
.icon {
|
||||
stroke: $theme;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#multi-select-ui {
|
||||
background: $dark_mode_foreground;
|
||||
/deep/.text {
|
||||
|
||||
/deep/ .text {
|
||||
.title {
|
||||
color: $dark_mode_text_primary;
|
||||
}
|
||||
|
||||
.count {
|
||||
color: $dark_mode_text_secondary;
|
||||
}
|
||||
}
|
||||
/deep/.icon-wrapper {
|
||||
.icon {
|
||||
}
|
||||
|
||||
/deep/ .icon-wrapper {
|
||||
.icon {
|
||||
stroke: $theme;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ export default {
|
||||
}
|
||||
|
||||
.select-box-active {
|
||||
background-color: $text;
|
||||
background-color: $theme;
|
||||
|
||||
.icon {
|
||||
stroke: white;
|
||||
@@ -601,10 +601,10 @@ export default {
|
||||
}
|
||||
|
||||
.select-box-active {
|
||||
background-color: #f4f5f6;
|
||||
background-color: lighten($theme, 5%);
|
||||
|
||||
.icon {
|
||||
stroke: $text;
|
||||
stroke: white;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
<template>
|
||||
<div class="file-wrapper" @click.stop="clickedItem" @dblclick="goToItem" spellcheck="false">
|
||||
<!--List preview-->
|
||||
<div :draggable="canDrag" @dragstart="$emit('dragstart')" @drop="
|
||||
drop()
|
||||
area = false" @dragleave="dragLeave" @dragover.prevent="dragEnter" class="file-item" :class="{'is-clicked' : isClicked , 'no-clicked' : !isClicked && this.$isMobile(), 'is-dragenter': area }">
|
||||
<div
|
||||
:draggable="canDrag"
|
||||
@dragstart="$emit('dragstart')"
|
||||
@drop="drop()"
|
||||
@dragleave="dragLeave"
|
||||
@dragover.prevent="dragEnter"
|
||||
class="file-item" :class="{'is-clicked' : isClicked , 'no-clicked' : !isClicked && this.$isMobile(), 'is-dragenter': area }"
|
||||
>
|
||||
<!-- MultiSelecting for the mobile version -->
|
||||
<transition name="slide-from-left">
|
||||
<div class="check-select" v-if="mobileMultiSelect">
|
||||
@@ -99,7 +104,7 @@ export default {
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
// If folder have set some emoji
|
||||
if(this.data.icon_emoji)
|
||||
return this.data.icon_emoji
|
||||
@@ -161,6 +166,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
drop() {
|
||||
this.area = false
|
||||
events.$emit('drop')
|
||||
},
|
||||
showItemActions() {
|
||||
@@ -358,10 +364,10 @@ export default {
|
||||
}
|
||||
|
||||
.select-box-active {
|
||||
background-color: #f4f5f6;
|
||||
background-color: $theme;
|
||||
|
||||
.icon {
|
||||
stroke: $text;
|
||||
stroke: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -563,10 +569,10 @@ export default {
|
||||
}
|
||||
|
||||
.select-box-active {
|
||||
background-color: lighten($dark_mode_foreground, 10%);
|
||||
background-color: $theme;
|
||||
|
||||
.icon {
|
||||
stroke: $theme;
|
||||
stroke: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<p class="title">{{ fileInfoDetail[0].name }}</p>
|
||||
<span class="file-count"> ({{ showingImageIndex + ' ' + $t('pronouns.of') + ' ' + filteredFiles.length }}) </span>
|
||||
</div>
|
||||
<span id="fast-preview-menu" class="fast-menu-icon" @click.stop="menuOpen" v-if="$checkPermission(['master', 'editor'])">
|
||||
<span id="fast-preview-menu" class="fast-menu-icon" @click.stop="menuOpen" v-if="$checkPermission(['master', 'editor', 'visitor'])">
|
||||
<more-horizontal-icon class="more-icon" size="14"> </more-horizontal-icon>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<audio class="file audio" :class="{ 'file-shadow': !isMobileDevice }" v-if="fileInfoDetail[0].type == 'audio'" :src="currentFile.file_url" controlsList="nodownload" controls></audio>
|
||||
<img v-if="fileInfoDetail[0].type === 'image' && currentFile.thumbnail" class="file" :class="{ 'file-shadow': !isMobileDevice }" id="image" :src="currentFile.file_url" />
|
||||
<div class="video-wrapper" v-if="fileInfoDetail[0].type === 'video' && currentFile.file_url">
|
||||
<video :src="currentFile.file_url" class="video" :class="{ 'file-shadow': !isMobileDevice }" controlsList="nodownload" disablePictureInPicture playsinline controls />
|
||||
<video :src="currentFile.file_url" class="video" :class="{ 'file-shadow': !isMobileDevice }" controlsList="nodownload" disablePictureInPicture playsinline controls autoplay />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -42,7 +42,7 @@ import { events } from '@/bus'
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.options {
|
||||
background: $dark_mode_background;
|
||||
background: $dark_mode_foreground;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="cookie-wrapper" v-if="isVisibleDisclaimer && config.isSaaS">
|
||||
<span class="close-icon">
|
||||
<x-icon @click="closeDisclaimer" size="12"></x-icon>
|
||||
<span @click="closeDisclaimer" class="close-icon">
|
||||
<x-icon size="12"></x-icon>
|
||||
</span>
|
||||
<i18n path="cookie_disclaimer.description" tag="p">
|
||||
<router-link :to="{name: 'DynamicPage', params: {slug: 'cookie-policy'}}">{{ $t('cookie_disclaimer.button') }}</router-link>
|
||||
|
||||
@@ -308,9 +308,9 @@
|
||||
"paginate_info": "Showing 1 - {visible} from {total} records"
|
||||
},
|
||||
"empty_page": {
|
||||
"call_to_action": "Upload File",
|
||||
"description": "Upload some files here easily via upload button",
|
||||
"title": "There is Nothing"
|
||||
"call_to_action": "Upload Files",
|
||||
"description": "Upload some files here easily via upload button.",
|
||||
"title": "Upload Your First File"
|
||||
},
|
||||
"errors": {
|
||||
"capacity_digit": "The storage capacity must be lower than 10 digit number."
|
||||
|
||||
3
resources/js/main.js
vendored
3
resources/js/main.js
vendored
@@ -90,8 +90,9 @@ Vue.use(Helpers);
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
// Handle position of Drag & Drop Ghost
|
||||
document.addEventListener('drag', (event) => {
|
||||
document.addEventListener('drag', event => {
|
||||
let multiSelect = document.getElementById('multi-select-ui')
|
||||
|
||||
multiSelect.style.top = event.clientY + 20 + 'px'
|
||||
multiSelect.style.left = event.clientX + 'px'
|
||||
|
||||
|
||||
2
resources/js/store/modules/app.js
vendored
2
resources/js/store/modules/app.js
vendored
@@ -1,7 +1,7 @@
|
||||
import i18n from '@/i18n/index'
|
||||
|
||||
const defaultState = {
|
||||
fileInfoPanelVisible: localStorage.getItem('file_info_visibility') == 'true' || false,
|
||||
fileInfoPanelVisible: localStorage.getItem('file_info_visibility') == 'true' || true,
|
||||
FilePreviewType: localStorage.getItem('preview_type') || 'list',
|
||||
config: undefined,
|
||||
index: undefined,
|
||||
|
||||
@@ -188,18 +188,6 @@ export default {
|
||||
events.$on('drop', () => {
|
||||
this.dragInProgress = false
|
||||
})
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
// Inquire user about his willing to step back to sign in page
|
||||
if (to.name === 'SignIn') {
|
||||
if (window.confirm(this.$t('alerts.leave_to_sign_in'))) {
|
||||
next()
|
||||
} else {
|
||||
next(false)
|
||||
}
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user