From dcb8f081bcbcb122131539089191eb0c87f2f9dd Mon Sep 17 00:00:00 2001 From: niubility000 <76441520+niubility000@users.noreply.github.com> Date: Tue, 21 Sep 2021 23:08:32 +0800 Subject: [PATCH] "back" button function fixed --- frontend/src/components/files/ListingItem.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index 642e5454..bd0ef718 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -106,9 +106,6 @@ export default { return filesize(this.size); }, humanTime: function () { - if (this.user.dateFormat) { - return moment(this.modified).format("L LT"); - } return moment(this.modified).fromNow(); }, dragStart: function () { @@ -247,7 +244,11 @@ export default { this.addSelected(this.index); }, open: function () { - this.$router.push({ path: this.url }); + if (this.isDir) { + this.$router.push({ path: this.url }); + } else { + this.$router.replace({ path: this.url }); + } }, }, };