mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
feat: sidebar can collapsable
This commit is contained in:
+3
-10
@@ -17,14 +17,14 @@
|
|||||||
<template v-if="watchState.isLoggedIn">
|
<template v-if="watchState.isLoggedIn">
|
||||||
<NavMenu></NavMenu>
|
<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>
|
<el-splitter-panel>
|
||||||
<RouterView></RouterView>
|
<RouterView></RouterView>
|
||||||
</el-splitter-panel>
|
</el-splitter-panel>
|
||||||
|
|
||||||
<el-splitter-panel :min="200" :max="700" :size="asideWidth">
|
<el-splitter-panel :min="250" :max="700" :size="asideWidth" collapsible>
|
||||||
<Sidebar></Sidebar>
|
<Sidebar></Sidebar>
|
||||||
</el-splitter-panel>
|
</el-splitter-panel>
|
||||||
</el-splitter>
|
</el-splitter>
|
||||||
@@ -74,7 +74,6 @@
|
|||||||
import { computed, onBeforeMount, onMounted } from 'vue';
|
import { computed, onBeforeMount, onMounted } from 'vue';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
|
||||||
|
|
||||||
import cs from 'element-plus/es/locale/lang/cs';
|
import cs from 'element-plus/es/locale/lang/cs';
|
||||||
import en from 'element-plus/es/locale/lang/en';
|
import en from 'element-plus/es/locale/lang/en';
|
||||||
@@ -121,12 +120,6 @@
|
|||||||
|
|
||||||
import './app.scss';
|
import './app.scss';
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
|
|
||||||
const requiresFullScreen = computed(() => {
|
|
||||||
return route.meta.fullScreen;
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(`isLinux: ${LINUX}`);
|
console.log(`isLinux: ${LINUX}`);
|
||||||
|
|
||||||
const isMacOS = computed(() => {
|
const isMacOS = computed(() => {
|
||||||
|
|||||||
@@ -26,14 +26,12 @@ const routes = [
|
|||||||
{
|
{
|
||||||
path: '/friendlist',
|
path: '/friendlist',
|
||||||
name: 'friendList',
|
name: 'friendList',
|
||||||
component: FriendList,
|
component: FriendList
|
||||||
meta: { fullScreen: true }
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/charts',
|
path: '/charts',
|
||||||
name: 'charts',
|
name: 'charts',
|
||||||
component: Charts,
|
component: Charts
|
||||||
meta: { fullScreen: true }
|
|
||||||
},
|
},
|
||||||
{ path: '/tools', name: 'tools', component: Tools },
|
{ path: '/tools', name: 'tools', component: Tools },
|
||||||
{ path: '/profile', name: 'profile', component: Profile },
|
{ path: '/profile', name: 'profile', component: Profile },
|
||||||
|
|||||||
@@ -313,8 +313,7 @@
|
|||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.path,
|
() => route.path,
|
||||||
(newPath, oldPath) => {
|
() => {
|
||||||
console.log('Route changed - FriendsList', newPath, oldPath);
|
|
||||||
nextTick(() => friendsListSearchChange());
|
nextTick(() => friendsListSearchChange());
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
|
|||||||
Reference in New Issue
Block a user