π 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 Raphael552de14c8580
diff --git a/@alexandrie/styles/src/_variables.scss b/@alexandrie/styles/src/_variables.scssindex 477244a7..afba5858 100644--- a/@alexandrie/styles/src/_variables.scss+++ b/@alexandrie/styles/src/_variables.scss@@ -68,13 +68,13 @@ $transition-duration: 0.3s;--blue: #47a6ff;--blue-bg: rgb(0, 140, 216, 0.2);--blue-border: rgba(0, 140, 216, 0.25);- --green: rgb(66, 211, 146);+ --green: #42b983;--green-bg: rgba(66, 184, 131, 0.2);--green-border: rgba(66, 184, 131, 0.25);--red: #ff4882;--red-bg: rgba(237, 60, 80, 0.2);--red-border: rgba(237, 60, 80, .25);- --yellow: #fcd253;+ --yellow: #f7b32d;--yellow-bg: rgba(255, 197, 23, 0.2);--yellow-border: rgba(255, 197, 23, .25);--turquoise: #00d6b4;diff --git a/dashboard/components/sidebar/Sidebar.vue b/dashboard/components/sidebar/Sidebar.vueindex e9e3f63c..201a79b3 100644--- a/dashboard/components/sidebar/Sidebar.vue+++ b/dashboard/components/sidebar/Sidebar.vue@@ -1,13 +1,15 @@<template>- <Resizable class="no-print">+ <Resizable>+<div class="sidebar-content"><section class="header"><IconApp /><p style="font-size: 19px;font-weight: 600;">Dashboard</p><IconClose class="btn" /></section>+ <SidebarDropdown :categories="categoriesStore.getParents" v-model="category_dropdown_filter" /><section>- <CollapseItem v-for="(item, index) in items" :key="index" :item="item" />+ <CollapseItem v-for="( item, index ) in items " :key="index" :item="item" /></section></div></Resizable>@@ -25,18 +27,25 @@ 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 category_dropdown_filter = ref('');const categoriesStore = useCategoriesStore();const documentsStore = useDocumentsStore();const items = computed((): Item[] => [...defaultItems,- ...formatTree()+ ...formatTree().filter((item) => {+ if (category_dropdown_filter.value === '') return true;+ return item.id === category_dropdown_filter.value;+ })]);type DocumentTree = Document & { childrens: DocumentTree[] };function formatTree(): Item[] {- console.log('formatTree');- const parents = categoriesStore.getParents;++ const parents = categoriesStore.getParentsconst items: Item[] = [];parents.forEach((parent) => {const childrens: Item[] = [];diff --git a/dashboard/components/sidebar/SidebarDropdown.vue b/dashboard/components/sidebar/SidebarDropdown.vuenew file mode 100644index 00000000..345e6dde--- /dev/null+++ b/dashboard/components/sidebar/SidebarDropdown.vue@@ -0,0 +1,33 @@+<template>+ <div class="container">+ <select name="category-filter" @change="(v: any) => selected = v.target?.value">+ <option value="">All</option>+ <option v-for="category in categories" :key="category.id" :value="category.id">+ {{ category.name }}+ </option>+ </select>+ </div>+</template>++<script setup lang="ts">+import type { Category } from '~/store';++defineProps<{ categories: Category[] }>();+const selected = defineModel();+</script>++<style scoped lang="scss">+.container {+ padding: 5px 10px 0 0;+}++select {+ border-radius: 5px;+ padding: 5px 0;+ border: 1px solid var(--border-color);+ background: var(--bg-contrast-2);+ color: var(--font-color);+ cursor: pointer;+ outline: none;+}+</style>diff --git a/dashboard/components/sidebar/SidebarItem.vue b/dashboard/components/sidebar/SidebarItem.vueindex 4551fc6d..b1b716bd 100644--- a/dashboard/components/sidebar/SidebarItem.vue+++ b/dashboard/components/sidebar/SidebarItem.vue@@ -25,7 +25,7 @@ const isActive = (id: string) => doc_id.value === id;border-radius: 5px;color: var(--font-color);cursor: pointer;- width: 90%;+ width: 98%;&:hover,&.active {diff --git a/dashboard/components/sidebar/__sidebar.scss b/dashboard/components/sidebar/__sidebar.scssindex c23871f9..165249b7 100644--- a/dashboard/components/sidebar/__sidebar.scss+++ b/dashboard/components/sidebar/__sidebar.scss@@ -1,6 +1,6 @@// Sidebar.sidebar-content {- margin: 0 5px 0 10px;+ margin: 0 0 0 10px;background: var(--bg-contrast);display: flex;flex-direction: column;@@ -27,8 +27,4 @@font-size: 1.2rem;font-weight: 500;}-}--.body {- margin: 5px;}\ No newline at end of filediff --git a/dashboard/components/sidebar/helpers.ts b/dashboard/components/sidebar/helpers.tsindex 8d4acc6e..e61ee9db 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(335); // initial width of pane 1+export const paneWidth = ref(340); // initial width of pane 1export interface Item {id: string;title: string;diff --git a/dashboard/pages/login.vue b/dashboard/pages/login.vueindex 1c71614e..5f525d12 100644--- a/dashboard/pages/login.vue+++ b/dashboard/pages/login.vue@@ -25,8 +25,6 @@</div></template><script setup lang="ts">-const theme = useColorMode()-console.log(theme)const router = useRouter()const username = ref('')const errors = ref({diff --git a/dashboard/store/documents.store.ts b/dashboard/store/documents.store.tsindex 9bfca772..dadf8143 100644--- a/dashboard/store/documents.store.ts+++ b/dashboard/store/documents.store.ts@@ -38,8 +38,6 @@ export const useDocumentsStore = defineStore('documents', {);if (request.status == 'success') {if (opts?.id) {- console.log(request.result);-const index = this.documents.findIndex(d => d.id == opts?.id);const updatedDocument: Document = { ...request.result, partial: false };if (index == -1) this.documents.push(updatedDocument);