mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 02:50:39 +00:00
Revert "removed backspace functionality for team folder and sharedwithme homepage"
This reverts commit dfeef6fd
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
@click.native="$shareFileOrFolder(currentFile)"
|
||||
:title="sharingTitle"
|
||||
icon="share"
|
||||
v-if="!$isThisRoute(['Public', 'RequestUpload', 'SharedWithMe'])"
|
||||
v-if="!$isThisRoute($route, ['Public', 'RequestUpload', 'SharedWithMe'])"
|
||||
/>
|
||||
<Option
|
||||
@click.native="$deleteFileOrFolder(currentFile)"
|
||||
@@ -57,7 +57,7 @@
|
||||
class="menu-option"
|
||||
/>
|
||||
</OptionGroup>
|
||||
<OptionGroup v-if="!$isThisRoute(['RequestUpload'])">
|
||||
<OptionGroup v-if="!$isThisRoute($route, ['RequestUpload'])">
|
||||
<Option @click.native="downloadItem" :title="$t('context_menu.download')" icon="download" />
|
||||
</OptionGroup>
|
||||
</PopoverItem>
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
<div class="ml-5">
|
||||
<ToolbarButton
|
||||
v-if="!$isThisRoute(['RequestUpload'])"
|
||||
v-if="!$isThisRoute($route, ['RequestUpload'])"
|
||||
@click.native="downloadItem"
|
||||
source="download"
|
||||
:action="$t('actions.download')"
|
||||
@@ -165,7 +165,7 @@ export default {
|
||||
return activeIndex
|
||||
},
|
||||
canShareItem() {
|
||||
return this.$isThisRoute(['Files', 'RecentUploads', 'MySharedItems'])
|
||||
return this.$isThisRoute(this.$route, ['Files', 'RecentUploads', 'MySharedItems'])
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
events.$emit('emailsInputValues', this.emails)
|
||||
},
|
||||
removeLastEmail(event) {
|
||||
// If is input empty and press backspace remove last email from array
|
||||
// If is input empty and presse backspace remove last email from array
|
||||
if (event.code === 'Backspace' && this.email === '') this.emails.pop()
|
||||
},
|
||||
handleEmail() {
|
||||
|
||||
@@ -126,7 +126,7 @@ export default {
|
||||
this.isLoadingTree = true
|
||||
|
||||
// Get folder tree and hide spinner
|
||||
if (this.$isThisRoute(['SharedWithMe'])) {
|
||||
if (this.$isThisRoute(this.$route, ['SharedWithMe'])) {
|
||||
this.$store.dispatch('getTeamFolderTree').then(() => {
|
||||
this.isLoadingTree = false
|
||||
})
|
||||
|
||||
@@ -119,7 +119,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')
|
||||
)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
<!--Show tips-->
|
||||
<div
|
||||
v-if="isEmptyQuery && !activeFilter && !$isThisRoute(['Public']) && isAdmin"
|
||||
v-if="isEmptyQuery && !activeFilter && !$isThisRoute($route, ['Public']) && isAdmin"
|
||||
class="relative z-50 px-4 pb-4"
|
||||
>
|
||||
<CategoryName>
|
||||
@@ -587,7 +587,7 @@ export default {
|
||||
}
|
||||
|
||||
// Return commands for public page
|
||||
if (this.$isThisRoute(['Public'])) {
|
||||
if (this.$isThisRoute(this.$route, ['Public'])) {
|
||||
return [].concat.apply([], [functionList])
|
||||
}
|
||||
|
||||
@@ -779,7 +779,7 @@ export default {
|
||||
openItem(file) {
|
||||
// Show folder
|
||||
if (file.data.type === 'folder') {
|
||||
if (this.$isThisRoute(['Public'])) {
|
||||
if (this.$isThisRoute(this.$route, ['Public'])) {
|
||||
this.$router.push({
|
||||
name: 'Public',
|
||||
params: {
|
||||
|
||||
@@ -168,7 +168,7 @@ export default {
|
||||
axios
|
||||
.post(route, payload)
|
||||
.then((response) => {
|
||||
let isTeamFoldersLocation = this.$isThisRoute(['TeamFolders'])
|
||||
let isTeamFoldersLocation = this.$isThisRoute(this.$route, ['TeamFolders'])
|
||||
|
||||
// Redirect into newly created team folder
|
||||
if (isTeamFoldersLocation && this.$route.params.id) {
|
||||
|
||||
Reference in New Issue
Block a user