feat: sidebar can collapsable

This commit is contained in:
pa
2025-10-17 23:16:40 +09:00
committed by Natsumi
parent dc51d156e4
commit 0d7f610829
3 changed files with 6 additions and 16 deletions

View File

@@ -17,14 +17,14 @@
<template v-if="watchState.isLoggedIn">
<NavMenu></NavMenu>
<RouterView v-if="requiresFullScreen"></RouterView>
<RouterView v-show="!isSideBarTabShow"></RouterView>
<el-splitter v-else @resize-end="setAsideWidth" v-show="isSideBarTabShow">
<el-splitter v-show="isSideBarTabShow" @resize-end="setAsideWidth">
<el-splitter-panel>
<RouterView></RouterView>
</el-splitter-panel>
<el-splitter-panel :min="200" :max="700" :size="asideWidth">
<el-splitter-panel :min="250" :max="700" :size="asideWidth" collapsible>
<Sidebar></Sidebar>
</el-splitter-panel>
</el-splitter>
@@ -74,7 +74,6 @@
import { computed, onBeforeMount, onMounted } from 'vue';
import { storeToRefs } from 'pinia';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import cs from 'element-plus/es/locale/lang/cs';
import en from 'element-plus/es/locale/lang/en';
@@ -121,12 +120,6 @@
import './app.scss';
const route = useRoute();
const requiresFullScreen = computed(() => {
return route.meta.fullScreen;
});
console.log(`isLinux: ${LINUX}`);
const isMacOS = computed(() => {

View File

@@ -26,14 +26,12 @@ const routes = [
{
path: '/friendlist',
name: 'friendList',
component: FriendList,
meta: { fullScreen: true }
component: FriendList
},
{
path: '/charts',
name: 'charts',
component: Charts,
meta: { fullScreen: true }
component: Charts
},
{ path: '/tools', name: 'tools', component: Tools },
{ path: '/profile', name: 'profile', component: Profile },

View File

@@ -313,8 +313,7 @@
watch(
() => route.path,
(newPath, oldPath) => {
console.log('Route changed - FriendsList', newPath, oldPath);
() => {
nextTick(() => friendsListSearchChange());
},
{ immediate: true }