mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
- mark folder as team folder after folder was created
- show members in spotlight search
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
v-if="user && canShowAuthor"
|
||||
:size="38"
|
||||
:is-border="true"
|
||||
:member="entry.data.relationships.user"
|
||||
:member="entry.data.relationships.owner"
|
||||
class="absolute lg:-bottom-7 right-2 -bottom-5 z-10 transform lg:scale-100 scale-75 z-10"
|
||||
/>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
v-if="user && canShowAuthor"
|
||||
:size="38"
|
||||
:is-border="true"
|
||||
:member="entry.data.relationships.user"
|
||||
:member="entry.data.relationships.owner"
|
||||
class="absolute -right-3 -bottom-2.5 transform lg:scale-100 scale-75 z-10"
|
||||
/>
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
canShowAuthor() {
|
||||
return this.$isThisRoute(this.$route, ['SharedWithMe', 'TeamFolders'])
|
||||
&& !this.isFolder
|
||||
&& this.user.data.id !== this.entry.data.relationships.user.data.id
|
||||
&& this.user.data.id !== this.entry.data.relationships.owner.data.id
|
||||
},
|
||||
canDrag() {
|
||||
return !this.isDeleted && this.$checkPermission(['master', 'editor'])
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
v-if="user && canShowAuthor"
|
||||
:size="28"
|
||||
:is-border="true"
|
||||
:member="entry.data.relationships.user"
|
||||
:member="entry.data.relationships.owner"
|
||||
class="absolute right-1.5 -bottom-2 z-10"
|
||||
/>
|
||||
|
||||
@@ -136,9 +136,8 @@
|
||||
: this.entry.data.attributes.items
|
||||
},
|
||||
canShowAuthor() {
|
||||
return this.$isThisRoute(this.$route, ['SharedWithMe', 'TeamFolders'])
|
||||
&& !this.isFolder
|
||||
&& this.user.data.id !== this.entry.data.relationships.user.data.id
|
||||
return !this.isFolder
|
||||
&& this.user.data.id !== this.entry.data.relationships.owner.data.id
|
||||
},
|
||||
canDrag() {
|
||||
return !this.isDeleted && this.$checkPermission(['master', 'editor'])
|
||||
|
||||
@@ -77,6 +77,7 @@ import ItemList from "../FilesView/ItemList"
|
||||
import {events} from '/resources/js/bus'
|
||||
import {debounce} from 'lodash';
|
||||
import axios from "axios";
|
||||
import {mapGetters} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'Spotlight',
|
||||
@@ -87,6 +88,9 @@ export default {
|
||||
XIcon,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'user'
|
||||
]),
|
||||
metaKeyIcon() {
|
||||
return this.$isApple() ? '⌘' : 'alt'
|
||||
},
|
||||
@@ -135,7 +139,17 @@ export default {
|
||||
|
||||
// Show folder
|
||||
if (file.data.type === 'folder') {
|
||||
this.$router.push({name: 'Files', params: {id: file.data.id}})
|
||||
|
||||
if (file.data.attributes.isTeamFolder) {
|
||||
|
||||
if (file.data.relationships.owner.data.id === this.user.data.id) {
|
||||
this.$router.push({name: 'TeamFolders', params: {id: file.data.id}})
|
||||
} else {
|
||||
this.$router.push({name: 'SharedWithMe', params: {id: file.data.id}})
|
||||
}
|
||||
} else {
|
||||
this.$router.push({name: 'Files', params: {id: file.data.id}})
|
||||
}
|
||||
} else {
|
||||
|
||||
// Show file
|
||||
|
||||
@@ -201,6 +201,7 @@
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.$store.commit('SET_CURRENT_TEAM_FOLDER', undefined)
|
||||
this.$store.dispatch('getSharedWithMeFolder', this.$route.params.id)
|
||||
|
||||
events.$on('context-menu:show', (event, item) => this.item = item)
|
||||
|
||||
Reference in New Issue
Block a user