@@ -46,8 +57,15 @@ async function rename(id: string, value: string) {
/>
diff --git a/frontend/src/components/NoteCard.vue b/frontend/src/components/NoteCard.vue
index 301df8d..aee9ec9 100644
--- a/frontend/src/components/NoteCard.vue
+++ b/frontend/src/components/NoteCard.vue
@@ -1,7 +1,7 @@
@@ -86,7 +90,8 @@ function cardClass(color: NoteColor): string {
{{ lb.name }}
diff --git a/frontend/src/components/NoteEditor.vue b/frontend/src/components/NoteEditor.vue
index 2d3971e..e8427a4 100644
--- a/frontend/src/components/NoteEditor.vue
+++ b/frontend/src/components/NoteEditor.vue
@@ -9,7 +9,7 @@ import LabelPicker from "./LabelPicker.vue";
import NoteChecklist from "./NoteChecklist.vue";
import { fromLocalInput, toLocalInput } from "../notes/datetime";
import type { Note, NoteLabel } from "../stores/notes";
-import type { NoteColor } from "../notes/colors";
+import { LABEL_CHIP_CLASSES, type NoteColor } from "../notes/colors";
const props = defineProps<{ note: Note }>();
const emit = defineEmits<{ (e: "close"): void; (e: "navigate", id: string): void }>();
@@ -176,6 +176,10 @@ async function removeLabel(id: string) {
await onLabelsChange(labelList.value.filter((lb) => lb.id !== id));
}
+function labelChip(color: string): string {
+ return LABEL_CHIP_CLASSES[color as NoteColor] ?? LABEL_CHIP_CLASSES.default;
+}
+
async function toggleKind() {
if (liveNote.value.kind === "list") {
await notes.setKind(props.note.id, "text");
@@ -315,7 +319,8 @@ async function act(fn: () => Promise) {
{{ lb.name }}