π 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
feat: new sidebar icons (more precise icons for resources)
Smaug6739b4bb33e95836
diff --git a/frontend/app/helpers/node.ts b/frontend/app/helpers/node.tsindex d119aca0..eb5f2bfe 100644--- a/frontend/app/helpers/node.ts+++ b/frontend/app/helpers/node.ts@@ -10,8 +10,14 @@ export const resolveIcon = (item: Node | DB_Node): string => {if (item.role === 1) return 'workspace';if (item.role === 2 && 'shared' in item) return item.shared ? 'shared_folder' : 'folder';if (item.role === 3) return item.accessibility == 1 ? 'sidebar/file' : item.accessibility == 2 ? 'draft' : 'shared_doc';- if (item.role === 4) return item.metadata?.filetype == 'application/pdf' ? 'pdf' : 'sidebar/image';- return 'sidebar/file';+ if (item.role === 4) {+ if (item.metadata?.filetype == 'application/pdf') return 'sidebar/pdf';+ if (item.metadata?.filetype?.startsWith('video/')) return 'sidebar/video';+ if (item.metadata?.filetype?.startsWith('audio/')) return 'sidebar/audio';+ if (item.metadata?.filetype?.startsWith('image/')) return 'sidebar/image';+ return 'sidebar/attachment';+ }+ return 'sidebar/default';};/** Get the dashboard route for a node */diff --git a/frontend/public/app-icons/pdf.svg b/frontend/public/app-icons/sidebar/attachment.svgsimilarity index 100%rename from frontend/public/app-icons/pdf.svgrename to frontend/public/app-icons/sidebar/attachment.svgdiff --git a/frontend/public/app-icons/sidebar/audio.svg b/frontend/public/app-icons/sidebar/audio.svgnew file mode 100644index 00000000..a6b0e5c1--- /dev/null+++ b/frontend/public/app-icons/sidebar/audio.svg@@ -0,0 +1 @@+<svg height="24px" viewBox="0 -960 960 960"><path d="M430-200q38 0 64-26t26-64v-150h120v-80H480v155q-11-8-23.5-11.5T430-380q-38 0-64 26t-26 64q0 38 26 64t64 26ZM240-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>\ No newline at end of filediff --git a/frontend/public/app-icons/sidebar/pdf.svg b/frontend/public/app-icons/sidebar/pdf.svgnew file mode 100644index 00000000..395f7bd1--- /dev/null+++ b/frontend/public/app-icons/sidebar/pdf.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M360-460h40v-80h40q17 0 28.5-11.5T480-580v-40q0-17-11.5-28.5T440-660h-80v200Zm40-120v-40h40v40h-40Zm120 120h80q17 0 28.5-11.5T640-500v-120q0-17-11.5-28.5T600-660h-80v200Zm40-40v-120h40v120h-40Zm120 40h40v-80h40v-40h-40v-40h40v-40h-80v200ZM320-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-560h80v560h560v80H160Zm160-720v480-480Z"/></svg>\ No newline at end of filediff --git a/frontend/public/app-icons/sidebar/video.svg b/frontend/public/app-icons/sidebar/video.svgnew file mode 100644index 00000000..f05f8098--- /dev/null+++ b/frontend/public/app-icons/sidebar/video.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="M200-320h400L462-500l-92 120-62-80-108 140Zm-40 160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h480q33 0 56.5 23.5T720-720v180l160-160v440L720-420v180q0 33-23.5 56.5T640-160H160Zm0-80h480v-480H160v480Zm0 0v-480 480Z"/></svg>\ No newline at end of file