diff --git a/frontend/src/components/prompts/FileList.vue b/frontend/src/components/prompts/FileList.vue index 2fd5ec71..6d3321b2 100644 --- a/frontend/src/components/prompts/FileList.vue +++ b/frontend/src/components/prompts/FileList.vue @@ -35,6 +35,12 @@ import { StatusError } from "@/api/utils.js"; export default { name: "file-list", + props: { + exclude: { + type: Array, + default: () => [], + }, + }, data: function () { return { items: [], @@ -90,6 +96,7 @@ export default { // move options. for (const item of req.items) { if (!item.isDir) continue; + if (this.exclude?.includes(item.url)) continue; this.items.push({ name: item.name, diff --git a/frontend/src/components/prompts/Move.vue b/frontend/src/components/prompts/Move.vue index 6591d09d..7b2fd615 100644 --- a/frontend/src/components/prompts/Move.vue +++ b/frontend/src/components/prompts/Move.vue @@ -8,6 +8,7 @@ @@ -76,6 +77,11 @@ export default { computed: { ...mapState(useFileStore, ["req", "selected"]), ...mapState(useAuthStore, ["user"]), + excludedFolders() { + return this.selected + .filter((idx) => this.req.items[idx].isDir) + .map((idx) => this.req.items[idx].url); + }, }, methods: { ...mapActions(useLayoutStore, ["showHover", "closeHovers"]),