Skip to content
Snippets Groups Projects
Unverified Commit caf646fc authored by Launchpad's avatar Launchpad Committed by GitHub
Browse files

fix(client): Solve the problem of not automatically jumping to /admin/overview...

fix(client): Solve the problem of not automatically jumping to /admin/overview when accessing the /admin page for the second time (#10264)

Co-authored-by: default avatartamaina <tamaina@hotmail.co.jp>
parent 228c92f2
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
</template>
<script lang="ts" setup>
import { onMounted, onUnmounted, provide, watch } from 'vue';
import { onActivated, onMounted, onUnmounted, provide, watch } from 'vue';
import { i18n } from '@/i18n';
import MkSuperMenu from '@/components/MkSuperMenu.vue';
import MkInfo from '@/components/MkInfo.vue';
......@@ -204,6 +204,13 @@ onMounted(() => {
}
});
onActivated(() => {
narrow = el.offsetWidth < NARROW_THRESHOLD;
if (currentPage?.route.name == null && !narrow) {
router.push('/admin/overview');
}
});
onUnmounted(() => {
ro.disconnect();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment