mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-26 02:20:39 +00:00
first commit Multi restore in trash, focus on the new folder name
This commit is contained in:
@@ -30,10 +30,12 @@
|
||||
<OptionGroup v-if="item && multiSelectContextMenu">
|
||||
<Option @click.native="ItemDetail" :title="$t('context_menu.detail')" icon="detail"/>
|
||||
<Option @click.native="downloadItem" v-if="!isFolder" :title="$t('context_menu.download')" icon="download"/>
|
||||
<Option @click.native="downloadFolder" :title="$t('context_menu.zip_folder')" icon="zip-folder"/>
|
||||
</OptionGroup>
|
||||
|
||||
<!-- Multi options -->
|
||||
<OptionGroup v-if="!multiSelectContextMenu">
|
||||
<Option @click.native="restoreItem" v-if="item" :title="$t('context_menu.restore')" icon="restore"/>
|
||||
<Option @click.native="deleteItem" :title="$t('context_menu.delete')" icon="trash"/>
|
||||
<Option @click.native="emptyTrash" :title="$t('context_menu.empty_trash')" icon="empty-trash"/>
|
||||
</OptionGroup>
|
||||
@@ -62,6 +64,7 @@
|
||||
<OptionGroup v-if="item && multiSelectContextMenu">
|
||||
<Option @click.native="ItemDetail" :title="$t('context_menu.detail')" icon="detail"/>
|
||||
<Option @click.native="downloadItem" v-if="!isFolder" :title="$t('context_menu.download')" icon="download"/>
|
||||
<Option @click.native="downloadFolder" v-if="isFolder" :title="$t('context_menu.zip_folder')" icon="zip-folder"/>
|
||||
</OptionGroup>
|
||||
|
||||
<!-- Multi options -->
|
||||
@@ -106,6 +109,7 @@
|
||||
<OptionGroup v-if="item && multiSelectContextMenu ">
|
||||
<Option @click.native="ItemDetail" :title="$t('context_menu.detail')" icon="detail"/>
|
||||
<Option @click.native="downloadItem" v-if="!isFolder" :title="$t('context_menu.download')" icon="download"/>
|
||||
<Option @click.native="downloadFolder" v-if="isFolder" :title="$t('context_menu.zip_folder')" icon="zip-folder"/>
|
||||
</OptionGroup>
|
||||
|
||||
<!-- Multi options -->
|
||||
@@ -143,6 +147,7 @@
|
||||
<OptionGroup v-if="item && multiSelectContextMenu">
|
||||
<Option @click.native="ItemDetail" :title="$t('context_menu.detail')" icon="detail"/>
|
||||
<Option @click.native="downloadItem" v-if="!isFolder" :title="$t('context_menu.download')" icon="download"/>
|
||||
<Option @click.native="downloadFolder" v-if="isFolder" :title="$t('context_menu.zip_folder')" icon="zip-folder"/>
|
||||
</OptionGroup>
|
||||
|
||||
<!-- Multi options -->
|
||||
@@ -167,6 +172,7 @@
|
||||
<OptionGroup v-if="item && multiSelectContextMenu">
|
||||
<Option @click.native="ItemDetail" :title="$t('context_menu.detail')" icon="detail"/>
|
||||
<Option @click.native="downloadItem" v-if="!isFolder" :title="$t('context_menu.download')" icon="download"/>
|
||||
<Option @click.native="downloadFolder" v-if="isFolder" :title="$t('context_menu.zip_folder')" icon="zip-folder"/>
|
||||
</OptionGroup>
|
||||
|
||||
<!-- Multi options -->
|
||||
@@ -250,11 +256,21 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
downloadFolder(){
|
||||
this.$store.dispatch('downloadFolder' , this.item)
|
||||
},
|
||||
emptyTrash() {
|
||||
this.$store.dispatch('emptyTrash')
|
||||
},
|
||||
restoreItem() {
|
||||
this.$store.dispatch('restoreItem', this.item)
|
||||
|
||||
// If is item not in selected items restore just this single item
|
||||
if(!this.fileInfoDetail.includes(this.item))
|
||||
this.$store.dispatch('restoreItem', this.item)
|
||||
|
||||
// If is item in selected items restore all items from fileInfoDetail
|
||||
if(this.fileInfoDetail.includes(this.item))
|
||||
this.$store.dispatch('restoreItem', null)
|
||||
},
|
||||
shareCancel() {
|
||||
this.$store.dispatch('shareCancel')
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<!--Name-->
|
||||
<div class="item-name">
|
||||
<!--Name-->
|
||||
<b ref="name" @input="renameItem" @keydown.delete.stop :contenteditable="canEditName" class="name">
|
||||
<b :ref="this.data.unique_id" @input="renameItem" @keydown.delete.stop :contenteditable="canEditName" class="name">
|
||||
{{ itemName }}
|
||||
</b>
|
||||
|
||||
@@ -263,6 +263,14 @@ export default {
|
||||
created() {
|
||||
this.itemName = this.data.name
|
||||
|
||||
events.$on('newFolder:focus', (unique_id) => {
|
||||
|
||||
if(this.data.unique_id == unique_id) {
|
||||
this.$refs[unique_id].focus()
|
||||
document.execCommand('selectAll')
|
||||
}
|
||||
})
|
||||
|
||||
events.$on('mobileSelecting:start', () => {
|
||||
this.multiSelectMode = true
|
||||
this.$store.commit('CLEAR_FILEINFO_DETAIL')
|
||||
|
||||
@@ -28,11 +28,13 @@
|
||||
|
||||
<!--Else show only folder icon-->
|
||||
<FontAwesomeIcon v-if="isFolder" :class="{ 'is-deleted': isDeleted }" class="folder-icon" icon="folder"/>
|
||||
<!-- <div v-if="isFolder" :class="{ 'is-deleted': isDeleted }" class="folder-icon">🐢</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<!--Name-->
|
||||
<div class="item-name">
|
||||
<b ref="name" @input="renameItem" @keydown.delete.stop :contenteditable="canEditName" class="name">
|
||||
<b :ref="this.data.unique_id" @input="renameItem" @keydown.delete.stop :contenteditable="canEditName" class="name">
|
||||
{{ itemName }}
|
||||
</b>
|
||||
|
||||
@@ -263,6 +265,14 @@ export default {
|
||||
created() {
|
||||
this.itemName = this.data.name
|
||||
|
||||
events.$on('newFolder:focus', (unique_id) => {
|
||||
|
||||
if(this.data.unique_id == unique_id) {
|
||||
this.$refs[unique_id].focus()
|
||||
document.execCommand('selectAll')
|
||||
}
|
||||
})
|
||||
|
||||
events.$on('mobileSelecting:start', () => {
|
||||
this.mobileMultiSelect = true
|
||||
this.$store.commit('CLEAR_FILEINFO_DETAIL')
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<star-icon v-if="icon === 'favourites'" size="17"></star-icon>
|
||||
<folder-plus-icon v-if="icon === 'create-folder'" size="17"></folder-plus-icon>
|
||||
<smile-icon v-if="icon === 'no-options'" size="17"></smile-icon>
|
||||
<paperclip-icon v-if="icon === 'zip-folder'" size="17"></paperclip-icon>
|
||||
</div>
|
||||
<div class="text-label">
|
||||
{{ title }}
|
||||
@@ -24,6 +25,7 @@ import {
|
||||
CornerDownRightIcon,
|
||||
DownloadCloudIcon,
|
||||
FolderPlusIcon,
|
||||
PaperclipIcon,
|
||||
LifeBuoyIcon,
|
||||
Trash2Icon,
|
||||
Edit2Icon,
|
||||
@@ -41,6 +43,7 @@ import {
|
||||
CornerDownRightIcon,
|
||||
DownloadCloudIcon,
|
||||
FolderPlusIcon,
|
||||
PaperclipIcon,
|
||||
LifeBuoyIcon,
|
||||
Trash2Icon,
|
||||
SmileIcon,
|
||||
|
||||
@@ -84,8 +84,6 @@ export default {
|
||||
|
||||
this.filter.field = field
|
||||
|
||||
console.log(this.filter);
|
||||
|
||||
// Set sorting direction
|
||||
if (this.filter.sort === 'DESC')
|
||||
this.filter.sort = 'ASC'
|
||||
|
||||
Reference in New Issue
Block a user