From d1c84a84123c77dede05c023b3697a432b56122c Mon Sep 17 00:00:00 2001 From: Ryan <43447928+Rmiller5466@users.noreply.github.com> Date: Mon, 20 Jan 2025 18:05:59 -0500 Subject: [PATCH] fix: prompts disappearing on copy / move / upload (#3537) --------- Co-authored-by: Ryan Miller Co-authored-by: Oleg Lobanov --- frontend/src/api/files.ts | 8 +++++--- frontend/src/components/Sidebar.vue | 2 +- frontend/src/components/prompts/Prompts.vue | 11 ++--------- frontend/src/components/prompts/Upload.vue | 2 -- frontend/src/stores/layout.ts | 12 +++++++++++- frontend/src/types/layout.d.ts | 1 + frontend/src/utils/upload.ts | 4 ++++ frontend/src/views/files/FileListing.vue | 2 -- 8 files changed, 24 insertions(+), 18 deletions(-) diff --git a/frontend/src/api/files.ts b/frontend/src/api/files.ts index a36de03f..928f5282 100644 --- a/frontend/src/api/files.ts +++ b/frontend/src/api/files.ts @@ -1,7 +1,8 @@ -import { createURL, fetchURL, removePrefix } from "./utils"; -import { baseURL } from "@/utils/constants"; import { useAuthStore } from "@/stores/auth"; +import { useLayoutStore } from "@/stores/layout"; +import { baseURL } from "@/utils/constants"; import { upload as postTus, useTus } from "./tus"; +import { createURL, fetchURL, removePrefix } from "./utils"; export async function fetch(url: string) { url = removePrefix(url); @@ -156,6 +157,7 @@ function moveCopy( overwrite = false, rename = false ) { + const layoutStore = useLayoutStore(); const promises = []; for (const item of items) { @@ -166,7 +168,7 @@ function moveCopy( }&destination=${to}&override=${overwrite}&rename=${rename}`; promises.push(resourceAction(url, "PATCH")); } - + layoutStore.closeHovers(); return Promise.all(promises); } diff --git a/frontend/src/components/Sidebar.vue b/frontend/src/components/Sidebar.vue index d88d2d2f..543818ad 100644 --- a/frontend/src/components/Sidebar.vue +++ b/frontend/src/components/Sidebar.vue @@ -101,7 +101,7 @@ href="https://github.com/filebrowser/filebrowser" >File Browser - {{ ' ' }} {{ version }} + {{ " " }} {{ version }} {{ $t("sidebar.help") }} diff --git a/frontend/src/components/prompts/Prompts.vue b/frontend/src/components/prompts/Prompts.vue index 4ecde794..71e4e753 100644 --- a/frontend/src/components/prompts/Prompts.vue +++ b/frontend/src/components/prompts/Prompts.vue @@ -3,7 +3,7 @@