📚 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: add option to disable colored tags (#661)
Smaugc97e4d982293
diff --git a/frontend/app/components/AppTagInput.vue b/frontend/app/components/AppTagInput.vueindex df44b805..f973a908 100644--- a/frontend/app/components/AppTagInput.vue+++ b/frontend/app/components/AppTagInput.vue@@ -33,7 +33,7 @@</div></div><div v-if="selectedTags?.length" :class="`selected-tags `">- <span v-for="tag in selectedTags" :key="tag" class="tag-chip" :class="resolveTagColor(tag)">+ <span v-for="tag in selectedTags" :key="tag" class="tag-chip" :class="colored ? resolveTagColor(tag) : 'primary'">{{ tag }}<button class="remove-tag" @click.stop="removeTag(tag)">×</button></span>@@ -53,6 +53,9 @@ const emit = defineEmits<{(e: 'update:modelValue', value: string): void;}>();+const nodesStore = useNodesStore();+const preferencesStore = usePreferencesStore();+const { t } = useI18nT();const selectedTags = ref<string[]>(stringToTags(props.modelValue || ''));@@ -60,7 +63,7 @@ const tagInput = ref('');const showSuggestions = ref(false);const selectedSuggestionIndex = ref(-1);-const nodesStore = useNodesStore();+const colored = preferencesStore.get('documentColoredTags');watch(() => props.modelValue,diff --git a/frontend/app/components/Node/TagList.vue b/frontend/app/components/Node/TagList.vueindex 0b9cd7c2..d2fe5810 100644--- a/frontend/app/components/Node/TagList.vue+++ b/frontend/app/components/Node/TagList.vue@@ -1,6 +1,6 @@<template><div v-if="parsedTags.length" class="tags">- <tag v-for="tag in parsedTags" :key="tag" :class="[resolveTagColor(tag), { clickable }]" @click="onClick($event, tag)">{{ tag }}</tag>+ <tag v-for="tag in parsedTags" :key="tag" :class="[colored ? resolveTagColor(tag) : 'primary', { clickable }]" @click="onClick($event, tag)">{{ tag }}</tag></div></template>@@ -9,9 +9,12 @@ import { parseTags, resolveTagColor } from '~/helpers/node';const props = withDefaults(defineProps<{ tags?: string; clickable?: boolean }>(), { tags: '', clickable: true });+const preferencesStore = usePreferencesStore();+const router = useRouter();const parsedTags = computed(() => parseTags(props.tags));+const colored = preferencesStore.get('documentColoredTags');function onClick(event: MouseEvent, tag: string) {if (!props.clickable) return;diff --git a/frontend/app/pages/dashboard/settings/_views/documents.vue b/frontend/app/pages/dashboard/settings/_views/documents.vueindex 0ced1486..e43d1fcd 100644--- a/frontend/app/pages/dashboard/settings/_views/documents.vue+++ b/frontend/app/pages/dashboard/settings/_views/documents.vue@@ -45,6 +45,14 @@ const options = computed<Array<{ label: string; options: InterfaceOption[] }>>((description: t('settings.documents.documentTitlesNumberingDesc'),type: 'toggle',key: 'documentTitlesNumbering',+ tag: t('common.actions.new'),+ },+ {+ label: t('settings.documents.documentColoredTags'),+ description: t('settings.documents.documentColoredTagsDesc'),+ type: 'toggle',+ key: 'documentColoredTags',+ tag: t('common.actions.new'),},{label: t('settings.documents.documentShowAttachments'),diff --git a/frontend/app/stores/preferences/constants.ts b/frontend/app/stores/preferences/constants.tsindex 5644f872..d047fe05 100644--- a/frontend/app/stores/preferences/constants.ts+++ b/frontend/app/stores/preferences/constants.ts@@ -23,6 +23,7 @@ export const DEFAULT_PREFERENCES = {documentFontFamily: 'Poppins' as string,documentLineHeight: 1.5 as number,documentTitlesNumbering: false as boolean,+ documentColoredTags: true as boolean,documentShowAttachments: false as boolean,documentDefaultThumbnail: false as boolean,documentUseParentThumbnail: false as boolean,@@ -109,6 +110,7 @@ export const EDITOR_KEYS: PreferenceKey[] = ['documentFontFamily','documentLineHeight','documentTitlesNumbering',+ 'documentColoredTags','documentShowAttachments','documentDefaultThumbnail','documentUseParentThumbnail',diff --git a/frontend/i18n/locales/de/settings.ts b/frontend/i18n/locales/de/settings.tsindex 49f63766..4c0a50f3 100644--- a/frontend/i18n/locales/de/settings.ts+++ b/frontend/i18n/locales/de/settings.ts@@ -115,6 +115,8 @@ export default {documentSize: 'Dokumentgröße',documentTitlesNumbering: 'Dokumenttitel nummerieren',documentTitlesNumberingDesc: 'Aktiviere die automatische Nummerierung von Dokumenttiteln (H1, H2, H3...).',+ documentColoredTags: 'Farbcodierte Tags',+ documentColoredTagsDesc: 'Zeige Tags mit Farben basierend auf ihrem Namen an. Wenn deaktiviert, werden alle Tags dieselbe Farbe haben.',documentShowAttachments: 'Anhänge anzeigen',documentShowAttachmentsDesc: 'Zeige angehängte Ressourcen (Bilder, PDFs usw.) am Ende des Dokuments an.',documentDefaultThumbnail: 'Standardminiaturansicht',diff --git a/frontend/i18n/locales/en/settings.ts b/frontend/i18n/locales/en/settings.tsindex c3415aaa..a3025e60 100644--- a/frontend/i18n/locales/en/settings.ts+++ b/frontend/i18n/locales/en/settings.ts@@ -114,6 +114,8 @@ export default {documentSize: 'Document size',documentTitlesNumbering: 'Number document titles',documentTitlesNumberingDesc: 'Enable automatic numbering of document titles (H1, H2, H3...).',+ documentColoredTags: 'Colored tags',+ documentColoredTagsDesc: 'Display tags with colors based on their name. If disabled, all tags will have the same color.',documentShowAttachments: 'Show attachments',documentShowAttachmentsDesc: 'Show attached resources (images, PDFs, etc.) at the end of the document.',documentDefaultThumbnail: 'Default thumbnail',diff --git a/frontend/i18n/locales/fr/settings.ts b/frontend/i18n/locales/fr/settings.tsindex 3852b811..b59bc12d 100644--- a/frontend/i18n/locales/fr/settings.ts+++ b/frontend/i18n/locales/fr/settings.ts@@ -115,6 +115,8 @@ export default {documentSize: 'Taille du document',documentTitlesNumbering: 'Numérotation des titres de documents',documentTitlesNumberingDesc: 'Activer la numérotation automatique des titres de documents (H1, H2, H3...).',+ documentColoredTags: 'Tags colorés',+ documentColoredTagsDesc: 'Afficher les tags avec des couleurs basées sur leur nom. Si désactivé, tous les tags auront la même couleur.',documentShowAttachments: 'Afficher les pièces jointes',documentShowAttachmentsDesc: 'Afficher les ressources jointes (images, PDFs, etc.) à la fin du document.',documentDefaultThumbnail: 'Miniature par défaut',diff --git a/frontend/i18n/locales/it/settings.ts b/frontend/i18n/locales/it/settings.tsindex 8446b7f7..c0ab8dcc 100644--- a/frontend/i18n/locales/it/settings.ts+++ b/frontend/i18n/locales/it/settings.ts@@ -116,6 +116,8 @@ export default {documentSize: 'Dimensione del documento',documentTitlesNumbering: 'Numerazione dei titoli dei documenti',documentTitlesNumberingDesc: 'Abilita la numerazione automatica dei titoli dei documenti (H1, H2, H3...).',+ documentColoredTags: 'Tag colorati',+ documentColoredTagsDesc: 'Mostra i tag con colori basati sul loro nome. Se disabilitato, tutti i tag avranno lo stesso colore.',documentShowAttachments: 'Mostra allegati',documentShowAttachmentsDesc: 'Mostra le risorse allegate (immagini, PDF, ecc.) alla fine del documento.',documentDefaultThumbnail: 'Miniatura predefinita',diff --git a/frontend/i18n/locales/ko/settings.ts b/frontend/i18n/locales/ko/settings.tsindex ba42222e..cf4f1439 100644--- a/frontend/i18n/locales/ko/settings.ts+++ b/frontend/i18n/locales/ko/settings.ts@@ -114,6 +114,8 @@ export default {documentSize: '문서 크기',documentTitlesNumbering: '문서 제목 번호 매기기',documentTitlesNumberingDesc: '문서 제목(H1, H2, H3 등)의 자동 번호 매기기를 활성화합니다.',+ documentColoredTags: '컬러 태그',+ documentColoredTagsDesc: '태그 이름에 따라 색상을 적용하여 태그를 표시합니다. 비활성화하면 모든 태그가 동일한 색상으로 표시됩니다.',documentShowAttachments: '첨부 파일 표시',documentShowAttachmentsDesc: '문서 끝에 첨부된 리소스(이미지, PDF 등)를 표시합니다.',documentDefaultThumbnail: '기본 썸네일',diff --git a/frontend/i18n/locales/uk/settings.ts b/frontend/i18n/locales/uk/settings.tsindex 24eba039..6aca1b73 100644--- a/frontend/i18n/locales/uk/settings.ts+++ b/frontend/i18n/locales/uk/settings.ts@@ -114,6 +114,8 @@ export default {documentSize: 'Розмір документа',documentTitlesNumbering: 'Нумерація заголовків документів',documentTitlesNumberingDesc: 'Увімкнути автоматичну нумерацію заголовків документів (H1, H2, H3...).',+ documentColoredTags: 'Кольорові теги',+ documentColoredTagsDesc: 'Відображати теги з кольорами, які базуються на їхніх назвах. Якщо вимкнено, усі теги будуть мати однаковий колір.',documentShowAttachments: 'Показувати вкладення',documentShowAttachmentsDesc: 'Показувати прикріплені ресурси (зображення, PDF тощо) в кінці документа.',documentDefaultThumbnail: 'Мініатюра за замовчуванням',