mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-23 17:50:38 +00:00
Revert "removed backspace functionality for team folder and sharedwithme homepage"
This reverts commit dfeef6fd
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
<!--File Controls-->
|
||||
<div class="ml-5 flex items-center xl:ml-8">
|
||||
<!--Team Heads-->
|
||||
<PopoverWrapper v-if="$isThisRoute(['TeamFolders', 'SharedWithMe'])">
|
||||
<PopoverWrapper v-if="$isThisRoute($route, ['TeamFolders', 'SharedWithMe'])">
|
||||
<TeamMembersButton
|
||||
@click.stop.native="showTeamFolderMenu"
|
||||
size="32"
|
||||
@@ -70,7 +70,7 @@
|
||||
<PopoverItem name="team-folder" side="left">
|
||||
<TeamFolderPreview />
|
||||
|
||||
<OptionGroup v-if="$isThisRoute(['TeamFolders'])" :title="$t('Options')">
|
||||
<OptionGroup v-if="$isThisRoute($route, ['TeamFolders'])" :title="$t('Options')">
|
||||
<Option
|
||||
@click.native="$updateTeamFolder(teamFolder)"
|
||||
:title="$t('Edit Members')"
|
||||
@@ -83,7 +83,7 @@
|
||||
/>
|
||||
</OptionGroup>
|
||||
|
||||
<OptionGroup v-if="$isThisRoute(['SharedWithMe'])" :title="$t('Options')">
|
||||
<OptionGroup v-if="$isThisRoute($route, ['SharedWithMe'])" :title="$t('Options')">
|
||||
<Option
|
||||
@click.native="$detachMeFromTeamFolder(teamFolder)"
|
||||
:title="$t('Leave the Team Folder')"
|
||||
@@ -105,7 +105,7 @@
|
||||
:action="$t('actions.convert_into_team_folder')"
|
||||
/>
|
||||
<ToolbarButton
|
||||
v-if="!$isThisRoute(['SharedWithMe', 'Public'])"
|
||||
v-if="!$isThisRoute($route, ['SharedWithMe', 'Public'])"
|
||||
@click.native="$shareFileOrFolder(clipboard[0])"
|
||||
:class="{
|
||||
'is-inactive': canShareInView,
|
||||
@@ -213,41 +213,41 @@ export default {
|
||||
return this.currentTeamFolder ? this.currentTeamFolder : this.clipboard[0]
|
||||
},
|
||||
isTeamFolderHomepage() {
|
||||
return this.$isThisRoute(['TeamFolders']) && !this.$route.params.id
|
||||
return this.$isThisRoute(this.$route, ['TeamFolders']) && !this.$route.params.id
|
||||
},
|
||||
isSharedWithMe() {
|
||||
return this.$isThisRoute(['SharedWithMe'])
|
||||
return this.$isThisRoute(this.$route, ['SharedWithMe'])
|
||||
},
|
||||
isSharedWithMeHomepage() {
|
||||
return this.$isThisRoute(['SharedWithMe']) && !this.$route.params.id
|
||||
return this.$isThisRoute(this.$route, ['SharedWithMe']) && !this.$route.params.id
|
||||
},
|
||||
canCreateFolder() {
|
||||
return !this.$isThisRoute(['Files', 'Public', 'TeamFolders', 'SharedWithMe'])
|
||||
return !this.$isThisRoute(this.$route, ['Files', 'Public', 'TeamFolders', 'SharedWithMe'])
|
||||
},
|
||||
canShowConvertToTeamFolder() {
|
||||
return this.$isThisRoute(['Files', 'MySharedItems'])
|
||||
return this.$isThisRoute(this.$route, ['Files', 'MySharedItems'])
|
||||
},
|
||||
canUploadInView() {
|
||||
return !this.$isThisRoute(['Files', 'RecentUploads', 'Public', 'TeamFolders', 'SharedWithMe'])
|
||||
return !this.$isThisRoute(this.$route, ['Files', 'RecentUploads', 'Public', 'TeamFolders', 'SharedWithMe'])
|
||||
},
|
||||
canUploadFolderInView() {
|
||||
return !this.$isThisRoute(['Files', 'Public', 'TeamFolders', 'SharedWithMe'])
|
||||
return !this.$isThisRoute(this.$route, ['Files', 'Public', 'TeamFolders', 'SharedWithMe'])
|
||||
},
|
||||
canDeleteInView() {
|
||||
let routes = ['TeamFolders', 'SharedWithMe', 'RecentUploads', 'MySharedItems', 'Trash', 'Public', 'Files']
|
||||
return !this.$isThisRoute(routes) || this.clipboard.length === 0
|
||||
return !this.$isThisRoute(this.$route, routes) || this.clipboard.length === 0
|
||||
},
|
||||
canMoveInView() {
|
||||
let routes = ['SharedWithMe', 'RecentUploads', 'MySharedItems', 'Public', 'Files', 'TeamFolders']
|
||||
return !this.$isThisRoute(routes) || this.clipboard.length === 0
|
||||
return !this.$isThisRoute(this.$route, routes) || this.clipboard.length === 0
|
||||
},
|
||||
canShareInView() {
|
||||
let routes = ['TeamFolders', 'RecentUploads', 'MySharedItems', 'Public', 'Files']
|
||||
return !this.$isThisRoute(routes) || this.clipboard.length > 1 || this.clipboard.length === 0
|
||||
return !this.$isThisRoute(this.$route, routes) || this.clipboard.length > 1 || this.clipboard.length === 0
|
||||
},
|
||||
canCreateTeamFolder() {
|
||||
return (
|
||||
this.$isThisRoute(['MySharedItems', 'Files']) &&
|
||||
this.$isThisRoute(this.$route, ['MySharedItems', 'Files']) &&
|
||||
this.clipboard.length === 1 &&
|
||||
this.clipboard[0].data.type === 'folder'
|
||||
)
|
||||
|
||||
@@ -6,28 +6,28 @@
|
||||
@click.native="goToFiles"
|
||||
:title="$t('sidebar.home')"
|
||||
icon="hard-drive"
|
||||
:is-active="$isThisRoute('Files')"
|
||||
:is-active="$isThisRoute($route, 'Files')"
|
||||
:is-hover-disabled="true"
|
||||
/>
|
||||
<Option
|
||||
@click.native="goToLatest"
|
||||
:title="$t('menu.latest')"
|
||||
icon="upload-cloud"
|
||||
:is-active="$isThisRoute('RecentUploads')"
|
||||
:is-active="$isThisRoute($route, 'RecentUploads')"
|
||||
:is-hover-disabled="true"
|
||||
/>
|
||||
<Option
|
||||
@click.native="goToShared"
|
||||
:title="$t('sidebar.my_shared')"
|
||||
icon="share"
|
||||
:is-active="$isThisRoute('MySharedItems')"
|
||||
:is-active="$isThisRoute($route, 'MySharedItems')"
|
||||
:is-hover-disabled="true"
|
||||
/>
|
||||
<Option
|
||||
@click.native="goToTrash"
|
||||
:title="$t('menu.trash')"
|
||||
icon="trash"
|
||||
:is-active="$isThisRoute('Trash')"
|
||||
:is-active="$isThisRoute($route, 'Trash')"
|
||||
:is-hover-disabled="true"
|
||||
/>
|
||||
</OptionGroup>
|
||||
@@ -36,14 +36,14 @@
|
||||
@click.native="goToTeamFolders"
|
||||
:title="$t('Team Folders')"
|
||||
icon="users"
|
||||
:is-active="$isThisRoute('TeamFolders')"
|
||||
:is-active="$isThisRoute($route, 'TeamFolders')"
|
||||
:is-hover-disabled="true"
|
||||
/>
|
||||
<Option
|
||||
@click.native="goToSharedWithMe"
|
||||
:title="$t('Shared with Me')"
|
||||
icon="user-check"
|
||||
:is-active="$isThisRoute('SharedWithMe')"
|
||||
:is-active="$isThisRoute($route, 'SharedWithMe')"
|
||||
:is-hover-disabled="true"
|
||||
/>
|
||||
</OptionGroup>
|
||||
|
||||
@@ -158,7 +158,7 @@ import { mapGetters } from 'vuex'
|
||||
},
|
||||
canShowAuthor() {
|
||||
return (
|
||||
this.$isThisRoute(['SharedWithMe', 'TeamFolders']) &&
|
||||
this.$isThisRoute(this.$route, ['SharedWithMe', 'TeamFolders']) &&
|
||||
this.clipboard[0].data.type !== 'folder' &&
|
||||
this.user.data.id !== this.clipboard[0].data.relationships.owner.data.id
|
||||
)
|
||||
|
||||
@@ -189,7 +189,7 @@ export default {
|
||||
canEditName() {
|
||||
return (
|
||||
!this.$isMobile() &&
|
||||
!this.$isThisRoute(['Trash', 'SharedSingleFile']) &&
|
||||
!this.$isThisRoute(this.$route, ['Trash', 'SharedSingleFile']) &&
|
||||
!this.$checkPermission('visitor')
|
||||
)
|
||||
},
|
||||
@@ -200,13 +200,13 @@ export default {
|
||||
},
|
||||
canShowAuthor() {
|
||||
return (
|
||||
this.$isThisRoute(['SharedWithMe', 'TeamFolders']) &&
|
||||
this.$isThisRoute(this.$route, ['SharedWithMe', 'TeamFolders']) &&
|
||||
!this.isFolder &&
|
||||
this.user.data.id !== this.entry.data.relationships.owner.data.id
|
||||
)
|
||||
},
|
||||
canShowLinkIcon() {
|
||||
return this.entry.data.relationships.shared && !this.$isThisRoute(['SharedSingleFile'])
|
||||
return this.entry.data.relationships.shared && !this.$isThisRoute(this.$route, ['SharedSingleFile'])
|
||||
},
|
||||
canDrag() {
|
||||
return !this.isDeleted && this.$checkPermission(['master', 'editor'])
|
||||
|
||||
@@ -162,7 +162,7 @@ export default {
|
||||
canEditName() {
|
||||
return (
|
||||
!this.$isMobile() &&
|
||||
!this.$isThisRoute(['Trash']) &&
|
||||
!this.$isThisRoute(this.$route, ['Trash']) &&
|
||||
!this.$checkPermission('visitor') &&
|
||||
!(this.sharedDetail && this.sharedDetail.attributes.type === 'file')
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="relative flex items-center">
|
||||
<TeamMembersButton
|
||||
v-if="$isThisRoute(['TeamFolders', 'SharedWithMe'])"
|
||||
v-if="$isThisRoute($route, ['TeamFolders', 'SharedWithMe'])"
|
||||
size="28"
|
||||
@click.stop.native="$showMobileMenu('team-menu')"
|
||||
class="absolute right-9"
|
||||
|
||||
@@ -54,7 +54,7 @@ export default {
|
||||
computed: {
|
||||
...mapGetters(['isVisibleNavigationBars', 'currentFolder', 'sharedDetail']),
|
||||
isNotHomepage() {
|
||||
if (this.$isThisRoute(['Public'])) {
|
||||
if (this.$isThisRoute(this.$route, ['Public'])) {
|
||||
return this.sharedDetail && this.sharedDetail.data.attributes.item_id !== this.$route.params.id
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user