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 @@