mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
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: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
parent
228c92f2ca
commit
caf646fcb0
@ -23,7 +23,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, provide, watch } from 'vue';
|
import { onActivated, onMounted, onUnmounted, provide, watch } from 'vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import MkSuperMenu from '@/components/MkSuperMenu.vue';
|
import MkSuperMenu from '@/components/MkSuperMenu.vue';
|
||||||
import MkInfo from '@/components/MkInfo.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(() => {
|
onUnmounted(() => {
|
||||||
ro.disconnect();
|
ro.disconnect();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user