diff --git a/public/mix-manifest.json b/public/mix-manifest.json
index 6422618a..837e379f 100644
--- a/public/mix-manifest.json
+++ b/public/mix-manifest.json
@@ -42,7 +42,7 @@
"/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/share~b068369d.js": "/chunks/files~chunks/my-shared-items~chunks/platform~chunks/recent-uploads~chunks/shared~chunks/share~b068369d.js?id=d10326c5b0801dff59a4",
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/settings-subscription~chunks/shared~ab58556a.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/settings-subscription~chunks/shared~ab58556a.js?id=7c0aae7820c3dcd29575",
"/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/files~chunks/shared/single-f~f04cfcbc.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/files~chunks/shared/single-f~f04cfcbc.js?id=c39ed6403a2c3c124338",
- "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/files~chunks/team-folders~ch~ba7d6097.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/files~chunks/team-folders~ch~ba7d6097.js?id=302af22be3f5fe7aaf4d",
+ "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/files~chunks/team-folders~ch~ba7d6097.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/files~chunks/team-folders~ch~ba7d6097.js?id=aaf09d7a6d6085fbe629",
"/chunks/files~chunks/shared/files~chunks/team-folders.js": "/chunks/files~chunks/shared/files~chunks/team-folders.js?id=ed4e72b9cb1946e582c8",
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=61fb98fd41324af9cfea",
"/chunks/homepage.js": "/chunks/homepage.js?id=db15518895b65833f7ec",
@@ -59,7 +59,7 @@
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=0dd0a5efe0e3cb511c48",
"/chunks/plans.js": "/chunks/plans.js?id=e93cd9c42177eadc8825",
"/chunks/platform.js": "/chunks/platform.js?id=39e4ea880516add24c59",
- "/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=6000d49dae81f57df3d0",
+ "/chunks/platform~chunks/shared.js": "/chunks/platform~chunks/shared.js?id=e42c52a6ef90161fe16d",
"/chunks/profile.js": "/chunks/profile.js?id=658aa03af778cc2cc100",
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=ddb7be518c092ed392ca",
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=e8597a21a38c153e3c88",
@@ -148,5 +148,34 @@
"/chunks/platform.add54d9080a4c72facb3.hot-update.js": "/chunks/platform.add54d9080a4c72facb3.hot-update.js",
"/chunks/platform.b270ed5302710d2d9b4d.hot-update.js": "/chunks/platform.b270ed5302710d2d9b4d.hot-update.js",
"/chunks/platform.a3857edeaf0f1b1262f2.hot-update.js": "/chunks/platform.a3857edeaf0f1b1262f2.hot-update.js",
- "/chunks/platform.3f5a03ca3df53bb04c5e.hot-update.js": "/chunks/platform.3f5a03ca3df53bb04c5e.hot-update.js"
+ "/chunks/platform.3f5a03ca3df53bb04c5e.hot-update.js": "/chunks/platform.3f5a03ca3df53bb04c5e.hot-update.js",
+ "/chunks/platform~chunks/shared.6d119b5a149bc3747ee9.hot-update.js": "/chunks/platform~chunks/shared.6d119b5a149bc3747ee9.hot-update.js",
+ "/chunks/platform~chunks/shared.1ad86cf3c13e081ccdf8.hot-update.js": "/chunks/platform~chunks/shared.1ad86cf3c13e081ccdf8.hot-update.js",
+ "/chunks/platform~chunks/shared.b199fddf3bcfd90a0fdb.hot-update.js": "/chunks/platform~chunks/shared.b199fddf3bcfd90a0fdb.hot-update.js",
+ "/chunks/platform~chunks/shared.6f429a0d945f557101d0.hot-update.js": "/chunks/platform~chunks/shared.6f429a0d945f557101d0.hot-update.js",
+ "/chunks/platform~chunks/shared.0ea477cbce4dd8b7be4c.hot-update.js": "/chunks/platform~chunks/shared.0ea477cbce4dd8b7be4c.hot-update.js",
+ "/chunks/platform~chunks/shared.cad45666cc9622969c7b.hot-update.js": "/chunks/platform~chunks/shared.cad45666cc9622969c7b.hot-update.js",
+ "/chunks/platform~chunks/shared.b137a969c816a1cad43d.hot-update.js": "/chunks/platform~chunks/shared.b137a969c816a1cad43d.hot-update.js",
+ "/js/main.337645602dfb303b5063.hot-update.js": "/js/main.337645602dfb303b5063.hot-update.js",
+ "/js/main.dbdb47fa3380d10ad1a7.hot-update.js": "/js/main.dbdb47fa3380d10ad1a7.hot-update.js",
+ "/js/main.f6be8818c22693269d52.hot-update.js": "/js/main.f6be8818c22693269d52.hot-update.js",
+ "/js/main.7d623b5fe30476007b92.hot-update.js": "/js/main.7d623b5fe30476007b92.hot-update.js",
+ "/js/main.12bd42d566ffa588b472.hot-update.js": "/js/main.12bd42d566ffa588b472.hot-update.js",
+ "/js/main.829b50a121226055e51b.hot-update.js": "/js/main.829b50a121226055e51b.hot-update.js",
+ "/chunks/platform~chunks/shared.9ada3852f380d9f74ce7.hot-update.js": "/chunks/platform~chunks/shared.9ada3852f380d9f74ce7.hot-update.js",
+ "/chunks/platform~chunks/shared.6a8291ebfd5839386a21.hot-update.js": "/chunks/platform~chunks/shared.6a8291ebfd5839386a21.hot-update.js",
+ "/chunks/platform~chunks/shared.b852c4a2397c404e234b.hot-update.js": "/chunks/platform~chunks/shared.b852c4a2397c404e234b.hot-update.js",
+ "/chunks/platform~chunks/shared.d6dfe8601ef247a82b22.hot-update.js": "/chunks/platform~chunks/shared.d6dfe8601ef247a82b22.hot-update.js",
+ "/chunks/platform~chunks/shared.de344c16232a4d60ee09.hot-update.js": "/chunks/platform~chunks/shared.de344c16232a4d60ee09.hot-update.js",
+ "/js/main.4a5b9ca68db27bdd7b34.hot-update.js": "/js/main.4a5b9ca68db27bdd7b34.hot-update.js",
+ "/chunks/platform~chunks/shared.32dfa8217e888b50e7eb.hot-update.js": "/chunks/platform~chunks/shared.32dfa8217e888b50e7eb.hot-update.js",
+ "/chunks/platform~chunks/shared.6ec281ab19e81571ab46.hot-update.js": "/chunks/platform~chunks/shared.6ec281ab19e81571ab46.hot-update.js",
+ "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/files~chunks/team-folders~ch~ba7d6097.4a4114d15d030c03b668.hot-update.js": "/chunks/files~chunks/my-shared-items~chunks/recent-uploads~chunks/shared/files~chunks/team-folders~ch~ba7d6097.4a4114d15d030c03b668.hot-update.js",
+ "/chunks/platform~chunks/shared.e1c61f7a21fbdae0976f.hot-update.js": "/chunks/platform~chunks/shared.e1c61f7a21fbdae0976f.hot-update.js",
+ "/chunks/platform~chunks/shared.d4162d8629b712b01643.hot-update.js": "/chunks/platform~chunks/shared.d4162d8629b712b01643.hot-update.js",
+ "/chunks/platform~chunks/shared.43b8244da6ddfacbf6f3.hot-update.js": "/chunks/platform~chunks/shared.43b8244da6ddfacbf6f3.hot-update.js",
+ "/chunks/platform~chunks/shared.94508bf87547a5a69886.hot-update.js": "/chunks/platform~chunks/shared.94508bf87547a5a69886.hot-update.js",
+ "/chunks/platform~chunks/shared.0cac4a4efb13804f00f3.hot-update.js": "/chunks/platform~chunks/shared.0cac4a4efb13804f00f3.hot-update.js",
+ "/chunks/platform~chunks/shared.1cc958b33c5c1dc8fca4.hot-update.js": "/chunks/platform~chunks/shared.1cc958b33c5c1dc8fca4.hot-update.js",
+ "/chunks/platform~chunks/shared.adfde9155da98c78507d.hot-update.js": "/chunks/platform~chunks/shared.adfde9155da98c78507d.hot-update.js"
}
diff --git a/resources/js/components/FilesView/DesktopToolbar.vue b/resources/js/components/FilesView/DesktopToolbar.vue
index 8bb21d15..d247fd31 100644
--- a/resources/js/components/FilesView/DesktopToolbar.vue
+++ b/resources/js/components/FilesView/DesktopToolbar.vue
@@ -2,13 +2,13 @@
@@ -93,9 +93,8 @@
import {ChevronLeftIcon, MoreHorizontalIcon} from 'vue-feather-icons'
import SearchBar from '/resources/js/components/FilesView/SearchBar'
import Option from '/resources/js/components/FilesView/Option'
- import {mapGetters} from 'vuex'
import {events} from '/resources/js/bus'
- import {last} from 'lodash'
+ import {mapGetters} from 'vuex'
export default {
name: 'DesktopToolbar',
@@ -119,69 +118,46 @@
computed: {
...mapGetters([
'currentTeamFolder',
- 'isVisibleSidebar',
- 'FilePreviewType',
'currentFolder',
'sharedDetail',
'clipboard',
]),
teamFolder() {
- return this.currentTeamFolder ? this.currentTeamFolder : this.clipboard[0]
+ return this.currentTeamFolder
+ ? this.currentTeamFolder
+ : this.clipboard[0]
},
- isLoadedFolder() {
+ isNotHomepage() {
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
- if (!this.$store.getters.config.storageLimit) return true
-
- // Check if user is loaded
- if (!this.$store.getters.user) return true
-
- // Check if user has storage
- return this.$store.getters.user.data.attributes.storage.used <= 100
- },
- directoryName() {
- if (this.currentFolder) {
- return this.currentFolder.data.attributes.name
- } else {
- return {
- 'RecentUploads': this.$t('Recent'),
- 'MySharedItems': this.$t('Shared'),
- 'Trash': this.$t('Trash'),
- 'Public': this.$t('Files'),
- 'Files': this.$t('Files'),
- 'TeamFolders': this.$t('Team Folders'),
- }[this.$route.name]
- }
- },
- preview() {
- return this.FilePreviewType === 'list'
- ? 'th'
- : 'th-list'
+ isTeamFolderHomepage() {
+ return this.$isThisRoute(this.$route, ['TeamFolders'])
+ && ! this.$route.params.id
},
canCreateFolderInView() {
- return ! this.$isThisRoute(this.$route, ['Files', 'Public'])
+ return ! this.$isThisRoute(this.$route, ['Files', 'Public', 'TeamFolders'])
+ },
+ canShowConvertToTeamFolder() {
+ return this.$isThisRoute(this.$route, ['Files', 'MySharedItems'])
+ },
+ canUploadInView() {
+ return ! this.$isThisRoute(this.$route, ['Files', 'Public', 'TeamFolders'])
},
canDeleteInView() {
let routes = [
+ 'TeamFolders',
'RecentUploads',
'MySharedItems',
'Trash',
'Public',
'Files',
]
- return !this.$isThisRoute(this.$route, routes) || this.clipboard.length === 0
- },
- canShowConvertToTeamFolder() {
- return this.$isThisRoute(this.$route, ['Files', 'MySharedItems'])
- },
- canUploadInView() {
- return ! this.$isThisRoute(this.$route, ['Files', 'Public'])
+ return !this.$isThisRoute(this.$route, routes)
+ || this.clipboard.length === 0
},
canMoveInView() {
let routes = [
@@ -189,8 +165,10 @@
'MySharedItems',
'Public',
'Files',
+ 'TeamFolders',
]
- return ! this.$isThisRoute(this.$route, routes) || this.clipboard.length === 0
+ return ! this.$isThisRoute(this.$route, routes)
+ || this.clipboard.length === 0
},
canShareInView() {
let routes = [
@@ -200,31 +178,27 @@
'Public',
'Files',
]
- return ! this.$isThisRoute(this.$route, routes) || this.clipboard.length > 1 || this.clipboard.length === 0
+ return ! this.$isThisRoute(this.$route, routes)
+ || this.clipboard.length > 1
+ || this.clipboard.length === 0
},
canCreateTeamFolderInView() {
let routes = [
'MySharedItems',
'Files',
]
- return this.$isThisRoute(this.$route, routes) && this.clipboard.length === 1 && this.clipboard[0].data.type === 'folder'
- }
- },
- data() {
- return {
- members: [
- '/temp/avatar-01.png',
- '/temp/avatar-02.png',
- '/temp/avatar-03.png',
- ],
+
+ return this.$isThisRoute(this.$route, routes)
+ && this.clipboard.length === 1
+ && this.clipboard[0].data.type === 'folder'
}
},
methods: {
goBack() {
- if (this.isLoadedFolder) this.$router.back()
+ if (this.isNotHomepage) this.$router.back()
},
showTeamFolderMenu() {
- if (this.currentTeamFolder || this.clipboard[0])
+ if (this.teamFolder)
events.$emit('popover:open', 'team-folder')
},
showCreateMenu() {
diff --git a/resources/js/components/FilesView/MobileToolbar.vue b/resources/js/components/FilesView/MobileToolbar.vue
index f09d4b6a..553dba14 100644
--- a/resources/js/components/FilesView/MobileToolbar.vue
+++ b/resources/js/components/FilesView/MobileToolbar.vue
@@ -7,7 +7,7 @@
- {{ directoryName }}
+ {{ $getCurrentLocationName() }}
@@ -41,19 +41,6 @@
'FilePreviewType',
'currentFolder',
]),
- directoryName() {
- if (this.currentFolder) {
- return this.currentFolder.data.attributes.name
- } else {
- return {
- 'RecentUploads': this.$t('Recent'),
- 'MySharedItems': this.$t('Shared'),
- 'Trash': this.$t('Trash'),
- 'Public': this.$t('Files'),
- 'Files': this.$t('Files'),
- }[this.$route.name]
- }
- },
isLoadedFolder() {
return this.$route.params.id
},
diff --git a/resources/js/components/Teams/Components/TeamFolderPreview.vue b/resources/js/components/Teams/Components/TeamFolderPreview.vue
index a1a92d48..8b1ece72 100644
--- a/resources/js/components/Teams/Components/TeamFolderPreview.vue
+++ b/resources/js/components/Teams/Components/TeamFolderPreview.vue
@@ -1,7 +1,7 @@
- The Team Project
+ {{ teamFolder.data.attributes.name }}
Last update a week ago
diff --git a/resources/js/helpers/functionHelpers.js b/resources/js/helpers/functionHelpers.js
index d043070f..7ccd9a08 100644
--- a/resources/js/helpers/functionHelpers.js
+++ b/resources/js/helpers/functionHelpers.js
@@ -201,6 +201,21 @@ const FunctionHelpers = {
anchor.click()
}
+ Vue.prototype.$getCurrentLocationName = function () {
+ if (store.getters.currentFolder) {
+ return store.getters.currentFolder.data.attributes.name
+ } else {
+ return {
+ 'RecentUploads': this.$t('Recent'),
+ 'MySharedItems': this.$t('Shared'),
+ 'Trash': this.$t('Trash'),
+ 'Public': this.$t('Files'),
+ 'Files': this.$t('Files'),
+ 'TeamFolders': this.$t('Team Folders'),
+ }[this.$route.name]
+ }
+ }
+
Vue.prototype.$goToFileView = function (id) {
let locations = {
diff --git a/resources/js/store/modules/fileBrowser.js b/resources/js/store/modules/fileBrowser.js
index 526555c7..b016edbf 100644
--- a/resources/js/store/modules/fileBrowser.js
+++ b/resources/js/store/modules/fileBrowser.js
@@ -170,7 +170,7 @@ const mutations = {
},
INCREASE_FOLDER_ITEM(state, id) {
state.entries.map(el => {
- if (el.data.id && el.data.id === id) el.items++
+ if (el.data.id && el.data.id === id) el.data.attributes.items++
})
},
REMOVE_ITEM_FROM_CLIPBOARD(state, item) {
diff --git a/resources/js/store/modules/fileFunctions.js b/resources/js/store/modules/fileFunctions.js
index 8b2530b5..2f1e8ab6 100644
--- a/resources/js/store/modules/fileFunctions.js
+++ b/resources/js/store/modules/fileFunctions.js
@@ -73,7 +73,7 @@ const actions = {
.then(() => {
itemsToMove.forEach(item => {
commit('REMOVE_ITEM', item.id)
- commit('INCREASE_FOLDER_ITEM', to_item.id)
+ commit('INCREASE_FOLDER_ITEM', to_item.data.id)
if (item.type === 'folder')
dispatch('getAppData')
diff --git a/src/App/Console/Commands/SetupDevEnvironment.php b/src/App/Console/Commands/SetupDevEnvironment.php
index 3a9296d1..2327d447 100644
--- a/src/App/Console/Commands/SetupDevEnvironment.php
+++ b/src/App/Console/Commands/SetupDevEnvironment.php
@@ -1,4 +1,5 @@
setUpFaker();
}
@@ -729,6 +731,20 @@ class SetupDevEnvironment extends Command
'name' => 'Company Project',
]);
+ Folder::factory()
+ ->create([
+ 'user_id' => $user->id,
+ 'parent_id' => $companyProjectFolder->id,
+ 'name' => 'Presentation Materials',
+ ]);
+
+ Folder::factory()
+ ->create([
+ 'user_id' => $user->id,
+ 'parent_id' => $companyProjectFolder->id,
+ 'name' => 'Team Gallery',
+ ]);
+
$financeDocumentsFolder = Folder::factory()
->create([
'user_id' => $user->id,
@@ -742,34 +758,34 @@ class SetupDevEnvironment extends Command
collect([$members[0]->id, $members[1]->id])
->each(
- fn ($id) => DB::table('team_folder_members')
- ->insert([
- 'folder_id' => $companyProjectFolder->id,
- 'user_id' => $id,
- 'permission' => 'can-edit',
- ])
+ fn($id) => DB::table('team_folder_members')
+ ->insert([
+ 'folder_id' => $companyProjectFolder->id,
+ 'user_id' => $id,
+ 'permission' => 'can-edit',
+ ])
);
collect([$members[2]->id, $members[3]->id])
->each(
- fn ($id) => DB::table('team_folder_members')
- ->insert([
- 'folder_id' => $financeDocumentsFolder->id,
- 'user_id' => $id,
- 'permission' => 'can-edit',
- ])
+ fn($id) => DB::table('team_folder_members')
+ ->insert([
+ 'folder_id' => $financeDocumentsFolder->id,
+ 'user_id' => $id,
+ 'permission' => 'can-edit',
+ ])
);
// Create invitations
collect([$members[4], $members[5]])
->each(
- fn ($user) => TeamFolderInvitation::factory()
- ->create([
- 'email' => $user->email,
- 'folder_id' => $companyProjectFolder->id,
- 'status' => 'pending',
- 'permission' => 'can-edit',
- ])
+ fn($user) => TeamFolderInvitation::factory()
+ ->create([
+ 'email' => $user->email,
+ 'folder_id' => $companyProjectFolder->id,
+ 'status' => 'pending',
+ 'permission' => 'can-edit',
+ ])
);
}