π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
improvments
Veauville Raphael91a576905738
diff --git a/@alexandrie/styles/src/_variables.scss b/@alexandrie/styles/src/_variables.scssindex 08d0f888..24767534 100644--- a/@alexandrie/styles/src/_variables.scss+++ b/@alexandrie/styles/src/_variables.scss@@ -45,7 +45,7 @@ $transition-duration: 0.3s;--red: #DC3545;--red-bg: rgba(220, 53, 69, 0.15);--red-border: rgba(220, 53, 69, 0.3);- --yellow: #FFC107;+ --yellow: #fda94c;--yellow-bg: rgba(255, 193, 7, 0.15);--yellow-border: rgba(255, 193, 7, 0.3);--turquoise: #17A2B8;diff --git a/dashboard/components/MediumView.vue b/dashboard/components/MediumView.vueindex 9922db24..e12097db 100644--- a/dashboard/components/MediumView.vue+++ b/dashboard/components/MediumView.vue@@ -27,6 +27,7 @@ if (!isMobile()) {<style scoped>.medium-view {+ padding: 0 2rem;width: 100%;height: 100%;}diff --git a/dashboard/components/Preview.vue b/dashboard/components/Preview.vueindex 39405032..f19b0563 100644--- a/dashboard/components/Preview.vue+++ b/dashboard/components/Preview.vue@@ -1,5 +1,5 @@<template>- <div v-if="doc">+ <div v-if="doc" style="position: relative;"><div class="header"><NuxtLink :to="'/dashboard/edit?doc=' + doc.id">@@ -40,7 +40,7 @@</template></Modal></div>- <div class="document-theme card" v-html="doc.content_html"></div>+ <div class="document-theme" v-html="doc.content_html"></div></div></template><script setup lang="ts">@@ -71,15 +71,12 @@ const deleteDoc = () => doc.value?.id ? documentsStore.delete(doc.value.id) : nu</script><style lang="scss" scoped>-.card {- padding: 0 2rem;-}-.header {display: flex;justify-content: flex-end;align-items: center;- margin: 1rem 2rem;+ position: absolute;+ top: -67px;svg {cursor: pointer;diff --git a/dashboard/components/sidebar/CollapseItem.vue b/dashboard/components/sidebar/CollapseItem.vuenew file mode 100644index 00000000..e7055c23--- /dev/null+++ b/dashboard/components/sidebar/CollapseItem.vue@@ -0,0 +1,64 @@+<template>+ <Collapse>+ <template v-slot:header>+ <NuxtLink class="item">+ <i v-if="item.icon" v-html="item.icon" class="icon"></i>+ <span>{{ item.title }}</span>+ </NuxtLink>+ </template>+ <template v-slot:body>+ <template v-for="(child, index) in item.childrens">+ <div style="margin-left:15px;">+ <CollapseItem v-if="child.childrens?.length" :item="child" :key="index" />+ <NuxtLink v-else class="item children" :to="child.route">+ <i v-html="child.icon" class="icon"></i>+ <span>{{ child.title }}</span>+ </NuxtLink>+ </div>+ </template>+ </template>+ </Collapse>+</template>+<script setup lang="ts">+import { type Item } from './helpers';+import Collapse from './Collapse.vue';++defineProps<{ item: Item }>();+</script>++<style lang="scss" scoped>+.item {+ display: flex;+ justify-content: flex-start;+ align-items: center;+ height: 30px;+ padding: 0 2.5px;+ margin: 2.5px 0;+ border-radius: 5px;+ color: var(--font-color);+ cursor: pointer;+ transition: all $transition-duration ease;+ width: 90%;++ &:hover,+ &.active {+ background: var(--bg-contrast-2);+ }++ .icon {+ display: flex;+ align-items: center;++ &:deep(svg) {+ fill: var(--blue);+ width: 22px;+ height: 20px;+ margin-right: 7px;++ path {+ fill: var(--blue);+ }+ }+ }+}+</style>\ No newline at end of filediff --git a/dashboard/components/sidebar/Sidebar.vue b/dashboard/components/sidebar/Sidebar.vueindex af4f854a..b37b8f0c 100644--- a/dashboard/components/sidebar/Sidebar.vue+++ b/dashboard/components/sidebar/Sidebar.vue@@ -1,111 +1,196 @@<template>- <aside class="sidebar" :class="{ open: isOpened }">- <section class="header">- <svg class="btn" @click="logout" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24">- <path- d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h280v80H200Zm440-160-55-58 102-102H360v-80h327L585-622l55-58 200 200-200 200Z" />- </svg>- <p class="name">Alexandrie</p>- <svg class="btn" @click="isOpened = !isOpened" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">- <path fill-rule="evenodd" clip-rule="evenodd"- d="M4 5C3.44772 5 3 5.44772 3 6C3 6.55228 3.44772 7 4 7H20C20.5523 7 21 6.55228 21 6C21 5.44772 20.5523 5 20 5H4ZM7 12C7 11.4477 7.44772 11 8 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H8C7.44772 13 7 12.5523 7 12ZM13 18C13 17.4477 13.4477 17 14 17H20C20.5523 17 21 17.4477 21 18C21 18.5523 20.5523 19 20 19H14C13.4477 19 13 18.5523 13 18Z" />- </svg>- </section>- <section class="body">- <Collapse v-for="(item) in items">- <template v-slot:header>- <NuxtLink class="item" @click="isMobile() ? isOpened = false : null">- <i v-if="item.icon" v-html="item.icon" class="icon"></i> <span>{{ item.title }}</span>- </NuxtLink>- </template>- <template v-slot:body>- <NuxtLink v-for="(child) in item.childrens" :class="{ item: true, children: true, active: isActive(child.id) }"- @click="isMobile() ? isOpened = false : null" :to="child.route">- <i v-html="child.icon" class="icon"></i> <span>{{ child.title }}</span>- </NuxtLink>- </template>- </Collapse>- </section>- </aside>++ <nav :class="{ open: isOpened }">+ <div :class="['sidebar', isResizing ? 'no-select' : '']">+ <div :style="{ width: panewidthCSS }">+ <div class="sidebar-content">+ <section class="header">+ <svg class="btn" @click="logout" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960"+ width="24">+ <path+ d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h280v80H200Zm440-160-55-58 102-102H360v-80h327L585-622l55-58 200 200-200 200Z" />+ </svg>+ <p class="name">Alexandrie</p>+ <svg class="btn" @click="isOpened = !isOpened" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">+ <path fill-rule="evenodd" clip-rule="evenodd"+ d="M4 5C3.44772 5 3 5.44772 3 6C3 6.55228 3.44772 7 4 7H20C20.5523 7 21 6.55228 21 6C21 5.44772 20.5523 5 20 5H4ZM7 12C7 11.4477 7.44772 11 8 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H8C7.44772 13 7 12.5523 7 12ZM13 18C13 17.4477 13.4477 17 14 17H20C20.5523 17 21 17.4477 21 18C21 18.5523 20.5523 19 20 19H14C13.4477 19 13 18.5523 13 18Z" />+ </svg>+ </section>+ <section class="body">+ <CollapseItem v-for="(item, index) in items" :key="index" :item="item" />+ </section>+ </div>++ </div>+ <div class="separator" @mousedown="startResize"></div>+ </div>+ </nav></template>-<script setup lang="ts" scoped>-import { useCategoriesStore, type Category, useNotifications } from '~/store';-import { isOpened, type Item, defaultItems, hasSidebar } from "./helpers";-import Collapse from './Collapse.vue';+<script setup lang="ts">+import CollapseItem from './CollapseItem.vue';+import { useCategoriesStore, useNotifications, useDocumentsStore, type Document } from '~/store';+import { isOpened, type Item, defaultItems, hasSidebar, paneWidth } from "./helpers";++const isResizing = ref(false)+const startX = ref(0)+const startWidth = ref(0)+const panewidthCSS = computed(() => `${paneWidth.value}px`)++// Open and close sidebar from parent component+function startResize(event: MouseEvent) {+ if (event.button !== 0 || event.buttons > 1) return; // only main (left) mouse button is allowed+ isResizing.value = true;+ startX.value = event.pageX;+ startWidth.value = paneWidth.value;++ document.addEventListener('mousemove', resize);+ document.addEventListener('mouseup', stopResize);+}+function resize(event: MouseEvent) {+ if (event.buttons === 0 || !isResizing.value) return stopResize();+ const deltaX = event.pageX - startX.value;+ let newWidth = startWidth.value + deltaX;+ //if (newWidth < minWidth) newWidth = minWidth;+ //else if (newWidth > maxWidth) newWidth = maxWidth;+ paneWidth.value = newWidth;+}+function stopResize() {+ isResizing.value = false;+ document.removeEventListener('mousemove', resize);+ document.removeEventListener('mouseup', stopResize);+}+-const route = useRoute();-const isActive = (id: string) => route.query.category === id;const isMobile = () => process.client ? window.innerWidth <= 768 : false;const handleClickOutside = (e: MouseEvent) => {- if (isOpened.value && e.target && (!(e.target as Element).closest('.sidebar') && !(e.target as Element).closest('.open-sidebar')) && isMobile()) isOpened.value = false;+ if (isOpened.value && e.target && (!(e.target as Element).closest('.sidebar') && !(e.target as Element).closest('.open-sidebar')) && isMobile()) isOpened.value = false;};const categoriesStore = useCategoriesStore();+const documentsStore = useDocumentsStore();const items = computed((): Item[] => [- ...defaultItems,- ...formatCategoriesToItems()+ ...defaultItems,+ ...formatCategoriesToItems()]);function formatCategoriesToItems(): Item[] {- const parents = categoriesStore.getParents;- const childs = categoriesStore.getChilds;- const items: Item[] = [];- parents.forEach((parent) => {- const childrens: Item[] = [];- childs(parent.id).forEach((child) => {- childrens.push({- id: child.id,- title: child.name,- icon: child.icon,- route: `/dashboard/?category=${child.id}`,- childrens: []- });- });- items.push({- id: parent.id,- title: parent.name,- icon: parent.icon,- childrens,- route: ``- });- });- return items;+ const parents = categoriesStore.getParents;+ const items: Item[] = [];+ parents.forEach((parent) => {+ const childrens: Item[] = [];+ categoriesStore.getChilds(parent.id).forEach((child) => {+ childrens.push({+ id: child.id,+ title: child.name,+ icon: child.icon,+ route: `/dashboard/?category=${child.id}`,+ childrens: documentsToItems(documentsStore.getByCategories(child.id))+ });+ });+ items.push({+ id: parent.id,+ title: parent.name,+ icon: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path style="fill:var(--blue);" d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h240l80 80h320q33 0 56.5 23.5T880-640H447l-80-80H160v480l96-320h684L837-217q-8 26-29.5 41.5T760-160H160Zm84-80h516l72-240H316l-72 240Zm0 0 72-240-72 240Zm-84-400v-80 80Z"/></svg>`,+ childrens,+ route: ``+ });+ });+ return items;+}++function documentsToItems(documents: Document[]): Item[] {+ const items: Item[] = [];+ documents.forEach((document) => {+ items.push({+ id: document.id,+ title: document.name,+ icon: '<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path style="fill:var(--yellow);" d="M320-240h320v-80H320v80Zm0-160h320v-80H320v80ZM240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z"/></svg>',+ route: `/dashboard/?doc=${document.id}`,+ childrens: []+ });+ });+ return items;}onMounted(() => {- hasSidebar.value = true;- if (!process.client) return;- isMobile() ? isOpened.value = false : isOpened.value = true;- window.addEventListener('click', handleClickOutside);+ hasSidebar.value = true;+ if (!process.client) return;+ isMobile() ? isOpened.value = false : isOpened.value = true;+ window.addEventListener('click', handleClickOutside);});onBeforeUnmount(() => {- hasSidebar.value = false;- if (!process.client) return;- window.removeEventListener('click', handleClickOutside);+ hasSidebar.value = false;+ if (!process.client) return;+ window.removeEventListener('click', handleClickOutside);});// Watch isOpenedwatch(isOpened, (val) => {- if (process.client && val && isMobile()) document.getElementById('backdrop')?.classList.add('backdrop');- if (process.client && !val && isMobile()) document.getElementById('backdrop')?.classList.remove('backdrop');+ if (process.client && val && isMobile()) document.getElementById('backdrop')?.classList.add('backdrop');+ if (process.client && !val && isMobile()) document.getElementById('backdrop')?.classList.remove('backdrop');});function logout() {- fetch(`${import.meta.env.VITE_BASE_API}/api/v1/auth/disconnection`, { credentials: "include" })- .then(() => {- const router = useRouter();- useNotifications().add({ type: 'info', title: "Success", message: 'You are now disconnected', timeout: 5000 });- router.push('/login');- })- .catch(() => {- useNotifications().add({ type: 'error', title: "Error", message: 'An error occured', timeout: 5000 });- });+ fetch(`${import.meta.env.VITE_BASE_API}/api/v1/auth/disconnection`, { credentials: "include" })+ .then(() => {+ const router = useRouter();+ useNotifications().add({ type: 'info', title: "Success", message: 'You are now disconnected', timeout: 5000 });+ router.push('/login');+ })+ .catch(() => {+ useNotifications().add({ type: 'error', title: "Error", message: 'An error occured', timeout: 5000 });+ });}</script>-<style lang="scss" scoped>++<style scoped lang="scss">@import "./sidebar.scss";-</style>+nav {+ position: fixed;+ top: 0;+ left: 0;+ transition: transform 0.3s;+ transform: translate(-100%);+ height: 100%;+ z-index: 100;+}++.sidebar {+ background-color: var(--bg-contrast);+ overflow-x: hidden;+ height: 100%;+ display: flex;++}++.open {+ transform: translate(0);+}++.separator {+ width: 5px;+ cursor: col-resize;+}++.sidebar {+ &:hover {+ .separator {+ background-color: var(--bg-contrast-2);+ }+ }+}++/* Disable text selection while resizing */+/* Selection can cause problems with selection */+/* PREVENT SELECTION DURING MOUSE EVENTS */+.no-select {+ user-select: none;+ -moz-user-select: none;+ -webkit-user-select: none;+ -ms-user-select: none;+}+</style>\ No newline at end of filediff --git a/dashboard/components/sidebar/Sidebar2.vue b/dashboard/components/sidebar/Sidebar2.vuedeleted file mode 100644index 6c53dd1f..00000000--- a/dashboard/components/sidebar/Sidebar2.vue+++ /dev/null@@ -1,197 +0,0 @@-<template>-- <nav :class="{ open: isOpened }">- <div :class="['sidebar', isResizing ? 'no-select' : '']">- <div :style="{ width: panewidthCSS }">- <div class="sidebar-content">- <section class="header">- <svg class="btn" @click="logout" xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960"- width="24">- <path- d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h280v80H200Zm440-160-55-58 102-102H360v-80h327L585-622l55-58 200 200-200 200Z" />- </svg>- <p class="name">Alexandrie</p>- <svg class="btn" @click="isOpened = !isOpened" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">- <path fill-rule="evenodd" clip-rule="evenodd"- d="M4 5C3.44772 5 3 5.44772 3 6C3 6.55228 3.44772 7 4 7H20C20.5523 7 21 6.55228 21 6C21 5.44772 20.5523 5 20 5H4ZM7 12C7 11.4477 7.44772 11 8 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H8C7.44772 13 7 12.5523 7 12ZM13 18C13 17.4477 13.4477 17 14 17H20C20.5523 17 21 17.4477 21 18C21 18.5523 20.5523 19 20 19H14C13.4477 19 13 18.5523 13 18Z" />- </svg>- </section>- <section class="body">- <Collapse v-for="(item) in items">- <template v-slot:header>- <NuxtLink class="item" @click="isMobile() ? isOpened = false : null">- <i v-if="item.icon" v-html="item.icon" class="icon"></i> <span>{{ item.title }}</span>- </NuxtLink>- </template>- <template v-slot:body>- <NuxtLink v-for="(child) in item.childrens"- :class="{ item: true, children: true, active: isActive(child.id) }"- @click="isMobile() ? isOpened = false : null" :to="child.route">- <i v-html="child.icon" class="icon"></i> <span>{{ child.title }}</span>- </NuxtLink>- </template>- </Collapse>- </section>- </div>-- </div>- <div class="separator" @mousedown="startResize"></div>- </div>- </nav>-</template>--<script setup lang="ts">-const isResizing = ref(false)-const startX = ref(0)-const startWidth = ref(0)-import { paneWidth } from './helpers'-const panewidthCSS = computed(() => `${paneWidth.value}px`)--// Open and close sidebar from parent component-function startResize(event: MouseEvent) {- if (event.button !== 0 || event.buttons > 1) return; // only main (left) mouse button is allowed- isResizing.value = true;- startX.value = event.pageX;- startWidth.value = paneWidth.value;-- document.addEventListener('mousemove', resize);- document.addEventListener('mouseup', stopResize);-}-function resize(event: MouseEvent) {- if (event.buttons === 0 || !isResizing.value) return stopResize();- const deltaX = event.pageX - startX.value;- let newWidth = startWidth.value + deltaX;- //if (newWidth < minWidth) newWidth = minWidth;- //else if (newWidth > maxWidth) newWidth = maxWidth;- paneWidth.value = newWidth;-}-function stopResize() {- isResizing.value = false;- document.removeEventListener('mousemove', resize);- document.removeEventListener('mouseup', stopResize);-}--import { useCategoriesStore, useNotifications } from '~/store';-import { isOpened, type Item, defaultItems, hasSidebar } from "./helpers";-import Collapse from './Collapse.vue';--const route = useRoute();-const isActive = (id: string) => route.query.category === id;-const isMobile = () => process.client ? window.innerWidth <= 768 : false;-const handleClickOutside = (e: MouseEvent) => {- if (isOpened.value && e.target && (!(e.target as Element).closest('.sidebar') && !(e.target as Element).closest('.open-sidebar')) && isMobile()) isOpened.value = false;-};-const categoriesStore = useCategoriesStore();-const items = computed((): Item[] => [- ...defaultItems,- ...formatCategoriesToItems()-]);--function formatCategoriesToItems(): Item[] {- const parents = categoriesStore.getParents;- const childs = categoriesStore.getChilds;- const items: Item[] = [];- parents.forEach((parent) => {- const childrens: Item[] = [];- childs(parent.id).forEach((child) => {- childrens.push({- id: child.id,- title: child.name,- icon: child.icon,- route: `/dashboard/?category=${child.id}`,- childrens: []- });- });- items.push({- id: parent.id,- title: parent.name,- icon: parent.icon,- childrens,- route: ``- });- });- return items;-}--onMounted(() => {- hasSidebar.value = true;- if (!process.client) return;- isMobile() ? isOpened.value = false : isOpened.value = true;- window.addEventListener('click', handleClickOutside);-});-onBeforeUnmount(() => {- hasSidebar.value = false;- if (!process.client) return;- window.removeEventListener('click', handleClickOutside);-});---// Watch isOpened-watch(isOpened, (val) => {- if (process.client && val && isMobile()) document.getElementById('backdrop')?.classList.add('backdrop');- if (process.client && !val && isMobile()) document.getElementById('backdrop')?.classList.remove('backdrop');-});--function logout() {- fetch(`${import.meta.env.VITE_BASE_API}/api/v1/auth/disconnection`, { credentials: "include" })- .then(() => {- const router = useRouter();- useNotifications().add({ type: 'info', title: "Success", message: 'You are now disconnected', timeout: 5000 });- router.push('/login');- })- .catch(() => {- useNotifications().add({ type: 'error', title: "Error", message: 'An error occured', timeout: 5000 });- });-}---</script>--<style scoped lang="scss">-@import "./sidebar2.scss";--nav {- position: fixed;- top: 0;- left: 0;- transition: transform 0.3s;- transform: translate(-100%);- height: 100%;- z-index: 100;-}--.sidebar {- background-color: var(--bg-contrast);- overflow-x: hidden;- height: 100%;- display: flex;--}--.open {- transform: translate(0);-}--.separator {- width: 5px;- cursor: col-resize;-}--.sidebar {- &:hover {- .separator {- background-color: var(--bg-contrast-2);- }- }-}--/* Disable text selection while resizing */-/* Selection can cause problems with selection */-/* PREVENT SELECTION DURING MOUSE EVENTS */-.no-select {- user-select: none;- -moz-user-select: none;- -webkit-user-select: none;- -ms-user-select: none;-}-</style>\ No newline at end of filediff --git a/dashboard/components/sidebar/helpers.ts b/dashboard/components/sidebar/helpers.tsindex b62dab66..cf22007e 100644--- a/dashboard/components/sidebar/helpers.ts+++ b/dashboard/components/sidebar/helpers.ts@@ -2,7 +2,7 @@ import { ref } from 'vue';export const isOpened = ref(false);export const hasSidebar = ref(false);-export const paneWidth = ref(320); // initial width of pane 1+export const paneWidth = ref(330); // initial width of pane 1export interface Item {id: string;title: string;diff --git a/dashboard/components/sidebar/sidebar.scss b/dashboard/components/sidebar/sidebar.scssindex 2b4fd89f..12d3f601 100644--- a/dashboard/components/sidebar/sidebar.scss+++ b/dashboard/components/sidebar/sidebar.scss@@ -1,111 +1,40 @@-// Variables-$sidebar-icon-size: 22px;-$sidebar-width: 300px;--// Sidebar-.sidebar {- background: var(--bg-contrast);- border-bottom-right-radius: 10px;- border-top-right-radius: 10px;- display: flex;- flex-direction: column;- font: 1rem $internal-font;- height: 100%;- left: 0;- overflow-x: hidden;- overflow-y: auto;- position: fixed;- top: 0;- transform: translateX(-100%);- transition: all $transition-duration ease;- width: $sidebar-width;- z-index: 100;-- &.open {- transform: translateX(0);- }-- @media screen and (min-width: 768px) {- &.open {- width: $sidebar-width;- }-- position: relative;- transform: translateX(0);- width: 0;- }-}--// Header-.header {- display: flex;- justify-content: space-between;- align-items: center;- height: 40px;- margin-top: 5px;-- .btn {- fill: var(--font-color);- width: 30px;- cursor: pointer;- opacity: 0.9;-- &:hover {- opacity: 1;- }- }-- .name {- font-size: 1.2rem;- font-weight: 500;- }-}--// Body-.body {- display: flex;- flex-direction: column;- margin: 5px;-- .item {- display: flex;- justify-content: flex-start;- align-items: center;- height: 30px;- padding: 0 2.5px;- margin: 2.5px 0;- border-radius: 5px;- color: var(--font-color);- cursor: pointer;- transition: all $transition-duration ease;- opacity: 0.7;- width: 90%;-- &:hover,- &.active {- opacity: 1;- background: var(--bg-contrast);- }-- .icon {- display: flex;- align-items: center;-- &:deep(svg) {- fill: var(--font-color);- width: $sidebar-icon-size;- height: $sidebar-icon-size - 2px;- margin-right: 7px;-- path {- fill: var(--font-color);- }- }- }- }-- .children {- margin-left: 25px;- padding-left: 5px;- }+// Variables+$sidebar-icon-size: 22px;++// Sidebar+.sidebar-content {+ margin: 0 5px 0 10px;+ background: var(--bg-contrast);+ display: flex;+ flex-direction: column;+ height: 100%;+ overflow-x: hidden;+ overflow-y: auto;+}+++// Header+.header {+ display: flex;+ justify-content: space-between;+ align-items: center;+ height: 40px;+ margin-top: 5px;++ .btn {+ fill: var(--font-color);+ width: 30px;+ cursor: pointer;+ }++ .name {+ font-size: 1.2rem;+ font-weight: 500;+ }+}++.body {+ display: flex;+ flex-direction: column;+ margin: 5px;}\ No newline at end of filediff --git a/dashboard/components/sidebar/sidebar2.scss b/dashboard/components/sidebar/sidebar2.scssdeleted file mode 100644index d646d340..00000000--- a/dashboard/components/sidebar/sidebar2.scss+++ /dev/null@@ -1,88 +0,0 @@-// Variables-$sidebar-icon-size: 22px;--// Sidebar-.sidebar-content {- margin: 0 5px 0 10px;- background: var(--bg-contrast);- display: flex;- flex-direction: column;- height: 100%;- overflow-x: hidden;- overflow-y: auto;-}---// Header-.header {- display: flex;- justify-content: space-between;- align-items: center;- height: 40px;- margin-top: 5px;-- .btn {- fill: var(--font-color);- width: 30px;- cursor: pointer;- opacity: 0.9;-- &:hover {- opacity: 1;- }- }-- .name {- font-size: 1.2rem;- font-weight: 500;- }-}--// Body-.body {- display: flex;- flex-direction: column;- margin: 5px;-- .item {- display: flex;- justify-content: flex-start;- align-items: center;- height: 30px;- padding: 0 2.5px;- margin: 2.5px 0;- border-radius: 5px;- color: var(--font-color);- cursor: pointer;- transition: all $transition-duration ease;- opacity: 0.7;- width: 90%;-- &:hover,- &.active {- opacity: 1;- background: var(--bg-contrast);- }-- .icon {- display: flex;- align-items: center;-- &:deep(svg) {- fill: var(--font-color);- width: $sidebar-icon-size;- height: $sidebar-icon-size - 2px;- margin-right: 7px;-- path {- fill: var(--font-color);- }- }- }- }-- .children {- margin-left: 25px;- padding-left: 5px;- }-}\ No newline at end of filediff --git a/dashboard/pages/dashboard.vue b/dashboard/pages/dashboard.vueindex 6bc85d8b..1c5a0fd2 100644--- a/dashboard/pages/dashboard.vue+++ b/dashboard/pages/dashboard.vue@@ -1,13 +1,11 @@<template><div style="display: flex; width: 100%; height: 100%;">- <Sidebar2 />+ <Sidebar /><MediumView><NuxtPage />-</MediumView></div></template><script setup lang="ts">-import Sidebar2 from '~/components/sidebar/Sidebar2.vue';-+import Sidebar from '~/components/sidebar/Sidebar.vue';</script>\ No newline at end of file