mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
open searched file from spotlight in FilePreview
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
- If adsense banner location isn't filled, the ads space won't be showed
|
||||
- Fixed issue when in grid view you tried to move image into another folder
|
||||
- Fixed issue when you can't move or delete items via mobile multiselect function
|
||||
- You can now open searched file from spotlight in FilePreview mode to access file settings and functions
|
||||
|
||||
## Version 2.0.14
|
||||
#### Release date: 5. April 2022
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'version' => '2.0.14',
|
||||
'version' => '2.0.15',
|
||||
|
||||
'is_demo' => env('APP_DEMO', false),
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"/js/main.js": "/js/main.js",
|
||||
"/chunks/request.js": "/chunks/request.js?id=2f43ec2bb19876d4",
|
||||
"/chunks/request-upload.js": "/chunks/request-upload.js?id=9d36f99397dfbfe7",
|
||||
"/chunks/request.js": "/chunks/request.js?id=bb0e138b9f190b89",
|
||||
"/chunks/request-upload.js": "/chunks/request-upload.js?id=54fed02f6ced4685",
|
||||
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=19a0784e59d768ec",
|
||||
"/chunks/status-check.js": "/chunks/status-check.js?id=f82f9939c1326fe2",
|
||||
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=df5bd89528649783",
|
||||
@@ -9,13 +9,13 @@
|
||||
"/chunks/environment.js": "/chunks/environment.js?id=166cd302ba7338ae",
|
||||
"/chunks/app-setup.js": "/chunks/app-setup.js?id=15938ff1ad2d6ed2",
|
||||
"/chunks/admin-account.js": "/chunks/admin-account.js?id=916450217130f3b8",
|
||||
"/chunks/shared.js": "/chunks/shared.js?id=e65e38133f6111e1",
|
||||
"/chunks/shared/browser.js": "/chunks/shared/browser.js?id=e252d9d8ff7e90c9",
|
||||
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=83a29818c408b4de",
|
||||
"/chunks/shared.js": "/chunks/shared.js?id=fa0aa086699172e1",
|
||||
"/chunks/shared/browser.js": "/chunks/shared/browser.js?id=843bc2d059e81de4",
|
||||
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=e907fd044a0d31bf",
|
||||
"/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=672e931a9fb0b672",
|
||||
"/chunks/not-found.js": "/chunks/not-found.js?id=9f6ce23ce5d969f1",
|
||||
"/chunks/temporary-unavailable.js": "/chunks/temporary-unavailable.js?id=f564565faa09d6d6",
|
||||
"/chunks/admin.js": "/chunks/admin.js?id=ec3050408acd4415",
|
||||
"/chunks/admin.js": "/chunks/admin.js?id=e02ede51e45f7813",
|
||||
"/chunks/dashboard.js": "/chunks/dashboard.js?id=a41b0f486b1f8d36",
|
||||
"/chunks/invoices.js": "/chunks/invoices.js?id=1416cbf6d1a593ac",
|
||||
"/chunks/subscriptions.js": "/chunks/subscriptions.js?id=5bf6704f5b599f36",
|
||||
@@ -57,18 +57,18 @@
|
||||
"/chunks/sign-up.js": "/chunks/sign-up.js?id=bb92bad614e60d45",
|
||||
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=50a1bc5e4ed86ec9",
|
||||
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=f652de052dba55c1",
|
||||
"/chunks/settings.js": "/chunks/settings.js?id=90b6340469c950d8",
|
||||
"/chunks/settings.js": "/chunks/settings.js?id=5768cb763e66f11a",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=0eca231475e267ab",
|
||||
"/chunks/settings-password.js": "/chunks/settings-password.js?id=3755d41eaf50a5b1",
|
||||
"/chunks/settings-storage.js": "/chunks/settings-storage.js?id=994b669a56fd417b",
|
||||
"/chunks/billing.js": "/chunks/billing.js?id=40e758c87bcf6e89",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=46be2cb036e63cb9",
|
||||
"/chunks/files.js": "/chunks/files.js?id=337db6462c828af4",
|
||||
"/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=a072d7081a0f48a1",
|
||||
"/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=38912afeb4e4c733",
|
||||
"/chunks/trash.js": "/chunks/trash.js?id=b94ddc072e787b30",
|
||||
"/chunks/team-folders.js": "/chunks/team-folders.js?id=4cde9804a042eb10",
|
||||
"/chunks/shared-with-me.js": "/chunks/shared-with-me.js?id=b73ccd51d4913073",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=1b39b72c0f800081",
|
||||
"/chunks/files.js": "/chunks/files.js?id=99230d6e76d78e5f",
|
||||
"/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=8ba6e0814135b24a",
|
||||
"/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=c0ff62b58694657e",
|
||||
"/chunks/trash.js": "/chunks/trash.js?id=d0db7e83583ff0df",
|
||||
"/chunks/team-folders.js": "/chunks/team-folders.js?id=c52ff8e50d41546c",
|
||||
"/chunks/shared-with-me.js": "/chunks/shared-with-me.js?id=3d220840e64a50a0",
|
||||
"/chunks/invitation.js": "/chunks/invitation.js?id=9ed8456c9d6d5ce1",
|
||||
"/css/tailwind.css": "/css/tailwind.css",
|
||||
"/css/app.css": "/css/app.css"
|
||||
|
||||
@@ -13,14 +13,17 @@
|
||||
|
||||
<!--Desktop preview-->
|
||||
<div
|
||||
v-if="(!$isMobile() || fastPreview) && (isAudio || isImage || isVideo || isPDF)"
|
||||
v-if="!$isMobile() || fastPreview"
|
||||
class="flex h-full w-full items-center justify-center"
|
||||
>
|
||||
<!--Show File-->
|
||||
<ItemGrid v-if="isFile && !isPDF" :entry="currentFile" :mobile-handler="false" :can-hover="false"/>
|
||||
|
||||
<!--Show PDF-->
|
||||
<PdfFile v-if="isPDF" :file="currentFile" />
|
||||
<PdfFile v-if="isFile && isPDF" :file="currentFile" />
|
||||
|
||||
<!--Show Audio, Video and Image-->
|
||||
<div class="flex h-full w-full items-center justify-center">
|
||||
<div v-if="isAudio || isImage || isVideo" class="flex h-full w-full items-center justify-center">
|
||||
<Audio v-if="isAudio" :file="currentFile" />
|
||||
<Video v-if="isVideo" :file="currentFile" class="mx-auto max-h-full max-w-[1080px] self-center" />
|
||||
<ImageFile v-if="isImage" :file="currentFile" class="mx-auto max-h-[100%] max-w-[100%] self-center" :class="{'file-shadow': !$isMobile()}" id="printable-file" />
|
||||
@@ -53,6 +56,7 @@
|
||||
<script>
|
||||
import { ChevronLeftIcon, ChevronRightIcon } from 'vue-feather-icons'
|
||||
import ToolbarButton from '../FilesView/ToolbarButton'
|
||||
import ItemGrid from "../FilesView/ItemGrid"
|
||||
import ImageFile from './Media/ImageFile'
|
||||
import Audio from './Media/Audio'
|
||||
import Video from './Media/Video'
|
||||
@@ -68,6 +72,7 @@ export default {
|
||||
ChevronLeftIcon,
|
||||
ToolbarButton,
|
||||
ImageFile,
|
||||
ItemGrid,
|
||||
Spinner,
|
||||
Audio,
|
||||
Video,
|
||||
@@ -77,6 +82,9 @@ export default {
|
||||
currentFile() {
|
||||
return this.fastPreview ? this.fastPreview : this.files[Math.abs(this.currentIndex) % this.files.length]
|
||||
},
|
||||
isFile() {
|
||||
return this.currentFile.data.type === 'file'
|
||||
},
|
||||
isPDF() {
|
||||
return this.currentFile.data.attributes.mimetype === 'pdf'
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{
|
||||
'bg-light-background dark:bg-dark-foreground': isClicked,
|
||||
'bg-light-background dark:bg-dark-foreground': isClicked && canHover,
|
||||
'dark:hover:bg-dark-foreground lg:hover:bg-light-background': canHover,
|
||||
}"
|
||||
class="relative z-0 flex h-48 select-none flex-wrap items-center justify-center rounded-lg border-2 border-dashed border-transparent px-1 pt-2 text-center sm:h-56 lg:h-60"
|
||||
@@ -241,9 +241,6 @@ export default {
|
||||
}, 300),
|
||||
},
|
||||
created() {
|
||||
// Set item name to own component variable
|
||||
this.itemName = this.entry.data.attributes.name
|
||||
|
||||
// Change item name
|
||||
events.$on('change:name', (item) => {
|
||||
if (this.entry.data.id === item.id) this.itemName = item.name
|
||||
@@ -257,7 +254,12 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
this.getImageSrc()
|
||||
// Set item name to own component variable
|
||||
this.itemName = this.entry.data.attributes.name
|
||||
|
||||
if (this.entry.data.type === 'image') {
|
||||
this.getImageSrc()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -853,18 +853,13 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
// Show file
|
||||
if (file.data.type !== 'folder') {
|
||||
// Show file
|
||||
if (['video', 'audio', 'image'].includes(file.data.type) || file.data.attributes.mimetype === 'pdf') {
|
||||
this.$store.commit('ADD_TO_FAST_PREVIEW', file)
|
||||
this.$store.commit('ADD_TO_FAST_PREVIEW', file)
|
||||
this.$store.commit('CLIPBOARD_REPLACE', file)
|
||||
|
||||
events.$emit('file-preview:show')
|
||||
} else {
|
||||
this.$downloadFile(
|
||||
file.data.attributes.file_url,
|
||||
file.data.attributes.name + '.' + file.data.attributes.mimetype
|
||||
)
|
||||
}
|
||||
// Show file thumbnail
|
||||
events.$emit('file-preview:show')
|
||||
}
|
||||
|
||||
this.exitSpotlight()
|
||||
|
||||
Reference in New Issue
Block a user