mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 06:13:52 +02:00
feat: sidebar can collapsable
This commit is contained in:
13
src/App.vue
13
src/App.vue
@@ -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(() => {
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -313,8 +313,7 @@
|
||||
|
||||
watch(
|
||||
() => route.path,
|
||||
(newPath, oldPath) => {
|
||||
console.log('Route changed - FriendsList', newPath, oldPath);
|
||||
() => {
|
||||
nextTick(() => friendsListSearchChange());
|
||||
},
|
||||
{ immediate: true }
|
||||
|
||||
Reference in New Issue
Block a user