fix: stay in the same position after renaming or deleting

This commit is contained in:
niubility000 2024-03-07 11:12:27 +08:00 committed by GitHub
parent 27648d1e9b
commit ca2b45525c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

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

View File

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