π 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 major bug with the cdn variable not defined
Smaug6739e770c3c6a750
diff --git a/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue b/frontend/app/components/MarkdownEditor/ImageSelectorModal.vueindex 9474f8d4..08d67fc1 100644--- a/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue+++ b/frontend/app/components/MarkdownEditor/ImageSelectorModal.vue@@ -40,6 +40,7 @@ const searchQuery = ref('');const isLoading = ref(false);const uploadError = ref<string | null>(null);const dropComponent = ref();+const { CDN } = useApi();const submitFile = (selectedFile: File) => {if (!selectedFile) return;diff --git a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vueindex 6145af57..45676644 100644--- a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue+++ b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue@@ -44,6 +44,7 @@ const preferencesStore = usePreferences();const props = defineProps<{ doc?: Partial<Node>; minimal?: boolean }>();const emit = defineEmits(['save', 'exit', 'autoSave']);+const { CDN } = useApi();const editorContainer = ref<HTMLDivElement>();const markdownPreview = ref<HTMLDivElement>();diff --git a/frontend/app/helpers/ressources.ts b/frontend/app/helpers/ressources.tsindex c600cd00..39aa951e 100644--- a/frontend/app/helpers/ressources.ts+++ b/frontend/app/helpers/ressources.ts@@ -13,6 +13,7 @@ const isImageFile = (filetype: string): boolean => {};const resolvePreviewUrl = (node: Node): string => {+ const { CDN } = useApi();if (isImageFile((node.metadata?.filetype as string) || '')) return `${CDN}/${node.user_id}/${node.metadata?.transformed_path}`;return '/file_placeholder.png';};diff --git a/frontend/app/pages/dashboard/cdn/[id]/index.vue b/frontend/app/pages/dashboard/cdn/[id]/index.vueindex b761b4c1..30e1e35c 100644--- a/frontend/app/pages/dashboard/cdn/[id]/index.vue+++ b/frontend/app/pages/dashboard/cdn/[id]/index.vue@@ -59,6 +59,8 @@ definePageMeta({ breadcrumb: 'Edit' });const nodeStore = useNodesStore();const route = useRoute();const ressource = computed(() => nodeStore.getById(route.params.id as string));+const { CDN } = useApi();+const defaultItem: ANode = {id: '',label: 'None',diff --git a/frontend/app/pages/dashboard/cdn/[id]/preview.vue b/frontend/app/pages/dashboard/cdn/[id]/preview.vueindex 73e76b97..dcf63fe3 100644--- a/frontend/app/pages/dashboard/cdn/[id]/preview.vue+++ b/frontend/app/pages/dashboard/cdn/[id]/preview.vue@@ -39,6 +39,7 @@import { readableFileSize } from '~/helpers/ressources';definePageMeta({ breadcrumb: 'Preview' });const ressource = computed(() => useNodesStore().getById(useRoute().params.id as string));+const { CDN } = useApi();const copyLink = () => {const link = `${CDN}/${ressource.value?.user_id}/${ressource.value?.metadata?.transformed_path || ressource.value?.content}`;diff --git a/frontend/app/pages/dashboard/cdn/index.vue b/frontend/app/pages/dashboard/cdn/index.vueindex 2f3f733e..d16bbedf 100644--- a/frontend/app/pages/dashboard/cdn/index.vue+++ b/frontend/app/pages/dashboard/cdn/index.vue@@ -66,6 +66,7 @@ const fileLink = ref('');const isLoading = ref(false);const dropComponent = ref();const filter = ref('');+const { CDN } = useApi();const sortedRessources = computed(() => nodesStore.ressources.toArray().sort((a, b) => b.created_timestamp - a.created_timestamp));const filteredRessources = computed(() => sortedRessources.value.filter(r => r.name.toLowerCase().includes(filter.value.toLowerCase())));