📚 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
New theme updates, reset settings, improve design, fixes, improve doc category pages, remove old code
Smaug6739f60b8a7096e4
diff --git a/backend/.env.example b/backend/.env.exampleindex 5f867bdd..5c858df2 100644--- a/backend/.env.example+++ b/backend/.env.example@@ -3,6 +3,9 @@ DATABASE_USER=rootDATABASE_PASSWORD=rootDOMAIN_CLIENT=http://localhost:3000+COOKIE_DOMAIN=localhost++MINIO_ACCESSKEY=access_keyMINIO_SECRETKEY=secret_keyMINIO_ENDPOINT=localhost:9000diff --git a/backend/main.go b/backend/main.goindex d5f07ca2..0fb6c9ab 100644--- a/backend/main.go+++ b/backend/main.go@@ -9,5 +9,5 @@ func main() {server, application := server.SetupServer()defer application.DB.Close()- server.Run("localhost:" + fmt.Sprintf("%d", application.Config.Port))+ server.Run("192.168.0.25:" + fmt.Sprintf("%d", application.Config.Port))}diff --git a/frontend/app/.env.development b/frontend/app/.env.developmentindex 30dc16bf..5004934f 100644--- a/frontend/app/.env.development+++ b/frontend/app/.env.development@@ -1,2 +1,2 @@-VITE_BASE_API="http://localhost:8201"+VITE_BASE_API="http://192.168.0.25:8201"VITE_BASE_CDN="http://localhost:9000/alexandrie"\ No newline at end of filediff --git a/frontend/app/components/AppButton.vue b/frontend/app/components/AppButton.vueindex fb268fcc..13fa14db 100644--- a/frontend/app/components/AppButton.vue+++ b/frontend/app/components/AppButton.vue@@ -11,7 +11,6 @@ const onClick = () => emit('click');</script><style scoped lang="scss">-@use 'sass:color';button {padding: 10px;border-radius: 6px;@@ -31,10 +30,10 @@ button {}}.secondary {- outline: 1px solid var(--primary);+ border: 1px solid var(--primary);color: var(--font-color);&:hover {- box-shadow: 0 2px 10px var(--shadow);+ background: var(--selection-color);}}.success {diff --git a/frontend/app/components/AppColorPicker.vue b/frontend/app/components/AppColorPicker.vueindex a01e25a8..933c887d 100644--- a/frontend/app/components/AppColorPicker.vue+++ b/frontend/app/components/AppColorPicker.vue@@ -6,6 +6,7 @@:style="{ outline: selectedColor == -1 ? '2px solid var(--font-color-light)' : '' }":class="{ selected: selectedColor === -1 }"@click="selectColor(-1)"+ v-if="nullable"></div><divv-for="(_, index) in appColors"@@ -19,10 +20,10 @@</template><script setup lang="ts">-const props = defineProps<{ selectedColor?: number | null; nullable?: boolean }>();+const props = defineProps<{ selectedColor?: number; nullable?: boolean }>();const emit = defineEmits<{ (e: 'update:selectedColor', color: number): void }>();-const selectedColor = ref<number | null | undefined>(props.selectedColor || -1);+const selectedColor = ref<number | undefined>(props.selectedColor ?? -1);function selectColor(color: number) {selectedColor.value = color;@@ -38,7 +39,6 @@ function selectColor(color: number) {padding: 6px;border-radius: 6px;border: 1px solid var(--border-color);- background: var(--bg-contrast-2);}.color-option {diff --git a/frontend/app/components/AppDotMenu.vue b/frontend/app/components/AppDotMenu.vueindex 55c1268a..716edf08 100644--- a/frontend/app/components/AppDotMenu.vue+++ b/frontend/app/components/AppDotMenu.vue@@ -61,7 +61,8 @@ onBeforeUnmount(() => document.removeEventListener('mousedown', handleClickOutsiposition: absolute;right: 0;margin-top: 4px;- min-width: 200px;+ padding: 6px;+ min-width: 270px;background: white;border-radius: 6px;box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);diff --git a/frontend/app/components/AppSelect.vue b/frontend/app/components/AppSelect.vueindex 49641865..8afe2b99 100644--- a/frontend/app/components/AppSelect.vue+++ b/frontend/app/components/AppSelect.vue@@ -105,20 +105,20 @@ function handleBlur(event: FocusEvent) {.category-select {position: relative;width: 200px;+ border: 1px solid var(--border-color);+ border-radius: 5px;+ &:focus {+ outline: 2px solid var(--border-color);+ }}button,.search-input {width: 100%;padding: 8px;- border: 1px solid var(--border-color);text-align: left;- border-radius: 6px;- font-size: 15px;+ font-size: 16px;cursor: pointer;- &:focus {- outline: 2px solid var(--border-color);- }}.search-input {diff --git a/frontend/app/components/AppSelectNode.vue b/frontend/app/components/AppSelectNode.vueindex 2fc6477b..2778715b 100644--- a/frontend/app/components/AppSelectNode.vue+++ b/frontend/app/components/AppSelectNode.vue@@ -31,7 +31,7 @@ function select() {text-align: left;cursor: pointer;font-size: 15px;- width: 95%;+ width: calc(100% - 6px);margin: 0 auto;}diff --git a/frontend/app/components/DocumentCard.vue b/frontend/app/components/DocumentCard.vueindex 9f63816e..57797419 100644--- a/frontend/app/components/DocumentCard.vue+++ b/frontend/app/components/DocumentCard.vue@@ -5,7 +5,7 @@<span style="display: flex"><Icon :name="category?.icon || 'files'" :class="`category-icon ${getAppColor(category?.color as number)}`" /> <NuxtLink :to="`/dashboard/docs/${document.id}`" class="document-title">{{ document.name }}</NuxtLink></span>- <DocumentDotMenu :document="document" :user="user" />+ <DocumentDotMenu :document="document" :user="user" @delete="deleteDoc" /></div><div class="body"><div class="category">{{ category?.name }}</div>@@ -33,22 +33,18 @@<script setup lang="ts">import type { Document } from '@/stores';+import DeleteDocumentModal from '~/pages/dashboard/docs/_modals/DeleteDocumentModal.vue';+const props = defineProps<{ document: Document }>();const categoriesStore = useCategoriesStore();const category = computed(() => categoriesStore.getById(props.document.category || ''));const user = useUserStore().user;+const deleteDoc = () => useModal().add(new Modal(shallowRef(DeleteDocumentModal), { documentId: props.document.id }));+function formatDate(timestamp: number): string {const date = new Date(timestamp);return `${date.getDate()} ${date.toLocaleString('default', { month: 'short' })} ${date.getFullYear()}`;}-function numDate(timestamp: string): string {- const date = new Date(timestamp);- return date.toLocaleDateString('en-US', {- year: 'numeric',- month: '2-digit',- day: '2-digit',- });-}</script><style scoped lang="scss">diff --git a/frontend/app/components/DocumentDotMenu.vue b/frontend/app/components/DocumentDotMenu.vueindex 8b92ec7f..46225780 100644--- a/frontend/app/components/DocumentDotMenu.vue+++ b/frontend/app/components/DocumentDotMenu.vue@@ -3,7 +3,7 @@<button @click="open"><Icon name="file_open" /> Open</button><button @click="edit"><Icon name="edit_page" /> Edit</button><button @click="copyLink"><Icon name="link" /> Copy link</button>- <button @click="emitDelete"><Icon name="delete" /> Delete</button>+ <button @click="emitDelete"><Icon name="delete" fill="red" /> Delete</button><hr style="margin: 2px 0" /><div class="foot-menu"><p style="display: flex; align-items: center; gap: 8px"><img :src="useAvatar(user)" alt="Avatar" style="width: 20px; height: 20px; border-radius: 50%; margin: 0" />{{ user?.username }}</p>diff --git a/frontend/app/components/DocumentLine.vue b/frontend/app/components/DocumentLine.vueindex e74a090b..8b783863 100644--- a/frontend/app/components/DocumentLine.vue+++ b/frontend/app/components/DocumentLine.vue@@ -38,8 +38,7 @@ function formatDate(timestamp: number): string {display: flex;flex-direction: column;padding: 12px;- border-bottom: 1px solid var(--border-color);- background-color: var(--bg-contrast);+ border: 1px solid var(--border-color);}header {display: flex;diff --git a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vueindex 8e683e28..10231650 100644--- a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue+++ b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue@@ -268,14 +268,13 @@ function save() {}</script>-<style scoped>+<style scoped lang="scss">.markdown {flex: 1;display: flex;gap: 8px;min-height: 0; /* permet aux enfants flexibles de ne pas déborder */}-.editor-container {width: 100%;height: 100%;@@ -285,15 +284,16 @@ function save() {.codemirror-editor {flex: 1;- border: 1px solid var(--border-color);border-radius: 6px;overflow: auto;}+.editor-container:deep(.cm-editor) {+ height: 100%;+}.markdown-preview {flex: 1;overflow: auto;- border: 1px solid var(--border-color);padding: 1rem;border-radius: 6px;background: var(--bg-color);@@ -301,6 +301,7 @@ function save() {}input {outline: none;+ border: none;}.title {diff --git a/frontend/app/components/MarkdownEditor/Toolbar.vue b/frontend/app/components/MarkdownEditor/Toolbar.vueindex 21906fed..61dac370 100644--- a/frontend/app/components/MarkdownEditor/Toolbar.vue+++ b/frontend/app/components/MarkdownEditor/Toolbar.vue@@ -132,9 +132,10 @@ svg,}input,-select {+.select {display: inline-block;max-width: 350px;+ font-size: 0.9rem !important;}.entry {background-color: var(--bg-color);diff --git a/frontend/app/components/Sidebar/Dock.vue b/frontend/app/components/Sidebar/Dock.vueindex a2f3bd37..2f526135 100644--- a/frontend/app/components/Sidebar/Dock.vue+++ b/frontend/app/components/Sidebar/Dock.vue@@ -63,6 +63,6 @@ a.router-link-active {<script setup lang="ts">function closeDock() {- usePreferences().set('hideDock', false);+ usePreferences().set('view_dock', false);}</script>diff --git a/frontend/app/components/Sidebar/Resizable.vue b/frontend/app/components/Sidebar/Resizable.vueindex e2c8fee4..fc326b93 100644--- a/frontend/app/components/Sidebar/Resizable.vue+++ b/frontend/app/components/Sidebar/Resizable.vue@@ -69,7 +69,6 @@ nav {.open {transform: translate(0);- border-radius: 0 15px 15px 0; // arrondi sur le bord droitborder-right: 1px solid var(--border-color);}diff --git a/frontend/app/components/Sidebar/Sidebar.vue b/frontend/app/components/Sidebar/Sidebar.vueindex 9b7210db..ddb19c22 100644--- a/frontend/app/components/Sidebar/Sidebar.vue+++ b/frontend/app/components/Sidebar/Sidebar.vue@@ -1,7 +1,7 @@<template><div :class="{ 'sidebar-mask': isMobile() && isOpened }"></div><Resizable>- <Dock v-if="!isMobile() && preferences.get('hideDock')" />+ <Dock v-if="!isMobile() && preferences.get('view_dock')" /><div class="sidebar" :class="{ compact: preferences.get('compactMode') }"><section class="header"><span class="name">@@ -43,7 +43,7 @@ import Resizable from './Resizable.vue';import IconClose from './IconClose.vue';import Search from './Search.vue';import { navigationItems } from './helpers';-import NewCategoryModal from '../../pages/dashboard/categories/_modals/CreateCategoryModal.vue';+import NewCategoryModal from '@/pages/dashboard/categories/_modals/CreateCategoryModal.vue';import Dock from './Dock.vue';const { isOpened, hasSidebar } = useSidebar();@@ -52,13 +52,13 @@ const preferences = usePreferences();const userStore = useUserStore();const filter = ref<string>('');const showSearchModal = ref<boolean>(false);-const workspaces = computed(() => [{ text: 'All workspaces', value: null }, ...categoriesStore.categories.filter(c => c.role === 2).map(c => ({ text: c.name, value: c.id }))]);+const workspaces = computed(() => [{ text: 'All workspaces', value: null }, ...categoriesStore.categories.filter(c => c.role === 2).map(c => ({ text: c.name, value: c.id, meta: c }))]);const handleSearchShortCut = (e: KeyboardEvent) => {if (e.ctrlKey && e.key === 'q') showSearchModal.value = !showSearchModal.value;};const sidebarTree = useSidebarTree();-const toggleDock = () => preferences.set('hideDock', !preferences.get('hideDock'));+const toggleDock = () => preferences.set('view_dock', !preferences.get('view_dock'));const filterItems = (items: Item[]): Item[] => {if (!filter.value.trim()) return items;const filterRecursive = (items: Item[]): Item[] => {diff --git a/frontend/app/components/Sidebar/SidebarWorkspace.vue b/frontend/app/components/Sidebar/SidebarWorkspace.vueindex e411e157..40d95250 100644--- a/frontend/app/components/Sidebar/SidebarWorkspace.vue+++ b/frontend/app/components/Sidebar/SidebarWorkspace.vue@@ -1,6 +1,6 @@<template><div>- <svg xmlns="http://www.w3.org/2000/svg" height="18px" viewBox="0 -960 960 960" width="18px" fill="var(--font-color)">+ <svg xmlns="http://www.w3.org/2000/svg" height="22px" viewBox="0 -960 960 960" width="22px" fill="var(--font-color)" :class="option.meta?.color ? getAppColor(option.meta?.color) : ''"><pathd="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-640v560h560v-560h-80v245q0 12-10 17.5t-20-.5l-49-30q-10-6-21-6t-21 6l-49 30q-10 6-20 .5T480-515v-245H200Zm0 560v-560 560Z"/>@@ -21,4 +21,8 @@ div {display: flex;align-items: center;}+svg {+ padding: 1px;+ border-radius: 5px;+}</style>diff --git a/frontend/app/components/Sidebar/SidebarWorkspaces.vue b/frontend/app/components/Sidebar/SidebarWorkspaces.vueindex 055b8d4e..d9b77398 100644--- a/frontend/app/components/Sidebar/SidebarWorkspaces.vue+++ b/frontend/app/components/Sidebar/SidebarWorkspaces.vue@@ -42,14 +42,13 @@ onBeforeUnmount(() => document.removeEventListener('click', handleClickOutside)).dropdown-container {position: relative;width: calc(100% - 4px);- padding: 0 1px;}.dropdown-selected {display: flex;justify-content: space-between;align-items: center;- padding: 2px 8px;+ padding: 2px 10px 2px 4px;border: 1px solid var(--border-color);margin: 4px 0;border-radius: 6px;diff --git a/frontend/app/components/Sidebar/helpers.ts b/frontend/app/components/Sidebar/helpers.tsindex 625ad1ee..f65dc609 100644--- a/frontend/app/components/Sidebar/helpers.ts+++ b/frontend/app/components/Sidebar/helpers.ts@@ -1,3 +1,5 @@+import type { Category } from '~/stores';+export interface DefaultItem {id: string;type: 'navigation';@@ -9,6 +11,7 @@ export interface DefaultItem {export interface Workspace {text: string;value: string | null;+ meta?: Category;}export const navigationItems: Item<DefaultItem>[] = [diff --git a/frontend/app/composables/Preferences.ts b/frontend/app/composables/Preferences.tsindex 10175419..2859d454 100644--- a/frontend/app/composables/Preferences.ts+++ b/frontend/app/composables/Preferences.ts@@ -1,7 +1,7 @@// composables/usePreferences.tsimport { ref, computed, watch } from 'vue';-export type PreferenceKey = 'printMode' | 'darkMode' | 'hideTOC' | 'compactMode' | 'hideSidebarRessources' | 'normalizeFileIcons' | 'datatableItemsCount' | 'hideDock' | 'primaryColor' | 'docSize' | 'sidebarCollapseItems';+export type PreferenceKey = 'printMode' | 'darkMode' | 'hideTOC' | 'compactMode' | 'hideSidebarRessources' | 'normalizeFileIcons' | 'datatableItemsCount' | 'view_dock' | 'primaryColor' | 'docSize' | 'sidebarCollapseItems';export interface Preference {key: PreferenceKey;@@ -14,9 +14,9 @@ const DEFAULT_PREFERENCES: Record<PreferenceKey, any> = {hideTOC: false,compactMode: false,hideSidebarRessources: false,- normalizeFileIcons: true,+ normalizeFileIcons: false,datatableItemsCount: 10,- hideDock: false,+ view_dock: true,primaryColor: 0,docSize: 1, // 0 = small, 1 = largesidebarCollapseItems: [],diff --git a/frontend/app/helpers/icons.ts b/frontend/app/helpers/icons.tsindex d4522875..0bb75b65 100644--- a/frontend/app/helpers/icons.ts+++ b/frontend/app/helpers/icons.ts@@ -5,7 +5,6 @@ const icons = {arrow_close: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M440-240 200-480l240-240 56 56-183 184 183 184-56 56Zm264 0L464-480l240-240 56 56-183 184 183 184-56 56Z"/></svg>`,backup: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M260-160q-91 0-155.5-63T40-377q0-78 47-139t123-78q17-72 85-137t145-65q33 0 56.5 23.5T520-716v242l64-62 56 56-160 160-160-160 56-56 64 62v-242q-76 14-118 73.5T280-520h-20q-58 0-99 41t-41 99q0 58 41 99t99 41h480q42 0 71-29t29-71q0-42-29-71t-71-29h-60v-80q0-48-22-89.5T600-680v-93q74 35 117 103.5T760-520q69 8 114.5 59.5T920-340q0 75-52.5 127.5T740-160H260Zm220-358Z"/></svg>`,categories: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M320-320h480v-480h-80v245q0 12-10 18t-20-1l-49-29q-10-6-21.5-6t-20.5 6l-49 29q-11 7-20.5 1t-9.5-18v-245H320v480Zm0 80q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-520q0-17 11.5-28.5T120-720q17 0 28.5 11.5T160-680v520h520q17 0 28.5 11.5T720-120q0 17-11.5 28.5T680-80H160Zm160-720v480-480Zm200 245q0 12 9.5 18t20.5-1l49-29q9-6 20.5-6t21.5 6l49 29q10 7 20 1t10-18q0 12-10 18t-20-1l-49-29q-10-6-21.5-6t-20.5 6l-49 29q-11 7-20.5 1t-9.5-18Z"/></svg>`,- //`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M320-320h480v-480h-80v280l-100-60-100 60v-280H320v480Zm0 80q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Zm360-720h200-200Zm-200 0h480-480Z"/></svg>`,cdn: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M485-440h163q26 0 44-18t18-44q0-26-18-44.5T648-565h-2q-5-32-29-53.5T560-640q-26 0-47 13.5T481-590q-30 2-50.5 23.5T410-515q0 30 21.5 52.5T485-440ZM120-120q-33 0-56.5-23.5T40-200v-480q0-17 11.5-28.5T80-720q17 0 28.5 11.5T120-680v480h640q17 0 28.5 11.5T800-160q0 17-11.5 28.5T760-120H120Zm160-160q-33 0-56.5-23.5T200-360v-440q0-33 23.5-56.5T280-880h167q16 0 30.5 6t25.5 17l57 57h280q33 0 56.5 23.5T920-720v360q0 33-23.5 56.5T840-280H280Zm0-80h560v-360H527l-80-80H280v440Zm0 0v-440 440Z"/></svg>`,close: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"stroke-linecap="round" stroke-linejoin="round" class="h-4 w-4"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg>`,collapse: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="m480-500 160-160H320l160 160Zm280-340q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560ZM200-320v120h560v-120H200Zm560-80v-360H200v360h560Zm-560 80v120-120Z"/></svg>`,@@ -19,7 +18,7 @@ const icons = {file: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path style="fill:var(--red);" d="M200-200h360v-200h200v-360H200v560Zm0 80q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v400L600-120H200Zm80-280v-80h200v80H280Zm0-160v-80h400v80H280Zm-80 360v-560 560Z"/></svg>`,file_shortcut: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="var(--primary)"><path d="M400-280h160v-80H400v80Zm0-160h280v-80H400v80ZM280-600h400v-80H280v80Zm200 120ZM265-80q-79 0-134.5-55.5T75-270q0-57 29.5-102t77.5-68H80v-80h240v240h-80v-97q-37 8-61 38t-24 69q0 46 32.5 78t77.5 32v80Zm135-40v-80h360v-560H200v160h-80v-160q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H400Z"/></svg>`,file_open: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h287q16 0 30.5 6t25.5 17l194 194q11 11 17 25.5t6 30.5v167q0 17-11.5 28.5T760-400q-17 0-28.5-11.5T720-440v-160H560q-17 0-28.5-11.5T520-640v-160H240v640h320q17 0 28.5 11.5T600-120q0 17-11.5 28.5T560-80H240Zm520-103v49q0 17-11.5 28.5T720-94q-17 0-28.5-11.5T680-134v-146q0-17 11.5-28.5T720-320h146q17 0 28.5 11.5T906-280q0 17-11.5 28.5T866-240h-50l90 90q11 11 11 27.5T906-94q-12 12-28.5 12T849-94l-89-89Zm-520 23v-640 640Z"/></svg>`,- files: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M360-600v440h280v-120q0-17 11.5-28.5T680-320h120v-280H360Zm220 220ZM280-160v-441q0-33 24-56t57-23h439q33 0 56.5 23.5T880-600v287q0 16-6 30.5T857-257L703-103q-11 11-25.5 17T647-80H360q-33 0-56.5-23.5T280-160ZM81-710q-6-33 13-59.5t52-32.5l434-77q32-6 58 13.5t34 51.5l7 31q5 20-6 32t-26 14q-15 2-28.5-5.5T600-770l-7-30-433 77 60 344q3 17-6 30.5T188-332q-17 3-30-6.5T142-365L81-710Z"/></svg>`,+ files: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M440-400h80q17 0 28.5-11.5T560-440q0-17-11.5-28.5T520-480h-80q-17 0-28.5 11.5T400-440q0 17 11.5 28.5T440-400Zm0-120h240q17 0 28.5-11.5T720-560q0-17-11.5-28.5T680-600H440q-17 0-28.5 11.5T400-560q0 17 11.5 28.5T440-520Zm0-120h240q17 0 28.5-11.5T720-680q0-17-11.5-28.5T680-720H440q-17 0-28.5 11.5T400-680q0 17 11.5 28.5T440-640ZM320-240q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320Zm0-80h480v-480H320v480ZM160-80q-33 0-56.5-23.5T80-160v-520q0-17 11.5-28.5T120-720q17 0 28.5 11.5T160-680v520h520q17 0 28.5 11.5T720-120q0 17-11.5 28.5T680-80H160Zm160-720v480-480Z"/></svg>`,file_parent: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path style="fill:var(--green);" d="M320-320h200v-200H320v200Zm0-280h480v-200H320v200Zm280 280h200v-200H600v200Zm-280 80q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Z"/></svg>`,folder: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" style="fill:var(--yellow)"><path style="fill:var(--yellow)" 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>`,folder_s: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M160-160q-33 0-56.5-23.5T80-240v-400q0-33 23.5-56.5T160-720h240l80-80h320q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm73-280h207v-207L233-440Zm-73-40 160-160H160v160Zm0 120v120h640v-480H520v280q0 33-23.5 56.5T440-360H160Zm280-160Z"/></svg>`,diff --git a/frontend/app/pages/dashboard/categories/[id]/edit.vue b/frontend/app/pages/dashboard/categories/[id]/edit.vueindex 8cd513d7..e0e530f5 100644--- a/frontend/app/pages/dashboard/categories/[id]/edit.vue+++ b/frontend/app/pages/dashboard/categories/[id]/edit.vue@@ -21,24 +21,12 @@</select><label style="display: flex; align-items: center">Icon <AppHint text="SVG supported" /></label><textarea type="text" v-model="category.icon" rows="5"></textarea>++ <label>Parent</label>+ <AppSelect v-model="category.parent_id" :items="categoriesItem" placeholder="Select a category parent" />+<label for="color">Color</label>- <AppColorPicker v-model:selectedColor="category.color" name="color" />- <div class="form-row">- <div class="form-column">- <label style="display: flex; align-items: center">Workspace <AppHint text="For top categories" /></label>- <select v-model="category.workspace_id">- <option :value="null">None</option>- <option v-for="wp in categoriesStore.getAll.filter(a => a.id != route.params.id && a.role == 2)" :value="wp.id">{{ wp.name }}</option>- </select>- </div>- <div class="form-column">- <label>Parent</label>- <select v-model="category.parent_id">- <option :value="null">None</option>- <option v-for="cp in categoriesStore.getAll" :value="cp.id">{{ cp.name }}</option>- </select>- </div>- </div>+ <AppColorPicker v-model:selectedColor="category.color" name="color" :nullable="true" /><div style="display: flex; justify-content: flex-end"><AppButton type="danger" @click="deleteCategory()">Delete</AppButton>@@ -54,6 +42,7 @@ import DeleteModal from '../_modals/DeleteCategoryModal.vue';const categoriesStore = useCategoriesStore();const route = useRoute();const category = computed(() => categoriesStore.getById(route.params.id as string));+const categoriesItem = new TreeStructure(useSidebarTree().categories.value).generateTree().filter(i => i.data.type === 'category' && i.data.role == 2);definePageMeta({ breadcrumb: 'Edit' });diff --git a/frontend/app/pages/dashboard/categories/[id]/index.vue b/frontend/app/pages/dashboard/categories/[id]/index.vueindex a2c95a2b..e6728ae9 100644--- a/frontend/app/pages/dashboard/categories/[id]/index.vue+++ b/frontend/app/pages/dashboard/categories/[id]/index.vue@@ -2,17 +2,13 @@<div class="card-component"><header><h1 style="font-size: 20px">Documents of category <tag class="blue">New</tag></h1>+ <ViewSelection v-model="view" /></header>- <div class="document-list">- <DocumentsGrid v-if="documents.length" :documents="documents" />- <div v-else style="width: 100%; height: 100%">- <div style="text-align: center; margin: 10vh auto">- <h1>No documents found</h1>- <img style="max-width: 300px; max-height: 300px" :src="`/empty-${colorMode.value}.png`" />- <p>There are no documents in this category</p>- <NuxtLink to="/dashboard/docs/new"><AppButton type="link">+ Create new document </AppButton></NuxtLink>- </div>- </div>+ <div v-if="view == 'table'" class="line-container">+ <DocumentLine v-for="document of documents" :document="document" class="line-item" :key="document.id" />+ </div>+ <div v-else class="document-list">+ <DocumentsGrid :documents="documents" /></div></div></template>@@ -22,7 +18,7 @@ const route = useRoute();const mainCategoryId = route.params.id as string;const categoriesStore = useCategoriesStore();const documentsStore = useDocumentsStore();-const colorMode = useColorMode();+const view: Ref<'table' | 'list'> = ref('list');definePageMeta({breadcrumb: () => {diff --git a/frontend/app/pages/dashboard/categories/_modals/CreateCategoryModal.vue b/frontend/app/pages/dashboard/categories/_modals/CreateCategoryModal.vueindex f4824c0b..923c2cac 100644--- a/frontend/app/pages/dashboard/categories/_modals/CreateCategoryModal.vue+++ b/frontend/app/pages/dashboard/categories/_modals/CreateCategoryModal.vue@@ -6,7 +6,7 @@<label for="icon">Icon <AppHint text="SVG supported" /></label><input class="entry" type="text" v-model="category.icon" id="icon" /><label for="color">Color</label>- <AppColorPicker class="entry" v-model:selectedColor="category.color" id="color" />+ <AppColorPicker class="entry" v-model:selectedColor="category.color" id="color" :nullable="true" /><label>Parent</label><div><AppSelect class="entry" v-model="category.parent_id" :items="categoriesItem" placeholder="Select a category parent" />diff --git a/frontend/app/pages/dashboard/categories/index.vue b/frontend/app/pages/dashboard/categories/index.vueindex 14f5b811..99a658db 100644--- a/frontend/app/pages/dashboard/categories/index.vue+++ b/frontend/app/pages/dashboard/categories/index.vue@@ -12,7 +12,9 @@<input placeholder="Search for workspace..." v-model="filter" style="width: 50%; padding: 8px; border: 1px solid var(--border-color); border-radius: 4px" /></div><div v-if="filteredItems.length" class="workspace" v-for="workspace in filteredItems" :key="workspace.id">- <h3 class="wp-name">{{ workspace.label }}</h3>+ <h3 class="wp-name">+ <NuxtLink :to="`/dashboard/categories/${workspace.id}/edit`">{{ workspace.label }}</NuxtLink>+ </h3><WorkspaceTree v-for="node in workspace.childrens" :node="node" @edit="editNode" @delete="deleteNode" /></div>diff --git a/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue b/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vueindex b898f2d6..9078acc8 100644--- a/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue+++ b/frontend/app/pages/dashboard/docs/_components/table-of-content/TableOfContents.vue@@ -5,7 +5,7 @@<tag v-if="doc?.tags" v-for="tag in doc?.tags.split(',')" :key="tag" class="primary">#{{ tag.trim() }}</tag></div><ul ref="list" style="position: relative">- <div class="marker" ref="marker"></div>+ <div class="marker" ref="marker" v-if="headers.length"></div><h4>Table of contents</h4><NodeTree v-if="headers.length" v-for="header of headers_tree" :node="header" :key="header.link" style="padding-left: 10px" /><p v-else>Nothing to display</p>@@ -121,7 +121,7 @@ aside {margin-left: 50px;font-size: 0.8rem;border-left: 1px solid var(--border-color);- padding-left: 10px;+ padding-left: 15px;}.marker {position: absolute;diff --git a/frontend/app/pages/dashboard/docs/index.vue b/frontend/app/pages/dashboard/docs/index.vueindex 7683184e..3e2a560b 100644--- a/frontend/app/pages/dashboard/docs/index.vue+++ b/frontend/app/pages/dashboard/docs/index.vue@@ -16,54 +16,9 @@<script setup lang="ts">const view: Ref<'table' | 'list'> = ref('list');const documents = computed(() => useDocumentsStore().getAll);-const categoriesStore = useCategoriesStore();-const headers = [- { label: 'Name', key: 'name' },- { label: 'Category', key: 'category' },- { label: 'Tags', key: 'tags' },- { label: 'Last update', key: 'last_update' },- { label: 'Status', key: 'status' },- { label: 'Actions', key: 'actions' },-];-const rows = computed(() =>- documents.value.map(doc => {- let badges = '';- switch (doc.accessibility) {- case 1:- badges = '<tag class="green">Document</tag>';- break;- case 2:- badges = '<tag class="teal">Draft</tag>';- break;- case 3:- badges = '<tag class="red">Archived</tag>';- }- if (doc.parent_id) badges += '<tag class="yellow">Child</tag>';- if (documents.value.some(d => d.parent_id === doc.id)) badges += '<tag class="yellow">Parent</tag>';- return {- name: { content: doc.name, type: 'text' as const },- category: { content: categoriesStore.getById(doc.category || '')?.name || '', type: 'text' as const },- tags: { content: stringToBadge(doc.tags), type: 'html' as const },- last_update: { content: new Date(parseInt(doc.updated_timestamp)).toLocaleDateString(), type: 'text' as const },- status: { content: badges, type: 'html' as const },- actions: { type: 'slot' as const, data: { id: doc.id } },- };- }),-);--function stringToBadge(str?: string): string {- if (str?.length)- return str- .trim()- .split(',')- .map(t => `<tag class="blue">${t.trim()}</tag>`)- .join('');- return '';-}</script><style scoped lang="scss">-// Line container first item radius:.line-container {display: flex;flex-direction: column;diff --git a/frontend/app/pages/dashboard/import.vue b/frontend/app/pages/dashboard/import.vueindex c19155ea..e80cf18c 100644--- a/frontend/app/pages/dashboard/import.vue+++ b/frontend/app/pages/dashboard/import.vue@@ -3,7 +3,7 @@<header><h1 style="font-size: 20px">Import documents <tag class="yellow">Beta</tag></h1></header>- <p>You can import documents from a previous export. If you don't have export, you can create a new one from the <NuxtLink to="/dashboard/settings?p=backup">settings</NuxtLink> page.</p>+ <p>You can import documents from a previous export. If you don't have export, you can create a new one from the <NuxtLink to="/dashboard/settings?p=backup" style="color: var(--primary)">settings</NuxtLink> page.</p><AppDrop ref="dropComponent" @select="handleFileSelect" /><div class="submit"><AppButton @click="submit" type="primary" :disabled="!selectedFile">Analyse file</AppButton>diff --git a/frontend/app/pages/dashboard/settings/_views/preferences.vue b/frontend/app/pages/dashboard/settings/_views/preferences.vueindex dd9ff584..2ee994b7 100644--- a/frontend/app/pages/dashboard/settings/_views/preferences.vue+++ b/frontend/app/pages/dashboard/settings/_views/preferences.vue@@ -17,6 +17,13 @@<AppColorPicker v-else-if="option.type === 'color'" :selectedColor="option.value" @update:selected-color="option.onChange" /></div></div>+ <hr />+ <div class="reset">+ <p>+ <span @click="preferencesStore.reset" style="color: var(--primary); cursor: pointer">Reset all preferences</span>+ to default. This will reset all your preferences, including the theme and settings+ </p>+ </div></template><script setup lang="ts">@@ -51,7 +58,7 @@ interface SelectOption extends BaseOption {}type Option = ToggleOption | SelectOption | ColorOption;-+console.log(preferencesStore.get('primaryColor'));const options = ref<{ label: string; options: Option[] }[]>([{label: 'General',@@ -114,8 +121,8 @@ const options = ref<{ label: string; options: Option[] }[]>([{label: 'View dock',type: 'toggle',- value: Boolean(preferencesStore.get('hideDock')),- storageKey: 'hideDock',+ value: Boolean(preferencesStore.get('view_dock')),+ storageKey: 'view_dock',},{label: 'Normalize file icons',@@ -184,4 +191,7 @@ select {background: var(--bg-contrast);font-size: 0.95rem;}+.reset {+ margin-top: 2rem;+}</style>diff --git a/frontend/app/pages/dashboard/settings/index.vue b/frontend/app/pages/dashboard/settings/index.vueindex ba29f15f..30faa595 100644--- a/frontend/app/pages/dashboard/settings/index.vue+++ b/frontend/app/pages/dashboard/settings/index.vue@@ -97,7 +97,8 @@ const close = () => router.push(!routeBeforeEnter.value?.startsWith('/dashboard/color: inherit;border-radius: 4px;- &:hover {+ &:hover,+ &.active {background-color: var(--bg-contrast-2);}}diff --git a/frontend/app/styles/_variables.scss b/frontend/app/styles/_variables.scssindex aa1f9ac9..8e08f669 100644--- a/frontend/app/styles/_variables.scss+++ b/frontend/app/styles/_variables.scss@@ -46,7 +46,7 @@ $primary-dark: color.adjust(#6024ec, $lightness: -10%);--bg-contrast-2: #e2ebfd;--selection-color: #dde3e9;--font-color: #3c4450;- --font-color-dark: #211d34;+ --font-color-dark: #3c3b3d;--font-color-light: #5b5967;--opposite-color: #111;--border-color: #dfe0e5;@@ -84,9 +84,9 @@ $primary-dark: color.adjust(#6024ec, $lightness: -10%);.dark-mode {- --primary: #3956e7;- --primary-bg: #8e5fff1f;- --primary-border: #8e5fff1f;+ --default: #3956e7e8;+ --default-bg: #966afc31;+ --default-border: #8e5fff1f;--bg-color: #1c2127;--bg-contrast: #2a2f35;diff --git a/frontend/app/styles/theme.scss b/frontend/app/styles/theme.scssindex 4c29dc65..13da818e 100644--- a/frontend/app/styles/theme.scss+++ b/frontend/app/styles/theme.scss@@ -85,9 +85,8 @@ hr {border: none;color: var(--border-color);height: 1px;- width: 95%;- margin: auto;- margin: 20px 0;+ width: 98%;+ margin: 0 auto;}img {