mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
InfoSidebarUploadRequest for upload request
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
|
||||
<!--I am Done-->
|
||||
<div @click="uploadingDone" class="bg-theme-200 mr-6 flex cursor-pointer items-center rounded-lg py-1 pr-1 pl-4">
|
||||
<b class="text-theme mr-3 text-xs">
|
||||
{{ $t('Tell Jane you are done!') }}
|
||||
<b class="text-theme mr-3 text-sm leading-3">
|
||||
{{ $t('Tell {name} you are done!', {name: uploadRequest.data.relationships.user.data.attributes.name}) }}
|
||||
</b>
|
||||
<MemberAvatar
|
||||
:member="uploadRequest.data.relationships.user"
|
||||
|
||||
133
resources/js/components/FilesView/InfoSidebarUploadRequest.vue
Normal file
133
resources/js/components/FilesView/InfoSidebarUploadRequest.vue
Normal file
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
<div
|
||||
class="hidden w-[300px] shrink-0 overflow-y-auto overflow-x-hidden px-2.5 pt-2 lg:block xl:w-[320px] 2xl:w-[360px]"
|
||||
>
|
||||
<!--Is empty clipboard-->
|
||||
<div v-if="isEmpty" class="flex h-full items-center justify-center">
|
||||
<div class="text-center">
|
||||
<eye-off-icon size="22" class="vue-feather mb-3 inline-block text-gray-500" />
|
||||
<small class="block text-xs text-gray-500">
|
||||
{{ $t('messages.nothing_to_preview') }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--Multiple item selection-->
|
||||
<TitlePreview
|
||||
v-if="!isSingleFile && !isEmpty"
|
||||
class="mb-6"
|
||||
icon="check-square"
|
||||
:title="$t('file_detail.selected_multiple')"
|
||||
:subtitle="this.clipboard.length + ' ' + $tc('file_detail.items', this.clipboard.length)"
|
||||
/>
|
||||
|
||||
<!--Single file preview-->
|
||||
<div v-if="isSingleFile && !isEmpty">
|
||||
<FilePreviewDetail />
|
||||
|
||||
<TitlePreview
|
||||
class="mb-6"
|
||||
:icon="clipboard[0].data.type"
|
||||
:title="clipboard[0].data.attributes.name"
|
||||
:subtitle="clipboard[0].data.attributes.mimetype"
|
||||
/>
|
||||
|
||||
<!--Filesize-->
|
||||
<ListInfoItem
|
||||
v-if="singleFile.data.attributes.filesize"
|
||||
:title="$t('file_detail.size')"
|
||||
:content="singleFile.data.attributes.filesize"
|
||||
/>
|
||||
|
||||
<!--Created At-->
|
||||
<ListInfoItem :title="$t('file_detail.created_at')" :content="singleFile.data.attributes.created_at" />
|
||||
|
||||
<!--Location-->
|
||||
<ListInfoItem :title="$t('file_detail.where')">
|
||||
<div @click="$moveFileOrFolder(singleFile)" class="flex cursor-pointer items-center">
|
||||
<b class="inline-block text-sm font-bold">
|
||||
{{
|
||||
singleFile.data.relationships.parent
|
||||
? singleFile.data.relationships.parent.data.attributes.name
|
||||
: $getCurrentLocationName()
|
||||
}}
|
||||
</b>
|
||||
<Edit2Icon size="10" class="ml-2" />
|
||||
</div>
|
||||
</ListInfoItem>
|
||||
|
||||
<!--Shared-->
|
||||
<ListInfoItem
|
||||
v-if="$checkPermission('master') && singleFile.data.relationships.shared"
|
||||
:title="$t('file_detail.shared')"
|
||||
>
|
||||
<div @click="$shareFileOrFolder(singleFile)" class="mb-2 flex cursor-pointer items-center">
|
||||
<span class="inline-block text-sm font-bold">
|
||||
{{ sharedInfo }}
|
||||
</span>
|
||||
<Edit2Icon size="10" class="ml-2" />
|
||||
</div>
|
||||
<div class="flex w-full items-center">
|
||||
<lock-icon
|
||||
v-if="isLocked"
|
||||
@click="$shareFileOrFolder(singleFile)"
|
||||
size="17"
|
||||
class="hover-text-theme vue-feather cursor-pointer"
|
||||
/>
|
||||
<unlock-icon
|
||||
v-if="!isLocked"
|
||||
@click="$shareFileOrFolder(singleFile)"
|
||||
size="17"
|
||||
class="hover-text-theme vue-feather cursor-pointer"
|
||||
/>
|
||||
<CopyShareLink :item="singleFile" size="small" class="w-full pl-2.5" />
|
||||
</div>
|
||||
</ListInfoItem>
|
||||
|
||||
<!--Metadata-->
|
||||
<ListInfoItem v-if="canShowMetaData" :title="$t('file_detail_meta.meta_data')">
|
||||
<ImageMetaData />
|
||||
</ListInfoItem>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Edit2Icon, LockIcon, UnlockIcon, EyeOffIcon } from 'vue-feather-icons'
|
||||
import FilePreviewDetail from '../Others/FilePreviewDetail'
|
||||
import ListInfoItem from '../Others/ListInfoItem'
|
||||
import ImageMetaData from './ImageMetaData'
|
||||
import TitlePreview from './TitlePreview'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'InfoSidebarUploadRequest',
|
||||
components: {
|
||||
FilePreviewDetail,
|
||||
ImageMetaData,
|
||||
TitlePreview,
|
||||
ListInfoItem,
|
||||
UnlockIcon,
|
||||
EyeOffIcon,
|
||||
Edit2Icon,
|
||||
LockIcon,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['clipboard']),
|
||||
isEmpty() {
|
||||
return this.clipboard.length === 0
|
||||
},
|
||||
isSingleFile() {
|
||||
return this.clipboard.length === 1
|
||||
},
|
||||
singleFile() {
|
||||
return this.clipboard[0]
|
||||
},
|
||||
canShowMetaData() {
|
||||
return (
|
||||
this.clipboard[0].data.attributes.metadata && this.clipboard[0].data.attributes.metadata.ExifImageWidth
|
||||
)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -8,7 +8,7 @@
|
||||
<file-icon v-if="icon === 'file'" class="text-theme vue-feather" size="19" />
|
||||
</div>
|
||||
<div>
|
||||
<b class="block w-52 overflow-hidden text-ellipsis whitespace-nowrap text-base font-bold 2xl:w-72">
|
||||
<b class="block w-52 overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold 2xl:w-72">
|
||||
{{ title }}
|
||||
</b>
|
||||
<small class="block text-xs font-bold text-gray-400">
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="flex space-x-3 lg:overflow-hidden">
|
||||
<router-view id="file-view" class="relative w-full" :key="$route.fullPath" />
|
||||
|
||||
<!--<InfoSidebar v-if="isVisibleSidebar" />-->
|
||||
<InfoSidebarUploadRequest v-if="entries.length && isVisibleSidebar" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,6 +41,7 @@
|
||||
<script>
|
||||
import DesktopUploadRequestToolbar from '../components/FilesView/DesktopUploadRequestToolbar'
|
||||
import MobileUploadRequestToolBar from "../components/FilesView/MobileUploadRequestToolbar"
|
||||
import InfoSidebarUploadRequest from "../components/FilesView/InfoSidebarUploadRequest"
|
||||
import FileSortingMobile from '../components/FilesView/FileSortingMobile'
|
||||
import FileFilterMobile from '../components/FilesView/FileFilterMobile'
|
||||
import CreateFolderPopup from '../components/Others/CreateFolderPopup'
|
||||
@@ -49,7 +50,6 @@ import ConfirmPopup from "../components/Others/Popup/ConfirmPopup"
|
||||
import RenameItemPopup from '../components/Others/RenameItemPopup'
|
||||
import FilePreview from '../components/FilePreview/FilePreview'
|
||||
import MoveItemPopup from '../components/Others/MoveItemPopup'
|
||||
import InfoSidebar from '../components/FilesView/InfoSidebar'
|
||||
import Spotlight from '../components/Spotlight/Spotlight'
|
||||
import DragUI from '../components/FilesView/DragUI'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -60,6 +60,7 @@ export default {
|
||||
components: {
|
||||
DesktopUploadRequestToolbar,
|
||||
MobileUploadRequestToolBar,
|
||||
InfoSidebarUploadRequest,
|
||||
CreateFolderPopup,
|
||||
FileSortingMobile,
|
||||
FileFilterMobile,
|
||||
@@ -67,7 +68,6 @@ export default {
|
||||
DesktopToolbar,
|
||||
MoveItemPopup,
|
||||
ConfirmPopup,
|
||||
InfoSidebar,
|
||||
FilePreview,
|
||||
Spotlight,
|
||||
DragUI,
|
||||
|
||||
@@ -52,7 +52,7 @@ class DeleteFileOrFolderAction
|
||||
// Force delete children files
|
||||
if ($item['force_delete']) {
|
||||
// Get children folder ids
|
||||
$child_folders = filter_folders_ids($folder->trashedFolders, 'id');
|
||||
$child_folders = filter_folders_ids($folder->trashedFolders);
|
||||
|
||||
// Get children files
|
||||
$files = File::onlyTrashed()
|
||||
|
||||
Reference in New Issue
Block a user