mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
added Toggle Grid/List View into the spotlight
This commit is contained in:
@@ -742,7 +742,7 @@ return [
|
||||
'actions.create' => 'Create Something',
|
||||
'actions.search' => 'Search',
|
||||
'mobile.create' => 'Create',
|
||||
'popup.share.email_send' => 'Send on Emails',
|
||||
'popup.share.email_send' => 'Send link to Email',
|
||||
'popup.share.email_description' => 'Send your share link via email to many recipients.',
|
||||
'expiration' => 'Expiration',
|
||||
'popup.share.expiration_description' => 'Your link expire after exact period of time.',
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~1bec6fe4.js": "/chunks/admin~chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~1bec6fe4.js?id=510e6c1b1017a73a40a6",
|
||||
"/chunks/admin~chunks/platform.js": "/chunks/admin~chunks/platform.js?id=e23cd3fcc8a45280c9fd",
|
||||
"/chunks/admin~chunks/platform~chunks/settings.js": "/chunks/admin~chunks/platform~chunks/settings.js?id=30e106dacad45945a1f8",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js?id=9f2fc778d6c68a438c5b",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.js?id=412a25b3f34e919a2a63",
|
||||
"/chunks/admin~chunks/platform~chunks/shared.js": "/chunks/admin~chunks/platform~chunks/shared.js?id=afeba4ebd13af7e995be",
|
||||
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=e4bd3e51dbb74e894be3",
|
||||
"/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~217928f6.js": "/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~217928f6.js?id=9c4d17d768dc543a0e4b",
|
||||
@@ -63,8 +63,8 @@
|
||||
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=8a959e196d628d0efc4b",
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=7eff560fea52770a642f",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=854c232c29d88c5b541a",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=c3427a1bceb2bbf9f738",
|
||||
"/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=3c303226a5682b2d3df6",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=7fa553e21d908a4746a9",
|
||||
"/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=47d27133d169cdf34588",
|
||||
"/chunks/platform~chunks/shared~chunks/shared-with-me~chunks/team-folders.js": "/chunks/platform~chunks/shared~chunks/shared-with-me~chunks/team-folders.js?id=ca9ca67afd5839597647",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=8688d9c7ff850e6989e6",
|
||||
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=dfa4128d68360d5e1b3b",
|
||||
@@ -497,5 +497,17 @@
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.6e8ef2c6e6b7377d75c8.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.6e8ef2c6e6b7377d75c8.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.85434004cb43292807d6.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.85434004cb43292807d6.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.2efeb6b5514f07e8e36f.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.2efeb6b5514f07e8e36f.hot-update.js",
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.3a1a10a2da95a801ce56.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.3a1a10a2da95a801ce56.hot-update.js"
|
||||
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.3a1a10a2da95a801ce56.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared-with-me~chunks/shared/files~~34b5eb22.3a1a10a2da95a801ce56.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.f06f0e976068ca4eb5d3.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.f06f0e976068ca4eb5d3.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.24a966679f12877ac244.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.24a966679f12877ac244.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.a469330d13140b4e76e1.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.a469330d13140b4e76e1.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.0fc723486b86f2878a32.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.0fc723486b86f2878a32.hot-update.js",
|
||||
"/js/main.3ebac19c787938bde5c8.hot-update.js": "/js/main.3ebac19c787938bde5c8.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.3ebac19c787938bde5c8.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.3ebac19c787938bde5c8.hot-update.js",
|
||||
"/chunks/platform~chunks/shared.3ebac19c787938bde5c8.hot-update.js": "/chunks/platform~chunks/shared.3ebac19c787938bde5c8.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.5bdab7460be36d69066f.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.5bdab7460be36d69066f.hot-update.js",
|
||||
"/chunks/admin~chunks/platform~chunks/settings~chunks/shared.ee3931986228d0d84b7e.hot-update.js": "/chunks/admin~chunks/platform~chunks/settings~chunks/shared.ee3931986228d0d84b7e.hot-update.js",
|
||||
"/js/main.ec8d91dfb6b0752e58ba.hot-update.js": "/js/main.ec8d91dfb6b0752e58ba.hot-update.js",
|
||||
"/js/main.acf3827e961d3aa0bb54.hot-update.js": "/js/main.acf3827e961d3aa0bb54.hot-update.js",
|
||||
"/chunks/platform.18acb84d78309bf59b64.hot-update.js": "/chunks/platform.18acb84d78309bf59b64.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--Overlay component-->
|
||||
<div
|
||||
@click.capture="hidePopover"
|
||||
class="absolute top-12 z-20 w-52 dark:bg-dark-foreground bg-white shadow-xl rounded-lg overflow-hidden"
|
||||
class="absolute top-12 z-20 w-60 dark:bg-dark-foreground bg-white shadow-xl rounded-lg overflow-hidden"
|
||||
:class="{'right-0': side === 'left', 'left-0': side === 'right'}"
|
||||
>
|
||||
<slot></slot>
|
||||
|
||||
@@ -81,7 +81,7 @@ export default {
|
||||
this.$getDataByLocation()
|
||||
},
|
||||
changePreview(previewType) {
|
||||
this.$store.dispatch('changePreviewType', previewType)
|
||||
this.$store.dispatch('togglePreviewType', previewType)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<!--Password Switch-->
|
||||
<div>
|
||||
<AppInputSwitch :title="$t('shared_form.label_password_protection')" :description="$t('popup.share.password_description')">
|
||||
<SwitchInput v-model="shareOptions.isPassword" class="switch" :state="0" />
|
||||
<SwitchInput v-model="shareOptions.isPassword" class="switch" :state="shareOptions.isPassword" />
|
||||
</AppInputSwitch>
|
||||
|
||||
<!--Set password-->
|
||||
@@ -36,7 +36,7 @@
|
||||
<!--Expiration switch-->
|
||||
<div>
|
||||
<AppInputSwitch :title="$t('expiration')" :description="$t('popup.share.expiration_description')">
|
||||
<SwitchInput v-model="isExpiration" class="switch" :state="0" />
|
||||
<SwitchInput v-model="isExpiration" class="switch" :state="isExpiration" />
|
||||
</AppInputSwitch>
|
||||
|
||||
<!--Set expiration-->
|
||||
@@ -48,7 +48,7 @@
|
||||
<!--Send on emails switch-->
|
||||
<div>
|
||||
<AppInputSwitch :title="$t('popup.share.email_send')" :description="$t('popup.share.email_description')">
|
||||
<SwitchInput v-model="isEmailSharing" class="switch" :state="0" />
|
||||
<SwitchInput v-model="isEmailSharing" class="switch" :state="isEmailSharing" />
|
||||
</AppInputSwitch>
|
||||
|
||||
<!--Set expiration-->
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
<maximize2-icon v-if="result.action.value === 'full-screen-mode'" size="18" class="vue-feather text-theme"/>
|
||||
<power-icon v-if="result.action.value === 'log-out'" size="18" class="vue-feather text-theme"/>
|
||||
<trash-icon v-if="result.action.value === 'empty-trash'" size="18" class="vue-feather text-theme"/>
|
||||
<grid-icon v-if="result.action.value === 'toggle-grid-list'" size="18" class="vue-feather text-theme"/>
|
||||
|
||||
<b class="font-bold text-sm ml-3.5">
|
||||
{{ result.title }}
|
||||
@@ -187,6 +188,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
GridIcon,
|
||||
Maximize2Icon,
|
||||
ArrowDownIcon,
|
||||
ArrowUpIcon,
|
||||
@@ -225,6 +227,7 @@ import axios from "axios"
|
||||
export default {
|
||||
name: 'Spotlight',
|
||||
components: {
|
||||
GridIcon,
|
||||
CategoryName,
|
||||
FilterSuggestion,
|
||||
Maximize2Icon,
|
||||
@@ -424,6 +427,13 @@ export default {
|
||||
]
|
||||
|
||||
let functionList = [
|
||||
{
|
||||
title: this.$t('Toggle Grid/List View'),
|
||||
action: {
|
||||
type: 'function',
|
||||
value: 'toggle-grid-list',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: this.$t('Toggle Dark/Light Mode'),
|
||||
action: {
|
||||
@@ -564,6 +574,10 @@ export default {
|
||||
|
||||
if (arg.action.type === 'function') {
|
||||
|
||||
if (arg.action.value === 'toggle-grid-list') {
|
||||
this.$store.dispatch('togglePreviewType')
|
||||
}
|
||||
|
||||
if (arg.action.value === 'dark-mode') {
|
||||
this.$store.dispatch('toggleDarkMode', !this.isDarkMode)
|
||||
}
|
||||
|
||||
4
resources/js/store/modules/app.js
vendored
4
resources/js/store/modules/app.js
vendored
@@ -999,10 +999,10 @@ const actions = {
|
||||
// Change preview
|
||||
commit('TOGGLE_NAVIGATION_BARS')
|
||||
},
|
||||
changePreviewType: ({commit, state}, preview) => {
|
||||
togglePreviewType: ({commit, state}, preview) => {
|
||||
|
||||
// Get preview type
|
||||
let previewType = preview
|
||||
let previewType = preview || state.itemViewType === 'list' ? 'grid' : 'list'
|
||||
|
||||
// Store preview type to localStorage
|
||||
localStorage.setItem('preview_type', previewType)
|
||||
|
||||
@@ -1165,14 +1165,9 @@ class SetupDevEnvironment extends Command
|
||||
*/
|
||||
private function generate_thumbnails($file, $user): array
|
||||
{
|
||||
$image = \Illuminate\Support\Facades\File::get(storage_path($file));
|
||||
|
||||
// Create avatar name
|
||||
// Create image name
|
||||
$file_name = Str::uuid() . '.jpg';
|
||||
|
||||
// Create intervention image
|
||||
$intervention = Image::make($image)->orientate();
|
||||
|
||||
$this->info("Generating thumbnails for $file...");
|
||||
|
||||
// Generate avatar sizes
|
||||
@@ -1180,7 +1175,12 @@ class SetupDevEnvironment extends Command
|
||||
config('vuefilemanager.image_sizes.later'),
|
||||
config('vuefilemanager.image_sizes.immediately'),
|
||||
])->collapse()
|
||||
->each(function ($size) use ($intervention, $file_name, $user) {
|
||||
->each(function ($size) use ($file_name, $user, $file) {
|
||||
$image = \Illuminate\Support\Facades\File::get(storage_path($file));
|
||||
|
||||
// Create intervention image
|
||||
$intervention = Image::make($image)->orientate();
|
||||
|
||||
// Create thumbnail only if image is larger than predefined image sizes
|
||||
if ($intervention->getWidth() > $size['size']) {
|
||||
// Generate thumbnail
|
||||
|
||||
Reference in New Issue
Block a user