fix: prompts disappearing on copy / move / upload (#3537)

---------

Co-authored-by: Ryan Miller <ryan.miller@infinitetactics.com>
Co-authored-by: Oleg Lobanov <oleg@lobanov.me>
This commit is contained in:
Ryan
2025-01-20 18:05:59 -05:00
committed by GitHub
parent e92dbb4bb8
commit d1c84a8412
8 changed files with 24 additions and 18 deletions

View File

@@ -101,7 +101,7 @@
href="https://github.com/filebrowser/filebrowser"
>File Browser</a
>
<span> {{ ' ' }} {{ version }}</span>
<span> {{ " " }} {{ version }}</span>
</span>
<span>
<a @click="help">{{ $t("sidebar.help") }}</a>

View File

@@ -3,7 +3,7 @@
</template>
<script setup lang="ts">
import { ref, watch } from "vue";
import { watch } from "vue";
import { ModalsContainer, useModal } from "vue-final-modal";
import { storeToRefs } from "pinia";
import { useLayoutStore } from "@/stores/layout";
@@ -30,8 +30,6 @@ const layoutStore = useLayoutStore();
const { currentPromptName } = storeToRefs(layoutStore);
const closeModal = ref<() => Promise<string>>();
const components = new Map<string, any>([
["info", Info],
["help", Help],
@@ -52,11 +50,6 @@ const components = new Map<string, any>([
]);
watch(currentPromptName, (newValue) => {
if (closeModal.value) {
closeModal.value();
closeModal.value = undefined;
}
const modal = components.get(newValue!);
if (!modal) return;
@@ -67,7 +60,7 @@ watch(currentPromptName, (newValue) => {
},
});
closeModal.value = close;
layoutStore.setCloseOnPrompt(close, newValue!);
open();
});

View File

@@ -48,8 +48,6 @@ const layoutStore = useLayoutStore();
// TODO: this is a copy of the same function in FileListing.vue
const uploadInput = (event: Event) => {
layoutStore.closeHovers();
let files = (event.currentTarget as HTMLInputElement)?.files;
if (files === null) return;