docs: API documentation and JSON schema updates

This commit is contained in:
Björn Blomberg
2026-04-10 18:31:38 +02:00
parent 887669c34f
commit c8b63bf8c4
11 changed files with 342 additions and 34 deletions

View File

@@ -91,8 +91,8 @@ function navigate(slug: string) {
</button>
</nav>
<!-- New document -->
<div class="p-3 border-t border-slate-200 dark:border-slate-700/60">
<!-- Bottom actions -->
<div class="p-3 border-t border-slate-200 dark:border-slate-700/60 flex flex-col gap-2">
<router-link
to="/doc/new"
class="btn-primary w-full text-center text-sm py-2"
@@ -103,6 +103,18 @@ function navigate(slug: string) {
</svg>
New document
</router-link>
<router-link
to="/admin"
class="w-full btn-ghost text-center text-sm py-1.5"
@click="emit('close')"
>
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
</svg>
Admin
</router-link>
</div>
</div>

View File

@@ -5,6 +5,7 @@ import { gql } from '@/lib/gql'
import { useAppStore } from '@/stores/app'
import { useThemeStore } from '@/stores/theme'
import ThemeToggle from '@/components/layout/ThemeToggle.vue'
import FolderPicker from '@/components/FolderPicker.vue'
const router = useRouter()
const app = useAppStore()
@@ -143,7 +144,7 @@ async function submit() {
<label class="label">Storage path
<span class="text-xs font-normal text-slate-400 ml-1">(where .adoc files are stored)</span>
</label>
<input v-model="form.storagePath" class="input" placeholder="/data/wiki" />
<FolderPicker v-model="form.storagePath" placeholder="/data/wiki" />
</div>
<div>
@@ -336,3 +337,4 @@ async function submit() {
.fade-y-enter-active, .fade-y-leave-active { transition: opacity 0.2s, transform 0.2s; }
.fade-y-enter-from, .fade-y-leave-to { opacity: 0; transform: translateY(-4px); }
</style>