feat: add "redirect after copy/move" user setting (#5662)

This commit is contained in:
Beckam White
2026-01-10 20:27:54 +11:00
committed by GitHub
parent 208535a8cc
commit fda8a99292
18 changed files with 119 additions and 80 deletions

View File

@@ -109,7 +109,8 @@ export default {
return;
}
this.$router.push({ path: this.dest });
if (this.user.redirectAfterCopyMove)
this.$router.push({ path: this.dest });
})
.catch((e) => {
buttons.done("copy");

View File

@@ -79,7 +79,7 @@ export default {
computed: {
...mapState(useFileStore, ["req", "selected"]),
...mapState(useAuthStore, ["user"]),
...mapWritableState(useFileStore, ["preselect"]),
...mapWritableState(useFileStore, ["reload", "preselect"]),
excludedFolders() {
return this.selected
.filter((idx) => this.req.items[idx].isDir)
@@ -108,7 +108,9 @@ export default {
.then(() => {
buttons.success("move");
this.preselect = removePrefix(items[0].to);
this.$router.push({ path: this.dest });
if (this.user.redirectAfterCopyMove)
this.$router.push({ path: this.dest });
else this.reload = true;
})
.catch((e) => {
buttons.done("move");