From 2f28bb4e623a8de59739ef48808310307b235284 Mon Sep 17 00:00:00 2001 From: niubility000 <76441520+niubility000@users.noreply.github.com> Date: Sat, 23 Mar 2024 16:45:40 +0800 Subject: [PATCH] fix: format the files using latest .eslintrc.json --- frontend/src/views/Files.vue | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/frontend/src/views/Files.vue b/frontend/src/views/Files.vue index 1d1e3a7a..dee2ac94 100644 --- a/frontend/src/views/Files.vue +++ b/frontend/src/views/Files.vue @@ -70,23 +70,27 @@ export default { }, watch: { $route: function (to, from) { - if (to.path.endsWith("/") && from.path.startsWith(to.path) && from.path.length > to.path.length ){ + if ( + to.path.endsWith("/") && + from.path.startsWith(to.path) && + from.path.length > to.path.length + ) { this.parentDir = "true"; } else { - this.parentDir = "false"; + this.parentDir = "false"; window.sessionStorage.removeItem(to.path); - } - if (from.path.endsWith("/")) { - if (to.path.endsWith("/")) { + } + if (from.path.endsWith("/")) { + if (to.path.endsWith("/")) { window.sessionStorage.setItem("listFrozen", "false"); } else { window.sessionStorage.setItem("listFrozen", "true"); } } else if (to.path.endsWith("/")) { this.$store.commit("updateRequest", {}); - } + } this.fetchData(); - }, + }, reload: function (value) { if (value === true) { this.fetchData(); @@ -115,9 +119,11 @@ export default { this.$store.commit("closeHovers"); // Set loading to true and reset the error. - if (window.sessionStorage.getItem("listFrozen") !=="true" - && window.sessionStorage.getItem("modified") !=="true" - && this.parentDir !== "true"){ + if ( + window.sessionStorage.getItem("listFrozen") !== "true" && + window.sessionStorage.getItem("modified") !== "true" && + this.parentDir !== "true" + ) { this.setLoading(true); } this.error = null;