diff --git a/frontend/src/components/header/HeaderBar.vue b/frontend/src/components/header/HeaderBar.vue index 7e76752c..4e6e4685 100644 --- a/frontend/src/components/header/HeaderBar.vue +++ b/frontend/src/components/header/HeaderBar.vue @@ -55,7 +55,7 @@ export default { }, computed: { ...mapGetters(["currentPromptName"]), - } + }, }; diff --git a/frontend/src/components/prompts/FileList.vue b/frontend/src/components/prompts/FileList.vue index f4f60b21..eb7f4a98 100644 --- a/frontend/src/components/prompts/FileList.vue +++ b/frontend/src/components/prompts/FileList.vue @@ -22,14 +22,16 @@ >.

@@ -143,17 +145,17 @@ export default { this.selected = event.currentTarget.dataset.url; this.$emit("update:selected", this.selected); }, - createDir: async function (){ - this.$store.commit('showHover', { - prompt: 'newDir', + createDir: async function () { + this.$store.commit("showHover", { + prompt: "newDir", action: null, confirm: null, - props:{ + props: { redirect: false, base: this.current === this.$route.path ? null : this.current, - } - }) - } + }, + }); + }, }, }; diff --git a/frontend/src/components/prompts/Move.vue b/frontend/src/components/prompts/Move.vue index 9508ebfd..4c380cf0 100644 --- a/frontend/src/components/prompts/Move.vue +++ b/frontend/src/components/prompts/Move.vue @@ -98,7 +98,7 @@ export default { } action(overwrite, rename); - } + }, }, }; diff --git a/frontend/src/components/prompts/NewDir.vue b/frontend/src/components/prompts/NewDir.vue index 90e9e97b..653ae953 100644 --- a/frontend/src/components/prompts/NewDir.vue +++ b/frontend/src/components/prompts/NewDir.vue @@ -68,13 +68,10 @@ export default { // Build the path of the new directory. let uri; - if (this.base) - uri = this.base; - else if (this.isFiles) - uri = this.$route.path + "/"; - else - uri = "/"; - + + if (this.base) uri = this.base; + else if (this.isFiles) uri = this.$route.path + "/"; + else uri = "/"; if (!this.isListing) { uri = url.removeLastDir(uri) + "/"; @@ -82,13 +79,11 @@ export default { uri += encodeURIComponent(this.name) + "/"; uri = uri.replace("//", "/"); - try { await api.post(uri); if (this.redirect) { this.$router.push({ path: uri }); - } - else if (!this.base){ + } else if (!this.base) { const res = await api.fetch(url.removeLastDir(uri) + "/"); this.$store.commit("updateRequest", res); } diff --git a/frontend/src/components/prompts/Prompts.vue b/frontend/src/components/prompts/Prompts.vue index fdd7e021..afd527c1 100644 --- a/frontend/src/components/prompts/Prompts.vue +++ b/frontend/src/components/prompts/Prompts.vue @@ -1,6 +1,12 @@ @@ -87,10 +93,8 @@ export default { showOverlay: function () { return ( this.currentPrompt !== null && - this.currentPrompt.prompt - !== "search" && - this.currentPrompt.prompt - !== "more" + this.currentPrompt.prompt !== "search" && + this.currentPrompt.prompt !== "more" ); }, }, diff --git a/frontend/src/store/getters.js b/frontend/src/store/getters.js index d3d163dc..ccad1749 100644 --- a/frontend/src/store/getters.js +++ b/frontend/src/store/getters.js @@ -44,11 +44,13 @@ const getters = { return files.sort((a, b) => a.progress - b.progress); }, currentPrompt: (state) => { - return state.prompts.length > 0 ? state.prompts[state.prompts.length - 1] : null; + return state.prompts.length > 0 + ? state.prompts[state.prompts.length - 1] + : null; }, currentPromptName: (_, getters) => { return getters.currentPrompt?.prompt; - } + }, }; export default getters; diff --git a/frontend/src/store/mutations.js b/frontend/src/store/mutations.js index 8387f917..87493609 100644 --- a/frontend/src/store/mutations.js +++ b/frontend/src/store/mutations.js @@ -23,8 +23,8 @@ const mutations = { prompt: value.prompt, // Should not be null confirm: value?.confirm, action: value?.action, - props: value?.props - }) + props: value?.props, + }); }, showError: (state) => { state.prompts.push("error"); diff --git a/frontend/src/views/files/Listing.vue b/frontend/src/views/files/Listing.vue index 22f6e85e..4fc6546e 100644 --- a/frontend/src/views/files/Listing.vue +++ b/frontend/src/views/files/Listing.vue @@ -297,14 +297,7 @@ export default { }; }, computed: { - ...mapState([ - "req", - "selected", - "user", - "multiple", - "selected", - "loading", - ]), + ...mapState(["req", "selected", "user", "multiple", "selected", "loading"]), ...mapGetters(["selectedCount", "currentPrompt"]), nameSorted() { return this.req.sorting.by === "name"; diff --git a/frontend/src/views/settings/User.vue b/frontend/src/views/settings/User.vue index 60e43b91..32688f47 100644 --- a/frontend/src/views/settings/User.vue +++ b/frontend/src/views/settings/User.vue @@ -89,7 +89,7 @@ export default { return this.$route.path === "/settings/users/new"; }, ...mapState(["loading"]), - ...mapGetters(["currentPrompt", "currentPromptName"]) + ...mapGetters(["currentPrompt", "currentPromptName"]), }, watch: { $route: "fetchData",