mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-20 08:52:15 +00:00
V1.1
User Authentication - Login to user account - Register new user account - Reset user password Functionality - Added locations to menu - Added trash for deleted folders & files - Restore files or folders from trash - Empty trash function - Favourites folders - List of 5 latest uploads - Profile settings page - Storage info and upload limits Design - Night Mode - Navigation sidebar - Quick action buttons in mobile version - Improved mobile UX - Other small design improvements Settings - Enable/Disable user account registration - Set storage limitation - Set storage capacity for all users
This commit is contained in:
23
resources/js/store/modules/filesView.js
vendored
23
resources/js/store/modules/filesView.js
vendored
@@ -2,8 +2,8 @@ import axios from 'axios'
|
||||
import {events} from '@/bus'
|
||||
|
||||
const defaultState = {
|
||||
fileInfoPanelVisible: localStorage.getItem('file_info_visibility') == 'true' || false,
|
||||
preview_type: localStorage.getItem('preview_type') || 'grid',
|
||||
fileInfoPanelVisible: localStorage.getItem('file_info_visibility') == 'false' || false,
|
||||
preview_type: localStorage.getItem('preview_type') || 'list',
|
||||
uploadingFilesCount: undefined,
|
||||
fileInfoDetail: undefined,
|
||||
currentFolder: undefined,
|
||||
@@ -183,7 +183,7 @@ const actions = {
|
||||
if (data.type === 'file' || data.type === 'image')
|
||||
commit('REMOVE_ITEM_FROM_RECENT_UPLOAD', data.unique_id)
|
||||
if (data.type === 'folder')
|
||||
commit('REMOVE_ITEM_FROM_FAVOURITES', data.unique_id)
|
||||
commit('REMOVE_ITEM_FROM_FAVOURITES', data)
|
||||
|
||||
// Remove file preview
|
||||
commit('CLEAR_FILEINFO_DETAIL')
|
||||
@@ -208,7 +208,7 @@ const actions = {
|
||||
let restoreToHome = false
|
||||
|
||||
// Check if file can be restored to home directory
|
||||
if (context.state.currentFolder.location === 'trash' && item.type !== 'folder') restoreToHome = true
|
||||
if (context.state.currentFolder.location === 'trash') restoreToHome = true
|
||||
|
||||
// Remove file
|
||||
context.commit('REMOVE_ITEM', item.unique_id)
|
||||
@@ -251,7 +251,11 @@ const actions = {
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
context.commit('ADD_NEW_ITEMS', response.data)
|
||||
|
||||
// Check if user is in uploading folder, if yes, than show new file
|
||||
if (response.data.folder_id == context.state.currentFolder.unique_id)
|
||||
context.commit('ADD_NEW_ITEMS', response.data)
|
||||
|
||||
context.commit('UPDATE_RECENT_UPLOAD', response.data)
|
||||
context.commit(
|
||||
'UPLOADING_FILE_PROGRESS',
|
||||
@@ -262,13 +266,6 @@ const actions = {
|
||||
.catch(error => {
|
||||
reject(error)
|
||||
|
||||
// Show error message
|
||||
events.$emit('alert:open', {
|
||||
title: 'Whooops, something went wrong :(',
|
||||
message:
|
||||
"Something went wrong and we can't continue. Please contact us."
|
||||
})
|
||||
|
||||
context.commit('UPDATE_FILE_COUNT_PROGRESS', undefined)
|
||||
})
|
||||
})
|
||||
@@ -314,7 +311,7 @@ const actions = {
|
||||
},
|
||||
changePreviewType: ({commit, dispatch, state}) => {
|
||||
// Get preview type
|
||||
let previewType = localStorage.getItem('preview_type') == 'list' ? 'grid' : 'list'
|
||||
let previewType = localStorage.getItem('preview_type') == 'grid' ? 'list' : 'grid'
|
||||
|
||||
// Store preview type to localStorage
|
||||
localStorage.setItem('preview_type', previewType)
|
||||
|
||||
Reference in New Issue
Block a user