feat: add hub

This commit is contained in:
2026-10-03 23:57:41 +02:00
parent 5452f72087
commit fb7b560696
52 changed files with 290 additions and 162 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
useHead({ title: 'Notes' })
useHead({ title: 'Notizen' })
const { toggleList } = useNotesSidebar()
const { createAndOpen } = useNewNote()
@@ -13,7 +13,7 @@ defineShortcuts({
</script>
<template>
<PasswordGate title="Notes">
<PasswordGate title="Notizen">
<div class="flex h-dvh">
<NotesSidebar />
+12 -12
View File
@@ -19,7 +19,7 @@ const editorProps = {
const { queue } = useNotesAutosave(id, summary => patchSummary(id, summary))
useHead({ title: () => doc.value ? notesDocName({ title: title.value, created: doc.value.created }) : 'Notes' })
useHead({ title: () => doc.value ? notesDocName({ title: title.value, created: doc.value.created }) : 'Notizen' })
watch(title, (value) => {
patchSummary(id, { title: value.trim() })
@@ -47,20 +47,20 @@ onBeforeUnmount(() => mobileQuery?.removeEventListener('change', updateMobile))
const toolbarItems: EditorToolbarItem[][] = [
[
{ kind: 'heading', level: 1, icon: 'i-lucide-heading-1', 'aria-label': 'Heading 1' },
{ kind: 'heading', level: 2, icon: 'i-lucide-heading-2', 'aria-label': 'Heading 2' }
{ kind: 'heading', level: 1, icon: 'i-lucide-heading-1', 'aria-label': 'Überschrift 1' },
{ kind: 'heading', level: 2, icon: 'i-lucide-heading-2', 'aria-label': 'Überschrift 2' }
],
[
{ kind: 'mark', mark: 'bold', icon: 'i-lucide-bold', 'aria-label': 'Bold' },
{ kind: 'mark', mark: 'italic', icon: 'i-lucide-italic', 'aria-label': 'Italic' },
{ kind: 'mark', mark: 'strike', icon: 'i-lucide-strikethrough', 'aria-label': 'Strikethrough' },
{ kind: 'mark', mark: 'bold', icon: 'i-lucide-bold', 'aria-label': 'Fett' },
{ kind: 'mark', mark: 'italic', icon: 'i-lucide-italic', 'aria-label': 'Kursiv' },
{ kind: 'mark', mark: 'strike', icon: 'i-lucide-strikethrough', 'aria-label': 'Durchgestrichen' },
{ kind: 'mark', mark: 'code', icon: 'i-lucide-code', 'aria-label': 'Code' },
{ kind: 'link', icon: 'i-lucide-link', 'aria-label': 'Link' }
],
[
{ kind: 'bulletList', icon: 'i-lucide-list', 'aria-label': 'Bullet list' },
{ kind: 'orderedList', icon: 'i-lucide-list-ordered', 'aria-label': 'Numbered list' },
{ kind: 'blockquote', icon: 'i-lucide-text-quote', 'aria-label': 'Quote' }
{ kind: 'bulletList', icon: 'i-lucide-list', 'aria-label': 'Aufzählung' },
{ kind: 'orderedList', icon: 'i-lucide-list-ordered', 'aria-label': 'Nummerierte Liste' },
{ kind: 'blockquote', icon: 'i-lucide-text-quote', 'aria-label': 'Zitat' }
]
]
@@ -73,7 +73,7 @@ const toolbarItems: EditorToolbarItem[][] = [
color="error"
variant="subtle"
icon="i-lucide-triangle-alert"
title="Couldn't load this note"
title="Notiz konnte nicht geladen werden"
:description="errorMessage(error)"
/>
@@ -82,7 +82,7 @@ const toolbarItems: EditorToolbarItem[][] = [
<input
v-model="title"
:placeholder="notesDocName({ title: '', created: doc.created })"
aria-label="Title"
aria-label="Titel"
class="min-w-0 flex-1 bg-transparent text-3xl font-semibold text-highlighted outline-none placeholder:text-dimmed"
>
</div>
@@ -91,7 +91,7 @@ const toolbarItems: EditorToolbarItem[][] = [
v-slot="{ editor }"
v-model="content"
content-type="markdown"
placeholder="Write something…"
placeholder="Schreib etwas …"
:mention="false"
:starter-kit="{ link: { openOnClick: true } }"
:editor-props="editorProps"
+2 -2
View File
@@ -8,7 +8,7 @@ onMounted(() => {
<template>
<div class="flex h-full items-center justify-center p-8 text-center text-sm text-muted">
<span class="md:hidden">Pull down from the top for your notes, or start a new one.</span>
<span class="hidden md:inline">Pick a note, or start a new one.</span>
<span class="md:hidden">Von oben herunterziehen für deine Notizen, oder eine neue beginnen.</span>
<span class="hidden md:inline">Notiz auswählen oder eine neue beginnen.</span>
</div>
</template>