From 7b6579ac8a5388662bbc7a49aef5a828f816683f Mon Sep 17 00:00:00 2001 From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com> Date: Mon, 1 Mar 2021 16:12:17 +0000 Subject: [PATCH] chore: files view dynamic component --- frontend/src/store/getters.js | 2 - frontend/src/store/index.js | 3 +- frontend/src/store/mutations.js | 3 - frontend/src/views/Files.vue | 29 ++--- frontend/src/views/files/Editor.vue | 2 + frontend/src/views/files/Listing.vue | 161 ++++++++++++++------------- frontend/src/views/files/Preview.vue | 13 +-- 7 files changed, 107 insertions(+), 106 deletions(-) diff --git a/frontend/src/store/getters.js b/frontend/src/store/getters.js index 70c9cd0e..72e6db8d 100644 --- a/frontend/src/store/getters.js +++ b/frontend/src/store/getters.js @@ -2,8 +2,6 @@ const getters = { isLogged: state => state.user !== null, isFiles: state => !state.loading && state.route.name === 'Files', isListing: (state, getters) => getters.isFiles && state.req.isDir, - isEditor: (state, getters) => getters.isFiles && (state.req.type === 'text' || state.req.type === 'textImmutable'), - isPreview: state => state.previewMode, isSharing: state => !state.loading && state.route.name === 'Share', selectedCount: state => state.selected.length, progress : state => { diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js index 8914b1c0..118b84ee 100644 --- a/frontend/src/store/index.js +++ b/frontend/src/store/index.js @@ -24,9 +24,8 @@ const state = { showShell: false, showMessage: null, showConfirm: null, - previewMode: false, hash: '', - token: '', + token: '' } export default new Vuex.Store({ diff --git a/frontend/src/store/mutations.js b/frontend/src/store/mutations.js index e398c6b0..963c3780 100644 --- a/frontend/src/store/mutations.js +++ b/frontend/src/store/mutations.js @@ -85,9 +85,6 @@ const mutations = { state.clipboard.key = '' state.clipboard.items = [] }, - setPreviewMode(state, value) { - state.previewMode = value - }, setHash: (state, value) => (state.hash = value), } diff --git a/frontend/src/views/Files.vue b/frontend/src/views/Files.vue index 86f856bd..934d9cc7 100644 --- a/frontend/src/views/Files.vue +++ b/frontend/src/views/Files.vue @@ -1,8 +1,8 @@