diff --git a/frontend/src/components/prompts/Delete.vue b/frontend/src/components/prompts/Delete.vue index f65e69b7..2527c855 100644 --- a/frontend/src/components/prompts/Delete.vue +++ b/frontend/src/components/prompts/Delete.vue @@ -45,6 +45,7 @@ export default { submit: async function () { buttons.loading("delete"); + window.sessionStorage.setItem("modified", "true"); try { if (!this.isListing) { await api.remove(this.$route.path); diff --git a/frontend/src/components/prompts/Rename.vue b/frontend/src/components/prompts/Rename.vue index b6fb38ed..f3a96c2e 100644 --- a/frontend/src/components/prompts/Rename.vue +++ b/frontend/src/components/prompts/Rename.vue @@ -88,6 +88,7 @@ export default { newLink = url.removeLastDir(oldLink) + "/" + encodeURIComponent(this.name); + window.sessionStorage.setItem("modified", "true"); try { await api.move([{ from: oldLink, to: newLink }]); if (!this.isListing) { diff --git a/frontend/src/views/Files.vue b/frontend/src/views/Files.vue index 2d67fdd7..29a7afd9 100644 --- a/frontend/src/views/Files.vue +++ b/frontend/src/views/Files.vue @@ -54,8 +54,7 @@ export default { currentView() { if (this.req.type == undefined || this.req.isDir) { return null; - } - else if ( + } else if ( this.req.type === "text" || this.req.type === "textImmutable" ) { @@ -72,11 +71,11 @@ export default { $route: function (to, from) { if (from.path.endsWith("/")) { if (to.path.endsWith("/")) { - window.sessionStorage.setItem('listFrozen', "false"); + window.sessionStorage.setItem("listFrozen", "false"); this.fetchData(); return; } else { - window.sessionStorage.setItem('listFrozen', "true"); + window.sessionStorage.setItem("listFrozen", "true"); this.fetchData(); return; } @@ -117,7 +116,7 @@ export default { this.$store.commit("closeHovers"); // Set loading to true and reset the error. - if (window.sessionStorage.getItem('listFrozen') !=="true"){ + if (window.sessionStorage.getItem("listFrozen") !=="true" && window.sessionStorage.getItem("modified") !=="true"){ this.setLoading(true); } this.error = null; diff --git a/frontend/src/views/files/Editor.vue b/frontend/src/views/files/Editor.vue index bf0d47e2..f4871615 100644 --- a/frontend/src/views/files/Editor.vue +++ b/frontend/src/views/files/Editor.vue @@ -1,5 +1,9 @@