mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-27 18:40:39 +00:00
spotlight fix
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
v-if="itemViewType === 'list'"
|
||||
:entry="item"
|
||||
:highlight="true"
|
||||
:mobile-handler="true"
|
||||
@mouseup.stop.native="clickFilter"
|
||||
@dragstart.native="$emit('dragstart')"
|
||||
@drop.native="drop()"
|
||||
|
||||
@@ -23,14 +23,14 @@
|
||||
<FileIconThumbnail v-if="isFile || isVideo || (isImage && !entry.data.attributes.thumbnail)" :entry="entry" class="pr-2" />
|
||||
|
||||
<!--Image thumbnail-->
|
||||
<img v-if="isImage && entry.data.attributes.thumbnail" class="w-12 h-12 rounded ml-0.5" :src="entry.data.attributes.thumbnail" :alt="entry.data.attributes.name" loading="lazy" />
|
||||
<img v-if="isImage && entry.data.attributes.thumbnail" class="w-12 h-12 rounded ml-0.5 object-cover" :src="entry.data.attributes.thumbnail" :alt="entry.data.attributes.name" loading="lazy" />
|
||||
</div>
|
||||
|
||||
<!--Item Info-->
|
||||
<div class="pl-2">
|
||||
|
||||
<!--Item Title-->
|
||||
<b class="block text-sm mb-0.5 hover:underline" ref="name" @input="renameItem" @keydown.delete.stop @click.stop :contenteditable="canEditName">
|
||||
<b class="block text-sm mb-0.5 overflow-ellipsis overflow-hidden hover:underline whitespace-nowrap" style="max-width: 240px" ref="name" @input="renameItem" @keydown.delete.stop @click.stop :contenteditable="canEditName">
|
||||
{{ itemName }}
|
||||
</b>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Mobile item action button-->
|
||||
<div v-if="! isMultiSelectMode" class="block pr-1 flex-grow text-right md:hidden relative">
|
||||
<div v-if="mobileHandler && ! isMultiSelectMode" class="block pr-1 flex-grow text-right md:hidden relative">
|
||||
<div @mousedown.stop="showItemActions" class="absolute right-0 p-4 -mr-4 transform -translate-y-2/4">
|
||||
<MoreVerticalIcon size="16" class="vue-feather text-theme dark-text-theme inline-block transform scale-110" />
|
||||
</div>
|
||||
@@ -84,6 +84,7 @@
|
||||
LinkIcon,
|
||||
},
|
||||
props: [
|
||||
'mobileHandler',
|
||||
'highlight',
|
||||
'entry',
|
||||
],
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<search-icon :class="{'is-hidden': isLoading}" size="22" class="magnify text-theme" />
|
||||
</div>
|
||||
<input v-model="query" @keydown.enter="showSelected" @keydown.meta="proceedToSelect" @keyup.down="onPageDown" @keyup.up="onPageUp" type="text" placeholder="Spotlight search..." ref="searchInput">
|
||||
<input v-model="query" @keydown.enter="showSelected" @keydown.meta="proceedToSelect" @keyup.down="onPageDown" @keyup.up="onPageUp" class="focus:outline-none" type="text" placeholder="Spotlight search..." ref="searchInput">
|
||||
<div v-if="! $isMobile()" class="input-hint">
|
||||
<span class="title keyboard-hint">esc</span>
|
||||
</div>
|
||||
@@ -27,7 +27,8 @@
|
||||
:entry="item"
|
||||
:class="{'is-clicked': i === index}"
|
||||
:highlight="false"
|
||||
@click.native="exit"
|
||||
:mobile-handler="false"
|
||||
@click.native="openItem(item)"
|
||||
/>
|
||||
<div v-if="! $isMobile()" class="input-hint">
|
||||
<span class="title">{{ i === 0 ? '↵' : metaKeyIcon + i}}</span>
|
||||
@@ -100,9 +101,12 @@ export default {
|
||||
}
|
||||
},
|
||||
showSelected() {
|
||||
|
||||
let file = this.results[this.index]
|
||||
|
||||
this.openItem(file)
|
||||
},
|
||||
openItem(file) {
|
||||
|
||||
// Show folder
|
||||
if (file.data.type === 'folder') {
|
||||
this.$router.push({name: 'Files', params: {id: this.results[this.index].data.id}})
|
||||
|
||||
Reference in New Issue
Block a user