π 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
Fix multiples sames docs
Smaug67390a5ccd0b2ddf
diff --git a/frontend/.env.development b/frontend/.env.developmentindex a19d10e0..3c7c7cd5 100644--- a/frontend/.env.development+++ b/frontend/.env.development@@ -1,2 +1,2 @@-VITE_BASE_API="http://192.168.0.25:3001"-VITE_BASE_CDN="http://192.168.0.25:3002"\ No newline at end of file+VITE_BASE_API="http://localhost:3001"+VITE_BASE_CDN="http://localhost:3002"\ No newline at end of filediff --git a/frontend/pages/dashboard/docs/new.vue b/frontend/pages/dashboard/docs/new.vueindex bc6294be..87e9686f 100644--- a/frontend/pages/dashboard/docs/new.vue+++ b/frontend/pages/dashboard/docs/new.vue@@ -18,7 +18,10 @@ definePageMeta({ breadcrumb: 'New' });function save(doc: Document) {store.post(doc)- .then(() => notifications.add({ title: 'Success:', message: 'Document posted', type: 'success', timeout: 3000 }))+ .then(d => {+ notifications.add({ title: 'Success:', message: 'Document posted', type: 'success', timeout: 3000 });+ useRouter().push(`/dashboard/docs/edit/${d.id}`);+ }).catch(e => notifications.add({ title: 'Error:', message: e, type: 'error', timeout: 3000 }));}</script>diff --git a/frontend/stores/documents.store.ts b/frontend/stores/documents.store.tsindex a7abcc76..2bb293ab 100644--- a/frontend/stores/documents.store.ts+++ b/frontend/stores/documents.store.ts@@ -57,11 +57,13 @@ export const useDocumentsStore = defineStore('documents', {} else reject(request.message);});},- post(doc: Document) {+ post(doc: Document): Promise<Document> {return new Promise(async (resolve, reject) => {const request = await makeRequest('documents', 'POST', doc);- if (request.status == 'success') resolve(this.documents.push({ ...(request.result as DB_Document), type: 'document' }));- else reject(request.message);+ if (request.status == 'success') {+ this.documents.push({ ...(request.result as DB_Document), type: 'document' });+ resolve({ ...(request.result as DB_Document), type: 'document' });+ } else reject(request.message);});},update(doc: Document) {diff --git a/frontend/styles/_variables.scss b/frontend/styles/_variables.scssindex ba6fa87f..86403471 100644--- a/frontend/styles/_variables.scss+++ b/frontend/styles/_variables.scss@@ -1,3 +1,5 @@+@use "sass:color";+$blue: #007aff;$indigo: #6610f2;$purple: #6f42c1;@@ -11,12 +13,12 @@ $grey: #ffffffd9;$black: #27323A;$primary-400: #334155;-$primary-300: lighten($primary-400, 10%);-$primary-500: darken($primary-400, 10%);+$primary-300: color.adjust($primary-400, $lightness: -10%);+$primary-500: color.adjust($primary-400, $lightness: 10%);$secondary-400: #8e8d8a;-$secondary-300: lighten($secondary-400, 10%);-$secondary-500: darken($secondary-400, 10%);+$secondary-300: color.adjust($secondary-400, $lightness: -10%);+$secondary-500: color.adjust($secondary-400, $lightness: 10%);@import "./font.scss";