π 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
Improve app radio component
Smaug6739f447e2a16723
diff --git a/frontend/app/components/AppRadio.vue b/frontend/app/components/AppRadio.vueindex 1f464b4c..5e5b700e 100644--- a/frontend/app/components/AppRadio.vue+++ b/frontend/app/components/AppRadio.vue@@ -1,22 +1,22 @@<template><div class="segmented">- <button v-for="item in items" :key="item.id" :class="{ active: item.id === selected }" @click="selectItem(item.id)">{{ item.name }}</button>+ <button v-for="item in items" :key="item.id" :class="{ active: item.id === selected }" @click="selectItem(item.id)">{{ item.label }}</button></div></template><script setup lang="ts">const props = defineProps<{- items: Array<{ id: number; name: string }>;- modelValue: number | null;+ items: Array<{ id: number | string; label: string }>;+ modelValue: number | string | null;}>();const emit = defineEmits<{- (e: 'update:modelValue', value: number | null): void;+ (e: 'update:modelValue', value: number | string | null): void;}>();const selected = ref(props.modelValue);-const selectItem = (id: number) => {+const selectItem = (id: number | string) => {selected.value = id;emit('update:modelValue', id);};diff --git a/frontend/app/pages/dashboard/categories/[id]/edit.vue b/frontend/app/pages/dashboard/categories/[id]/edit.vueindex d2e0fd1e..f0042edf 100644--- a/frontend/app/pages/dashboard/categories/[id]/edit.vue+++ b/frontend/app/pages/dashboard/categories/[id]/edit.vue@@ -12,8 +12,8 @@<AppRadiov-model="category.role":items="[- { id: 1, name: 'Category' },- { id: 2, name: 'Workspace' },+ { id: 1, label: 'Category' },+ { id: 2, label: 'Workspace' },]"/></div>