9090<script setup lang="ts">
9191
9292import { t } from ' @nextcloud/l10n'
93- import { computed , getCurrentInstance , onBeforeUnmount , onMounted , ref } from ' vue'
93+ import { computed , onBeforeUnmount , onMounted , ref } from ' vue'
94+ import { useRoute } from ' vue-router'
9495
9596import HomeSvg from ' @mdi/svg/svg/home.svg?raw'
9697import {
@@ -128,9 +129,7 @@ const filesStore = useFilesStore()
128129const filtersStore = useFiltersStore ()
129130const userConfigStore = useUserConfigStore ()
130131const sidebarStore = useSidebarStore ()
131-
132- const instance = getCurrentInstance ()
133- const route = computed (() => instance ?.proxy ?.$route ?? { query: {} })
132+ const route = useRoute ()
134133
135134const isMenuOpen = ref (false )
136135const loading = ref (true )
@@ -156,7 +155,7 @@ function toggleGridView() {
156155}
157156
158157function checkAndOpenFileFromUri() {
159- const query = route .value . query as { uuid? : string | string [] }
158+ const query = route .query as { uuid? : string | string [] }
160159 const uuid = Array .isArray (query .uuid ) ? query .uuid [0 ] : query .uuid
161160 if (uuid ) {
162161 filesStore .selectFileByUuid (uuid ).then ((fileId ) => {
@@ -175,7 +174,9 @@ onMounted(async () => {
175174})
176175
177176onBeforeUnmount (() => {
178- filesStore .selectFile ()
177+ if (! (sidebarStore .isVisible && sidebarStore .activeTab === ' sign-tab' )) {
178+ filesStore .selectFile ()
179+ }
179180})
180181
181182defineExpose ({
0 commit comments