Initial commit
This commit is contained in:
49
src/App.vue
Normal file
49
src/App.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div
|
||||
class="app-root"
|
||||
:class="{
|
||||
'with-dev-sidebar': showDevSidebar,
|
||||
'sidebar-expanded': showDevSidebar && !appStore.devSidebarCollapsed,
|
||||
}"
|
||||
>
|
||||
<DevSidebar v-if="showDevSidebar" v-model:collapsed="appStore.devSidebarCollapsed" />
|
||||
<div class="app-content">
|
||||
<AssistantFabs />
|
||||
<RouterView />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { RouterView } from "vue-router";
|
||||
import AssistantFabs from "./components/assistant-fabs/index.vue";
|
||||
import DevSidebar from "./components/dev/DevSidebar.vue";
|
||||
import { useAppStore } from "./stores/app.js";
|
||||
|
||||
const appStore = useAppStore();
|
||||
const showDevSidebar = import.meta.env.DEV;
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.app-root {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.app-content {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transition: margin-left 0.22s ease, width 0.22s ease;
|
||||
}
|
||||
|
||||
.app-root.with-dev-sidebar .app-content {
|
||||
margin-left: 44px;
|
||||
width: calc(100% - 44px);
|
||||
}
|
||||
|
||||
.app-root.sidebar-expanded .app-content {
|
||||
margin-left: 220px;
|
||||
width: calc(100% - 220px);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user