Skip to content

Commit 2910fec

Browse files
authored
Revert using modal hook (filebrowser#2689)
`@closed` hook gets called for all actions, whether user initiated or not. This is the source of auto-closing modals without user interaction reported in filebrowser#3303 and filebrowser#3519. While testing its effects, I also discovered other little issues but I have no clue how to Vue so I'll leave it to the big bois. 1. Moving a file to the same folder prompts a second modal. If you hit rename it doesn't ask you for the name, it just appends `(1)` and then complains that it cannot find the file if you try move again. 2. Creating a new file with the same name of an existing one does not issue a toast notification. That's because `files.ts` api does not return a properly formatted `StatusError` [here](https://github.com/filebrowser/filebrowser/blob/master/frontend/src/api/files.ts#L139).
1 parent 2fdea73 commit 2910fec

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

frontend/src/components/prompts/BaseModal.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
class="vfm-modal"
44
overlay-transition="vfm-fade"
55
content-transition="vfm-fade"
6-
@closed="layoutStore.closeHovers"
76
:focus-trap="{
87
initialFocus: '#focus-prompt',
98
fallbackFocus: 'div.vfm__content',
@@ -15,7 +14,4 @@
1514

1615
<script setup lang="ts">
1716
import { VueFinalModal } from "vue-final-modal";
18-
import { useLayoutStore } from "@/stores/layout";
19-
20-
const layoutStore = useLayoutStore();
2117
</script>

0 commit comments

Comments
 (0)