mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
team folder browsing with static team folder details
This commit is contained in:
@@ -45,8 +45,8 @@
|
||||
<PopoverItem name="team-folder" side="left">
|
||||
<TeamFolderPreview />
|
||||
<OptionGroup>
|
||||
<Option @click.native="$updateTeamFolder(clipboard[0])" :title="$t('Edit Members')" icon="rename" />
|
||||
<Option @click.native="$dissolveTeamFolder(clipboard[0])" :title="$t('Dissolve Team')" icon="trash" />
|
||||
<Option @click.native="$updateTeamFolder(teamFolder)" :title="$t('Edit Members')" icon="rename" />
|
||||
<Option @click.native="$dissolveTeamFolder(teamFolder)" :title="$t('Dissolve Team')" icon="trash" />
|
||||
</OptionGroup>
|
||||
</PopoverItem>
|
||||
</PopoverWrapper>
|
||||
@@ -118,14 +118,22 @@
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'currentTeamFolder',
|
||||
'isVisibleSidebar',
|
||||
'FilePreviewType',
|
||||
'currentFolder',
|
||||
'sharedDetail',
|
||||
'clipboard',
|
||||
]),
|
||||
teamFolder() {
|
||||
return this.currentTeamFolder ? this.currentTeamFolder : this.clipboard[0]
|
||||
},
|
||||
isLoadedFolder() {
|
||||
return this.sharedDetail && this.sharedDetail.data.attributes.item_id === this.$route.params.id
|
||||
if (this.$isThisRoute(this.$route, ['Public'])) {
|
||||
return this.sharedDetail && this.sharedDetail.data.attributes.item_id === this.$route.params.id
|
||||
}
|
||||
|
||||
return this.$route.params.id
|
||||
},
|
||||
hasCapacity() {
|
||||
// Check if storage limitation is set
|
||||
@@ -216,7 +224,8 @@
|
||||
if (this.isLoadedFolder) this.$router.back()
|
||||
},
|
||||
showTeamFolderMenu() {
|
||||
events.$emit('popover:open', 'team-folder')
|
||||
if (this.currentTeamFolder || this.clipboard[0])
|
||||
events.$emit('popover:open', 'team-folder')
|
||||
},
|
||||
showCreateMenu() {
|
||||
events.$emit('popover:open', 'desktop-create')
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
<!--Thumbnail for item-->
|
||||
<div class="icon-item">
|
||||
<!--If is file or image, then link item-->
|
||||
<span v-if="isFile || (isImage && !item.data.attributes.thumbnail)" class="file-icon-text text-theme dark-text-theme">
|
||||
<span v-if="isFile || isVideo || (isImage && !item.data.attributes.thumbnail)" class="file-icon-text text-theme dark-text-theme">
|
||||
{{ item.data.attributes.mimetype | limitCharacters }}
|
||||
</span>
|
||||
|
||||
<!--Folder thumbnail-->
|
||||
<FontAwesomeIcon v-if="isFile || (isImage && !item.data.attributes.thumbnail)" class="file-icon" icon="file" />
|
||||
<FontAwesomeIcon v-if="isFile || isVideo || (isImage && !item.data.attributes.thumbnail)" class="file-icon" icon="file" />
|
||||
|
||||
<!--Image thumbnail-->
|
||||
<img loading="lazy" v-if="isImage && item.data.attributes.thumbnail" class="image" :src="item.data.attributes.thumbnail" :alt="item.data.attributes.name" />
|
||||
@@ -42,11 +42,6 @@
|
||||
<link-icon size="12" class="shared-icon text-theme dark-text-theme"/>
|
||||
</div>
|
||||
|
||||
<!--Participant owner Icon-->
|
||||
<!-- <div v-if="$checkPermission('master') && item.author !== 'user'" class="item-shared">
|
||||
<user-plus-icon size="12" class="shared-icon text-theme dark-text-theme"/>
|
||||
</div>-->
|
||||
|
||||
<!--Filesize and timestamp-->
|
||||
<span v-if="!isFolder" class="item-size">{{ item.data.attributes.filesize }}, {{ timeStamp }}</span>
|
||||
|
||||
@@ -220,17 +215,7 @@ export default {
|
||||
if (!this.mobileMultiSelect && this.$isMobile()) {
|
||||
|
||||
if (this.isFolder) {
|
||||
let route = this.$router.currentRoute.name
|
||||
|
||||
if (route === 'Public') {
|
||||
this.$router.push({name: 'Public', params: {token: this.$route.params.token, id: this.item.data.id}})
|
||||
} else if (route === 'Trash') {
|
||||
this.$router.push({name: 'Trash', params: {id: this.item.data.id}})
|
||||
} else if (['Files', 'MySharedItems'].includes(route)) {
|
||||
this.$router.push({name: 'Files', params: {id: this.item.data.id}})
|
||||
} else if (route === 'TeamFolders') {
|
||||
this.$router.push({name: 'TeamFolders', params: {id: this.item.data.id}})
|
||||
}
|
||||
this.$goToFileView(this.item.data.id)
|
||||
} else {
|
||||
|
||||
if (this.isImage || this.isVideo || this.isAudio || this.isPdf) {
|
||||
@@ -263,17 +248,7 @@ export default {
|
||||
// Clear selected items after open another folder
|
||||
this.$store.commit('CLIPBOARD_CLEAR')
|
||||
|
||||
let route = this.$router.currentRoute.name
|
||||
|
||||
if (route === 'Public') {
|
||||
this.$router.push({name: 'Public', params: {token: this.$route.params.token, id: this.item.data.id}})
|
||||
} else if (route === 'Trash') {
|
||||
this.$router.push({name: 'Trash', params: {id: this.item.data.id}})
|
||||
} else if (['Files', 'MySharedItems'].includes(route)) {
|
||||
this.$router.push({name: 'Files', params: {id: this.item.data.id}})
|
||||
} else if (route === 'TeamFolders') {
|
||||
this.$router.push({name: 'TeamFolders', params: {id: this.item.data.id}})
|
||||
}
|
||||
this.$goToFileView(this.item.data.id)
|
||||
}
|
||||
},
|
||||
renameItem: debounce(function (e) {
|
||||
|
||||
Reference in New Issue
Block a user