Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

feat(tours): add persistent administrator onboarding guides

Timothy Yinc49694068a0d
diff --git a/app/app.vue b/app/app.vue
index 6ad68a3c..ca3f695f 100644
--- a/app/app.vue
+++ b/app/app.vue
@@ -143,6 +143,7 @@ provide(
<NuxtPage />
</NuxtLayout>
<ClientOnly>
+ <AdminTours />
<component
:is="DebugPanel"
v-if="DebugPanel"
diff --git a/app/components/AdminTours.client.vue b/app/components/AdminTours.client.vue
new file mode 100644
index 00000000..dfd5f442
--- /dev/null
+++ b/app/components/AdminTours.client.vue
@@ -0,0 +1,264 @@
+<script setup lang="ts">
+import { driver, type Driver, type DriveStep } from 'driver.js'
+import 'driver.js/dist/driver.css'
+import { tourIds, type TourId } from '~~/shared/types/tours'
+const route = useRoute()
+const { user } = useUserSession()
+const { records, ready, busy, revision, load, update } = useTours()
+const settings = useSettingsStore()
+const { locale } = useI18n()
+let active: Driver | undefined
+let generation = 0
+const current = computed<TourId | undefined>(() => {
+ if (route.path === '/') return 'home'
+ if (route.path === '/dashboard') return 'dashboard'
+ const name = route.path
+ .replace('/dashboard/settings/', '')
+ .replace('/dashboard/', '')
+ return route.path.startsWith('/dashboard/') &&
+ tourIds.includes(name as TourId)
+ ? (name as TourId)
+ : undefined
+})
+function stop() {
+ active?.destroy()
+ active = undefined
+}
+async function start() {
+ const token = ++generation
+ stop()
+ if (
+ !user.value?.isAdmin ||
+ settings.getSetting('system:firstLaunch') ||
+ !ready.value ||
+ busy.value
+ )
+ return
+ const id = current.value
+ if (!id || records.value[id] !== 'pending') return
+ await nextTick()
+ await new Promise((resolve) =>
+ requestAnimationFrame(() => requestAnimationFrame(resolve)),
+ )
+ if (token !== generation) return
+ const field = (key: string) => `[data-tour-setting="${key}"]`
+ const plans: Record<TourId, [string, string?][]> = {
+ home: [
+ ['home'],
+ ['homeAvatar', '[data-tour="home-avatar"]'],
+ ['homeDashboard', '[data-tour="home-dashboard"]'],
+ ],
+ dashboard: [
+ ['dashboard', '[data-tour="dashboard-photos"]'],
+ ['queueDetails', '[data-tour="dashboard-queue"]'],
+ ['shareSite', '[data-tour="dashboard-share"]'],
+ ],
+ photos: [
+ ['photoUpload', '[data-tour="photo-upload"]'],
+ ['queueDetails', '[data-tour="photo-queue"]'],
+ ['photoFilter', '[data-tour="photo-filter"]'],
+ ],
+ albums: [
+ ['albumCreate', '[data-tour="album-create"]'],
+ ['albumActions', '[data-tour="album-actions"]'],
+ ],
+ general: [
+ ['general', field('app:title')],
+ ['avatar', field('app:avatarUrl')],
+ ['appearance', field('app:appearance.theme')],
+ ['saveSettings', 'button[form="appSettingsForm"][type="submit"]'],
+ ],
+ storage: [
+ ['storage', '[data-tour="storage-default"]'],
+ ['storageAdd', '[data-tour="storage-add"]'],
+ ],
+ map: [
+ ['map', field('map:provider')],
+ [
+ 'mapStyle',
+ `${field('map:mapbox.style')}, ${field('map:maplibre.style')}`,
+ ],
+ [
+ 'mapToken',
+ `${field('map:mapbox.token')}, ${field('map:maplibre.token')}`,
+ ],
+ ['location', field('location:language')],
+ ['locationService', field('location:nominatim.baseUrl')],
+ ['saveSettings', 'button[form="mapSettingsForm"][type="submit"]'],
+ ],
+ privacy: [
+ ['privacy', field('privacy:upload.autoEraseLocation')],
+ ['saveSettings', 'button[form="privacySettingsForm"][type="submit"]'],
+ ],
+ system: [
+ ['githubLogin', field('system:auth.github.enabled')],
+ ['uploadLimit', field('system:upload.maxFileSize')],
+ ['duplicateCheck', field('system:upload.duplicateCheck.enabled')],
+ ['resetTours', '[data-tour="reset"]'],
+ ],
+ }
+ const visibleTarget = (selector: string) =>
+ Array.from(document.querySelectorAll<HTMLElement>(selector)).find(
+ (element) => element.getClientRects().length > 0,
+ )
+ // Settings arrive asynchronously. Wait for the first actual control, not its skeleton.
+ const firstSelector = plans[id][0]?.[1]
+ if (firstSelector && !visibleTarget(firstSelector)) {
+ await new Promise<void>((resolve) => {
+ const observer = new MutationObserver(() => {
+ if (visibleTarget(firstSelector)) finishWait()
+ })
+ const timeout = window.setTimeout(finishWait, 5000)
+ function finishWait() {
+ observer.disconnect()
+ clearTimeout(timeout)
+ resolve()
+ }
+ observer.observe(document.body, {
+ childList: true,
+ subtree: true,
+ attributes: true,
+ })
+ })
+ }
+ if (token !== generation) return
+ const steps: DriveStep[] = plans[id].flatMap(([key, selector]) => {
+ const target = selector ? visibleTarget(selector) : undefined
+ if (selector && !target) return []
+ return [
+ {
+ element: target,
+ popover: {
+ title: $t(`tours.${key}.title`),
+ description: $t(`tours.${key}.description`),
+ popoverClass: key === 'home' ? 'chronoframe-tour-welcome' : undefined,
+ },
+ },
+ ]
+ })
+ if (!steps.length) return
+ let saving = false
+ async function finish(status: 'completed' | 'skipped') {
+ if (saving) return
+ saving = true
+ const saved = await update(id as TourId, status)
+ saving = false
+ if (saved && token === generation) stop()
+ }
+ active = driver({
+ steps,
+ showProgress: true,
+ showButtons: ['next', 'previous', 'close'],
+ allowClose: true,
+ overlayClickBehavior: 'none',
+ closeBtnLabel: $t('tours.skip'),
+ onCloseClick: () => {
+ void finish('skipped')
+ },
+ onDestroyStarted: () => {
+ void finish('skipped')
+ },
+ disableActiveInteraction: true,
+ animate: !window.matchMedia('(prefers-reduced-motion: reduce)').matches,
+ nextBtnText: $t('tours.next'),
+ prevBtnText: $t('tours.previous'),
+ doneBtnText: $t('tours.done'),
+ progressText: '{{current}} / {{total}}',
+ onDoneClick: () => {
+ void finish('completed')
+ },
+ onNextClick: () => {
+ if (active?.hasNextStep()) active.moveNext()
+ else void finish('completed')
+ },
+ onPopoverRender: (popover) => {
+ popover.closeButton.textContent = $t('tours.skip')
+ popover.closeButton.classList.add('chronoframe-tour-skip')
+ popover.footerButtons.prepend(popover.closeButton)
+ },
+ })
+ active.drive()
+}
+watch(
+ () => user.value?.isAdmin,
+ async (admin) => {
+ ++generation
+ stop()
+ ready.value = false
+ if (admin) {
+ await load()
+ void start()
+ }
+ },
+ { immediate: true },
+)
+watch(
+ [revision, locale],
+ () => {
+ void start()
+ },
+ { flush: 'post' },
+)
+watch(
+ () => route.path,
+ async () => {
+ ++generation
+ stop()
+ if (user.value?.isAdmin) {
+ await load()
+ void start()
+ }
+ },
+ { flush: 'post' },
+)
+const removePageFinish = useNuxtApp().hook('page:finish', () => {
+ void start()
+})
+watch(
+ busy,
+ (value) => {
+ if (!value) void start()
+ },
+ { flush: 'post' },
+)
+onUnmounted(() => {
+ removePageFinish()
+ ++generation
+ stop()
+})
+</script>
+<template><span hidden /></template>
+
+<style>
+.driver-overlay {
+ z-index: 10050 !important;
+}
+.driver-popover {
+ z-index: 10051 !important;
+}
+.driver-popover.chronoframe-tour-welcome {
+ max-width: min(480px, calc(100vw - 32px));
+ padding: 24px;
+}
+.chronoframe-tour-welcome .driver-popover-title {
+ font-size: 22px;
+}
+.chronoframe-tour-welcome .driver-popover-description {
+ font-size: 14px;
+ line-height: 1.8;
+}
+
+.driver-popover .driver-popover-close-btn.chronoframe-tour-skip {
+ position: static;
+ display: inline-block;
+ width: auto;
+ height: auto;
+ border: 1px solid #ccc;
+ background: #fff;
+ color: #2d2d2d;
+ border-radius: 3px;
+ padding: 3px 7px;
+ font-size: 12px;
+ cursor: pointer;
+}
+</style>
diff --git a/app/components/TourControls.vue b/app/components/TourControls.vue
new file mode 100644
index 00000000..6f8d90d1
--- /dev/null
+++ b/app/components/TourControls.vue
@@ -0,0 +1,77 @@
+<script setup lang="ts">
+import { tourIds, type TourStatus } from '~~/shared/types/tours'
+
+defineProps<{ debug?: boolean }>()
+const { records, ready, busy, update } = useTours()
+const { user } = useUserSession()
+const statuses = computed(() =>
+ (['pending', 'completed', 'skipped'] as const).map((value) => ({
+ label: $t(`tours.status.${value}`),
+ value,
+ })),
+)
+</script>
+<template>
+ <details
+ v-if="debug && user?.isAdmin"
+ class="group rounded-md border border-default text-xs"
+ >
+ <summary
+ class="flex cursor-pointer list-none items-center justify-between gap-2 px-3 py-2 font-medium select-none [&::-webkit-details-marker]:hidden"
+ >
+ <span>{{ $t('tours.debugTitle') }}</span>
+ <Icon
+ name="tabler:chevron-down"
+ class="size-3.5 shrink-0 text-muted transition-transform group-open:rotate-180"
+ />
+ </summary>
+ <div class="space-y-2 border-t border-default px-3 py-2">
+ <div
+ v-for="id in tourIds"
+ :key="id"
+ class="flex min-w-0 items-center justify-between gap-3"
+ >
+ <span class="min-w-0 truncate text-muted">{{
+ $t(`tours.${id}.title`)
+ }}</span>
+ <USelect
+ :model-value="records[id]"
+ :items="statuses"
+ :aria-label="$t(`tours.${id}.title`)"
+ :disabled="busy || !ready"
+ :ui="{ content: 'z-[10010]' }"
+ size="xs"
+ class="w-24 shrink-0"
+ @update:model-value="update(id, $event as TourStatus)"
+ />
+ </div>
+ <div class="border-t border-default pt-2">
+ <UButton
+ :loading="busy"
+ :disabled="!ready"
+ icon="tabler:refresh"
+ size="xs"
+ color="neutral"
+ variant="soft"
+ @click="update()"
+ >{{ $t('tours.reset') }}</UButton
+ >
+ </div>
+ </div>
+ </details>
+ <section
+ v-else-if="user?.isAdmin"
+ class="space-y-3 rounded-md border border-default p-5"
+ data-tour="reset"
+ >
+ <h3 class="font-semibold">{{ $t('tours.controlsTitle') }}</h3>
+ <p class="text-sm text-muted">{{ $t('tours.resetHelp') }}</p>
+ <UButton
+ :loading="busy"
+ :disabled="!ready"
+ icon="tabler:refresh"
+ @click="update(undefined, 'pending', { redirectTo: '/dashboard' })"
+ >{{ $t('tours.reset') }}</UButton
+ >
+ </section>
+</template>
diff --git a/app/components/debug/Panel.vue b/app/components/debug/Panel.vue
index 1b65f743..aae45ff1 100644
--- a/app/components/debug/Panel.vue
+++ b/app/components/debug/Panel.vue
@@ -373,8 +373,9 @@ onBeforeUnmount(() => {
</div>
</div>
</section>
- <section class="border-t border-default pt-3">
+ <section class="space-y-2 border-t border-default pt-3">
<h3 class="text-xs font-semibold">{{ $t('debug.general') }}</h3>
+ <TourControls debug />
<DebugControl
v-for="control in globalControls"
:key="control.key"
diff --git a/app/components/masonry/item/Header.vue b/app/components/masonry/item/Header.vue
index 6e3d26a1..b7258823 100644
--- a/app/components/masonry/item/Header.vue
+++ b/app/components/masonry/item/Header.vue
@@ -44,7 +44,10 @@ const isRepoLinkHovering = ref(false)
</script>
<template>
- <div class="w-full relative overflow-hidden">
+ <div
+ class="w-full relative overflow-hidden"
+ data-tour="home-header"
+ >
<div
class="absolute inset-0 -z-10 blur-3xl scale-110 bg-cover bg-center opacity-35"
:style="{
@@ -72,6 +75,7 @@ const isRepoLinkHovering = ref(false)
"
class="size-16 rounded-full object-cover"
:class="!loggedIn && 'cursor-pointer'"
+ data-tour="home-avatar"
:alt="$t('ui.photo.avatarAlt')"
@click="!loggedIn && handleOpenLogin()"
@error="handleAvatarError"
@@ -196,6 +200,7 @@ const isRepoLinkHovering = ref(false)
variant="soft"
class="bg-transparent rounded-full cursor-pointer"
icon="tabler:dashboard"
+ data-tour="home-dashboard"
to="/dashboard"
/>
</UTooltip>
diff --git a/app/components/setting/SettingField.vue b/app/components/setting/SettingField.vue
index d162d62b..637a36ed 100644
--- a/app/components/setting/SettingField.vue
+++ b/app/components/setting/SettingField.vue
@@ -139,6 +139,7 @@ const isToggleField = computed(() => props.field.ui.type === 'toggle')
<template>
<div
v-if="isToggleField"
+ :data-tour-setting="`${field.namespace}:${field.key}`"
class="rounded-md border border-neutral-200 bg-neutral-50/50 px-4 py-3 dark:border-neutral-800 dark:bg-neutral-900/40"
>
<div class="flex items-start justify-between gap-6">
@@ -168,6 +169,7 @@ const isToggleField = computed(() => props.field.ui.type === 'toggle')
<component
:is="UFormField"
+ :data-tour-setting="`${field.namespace}:${field.key}`"
v-else
:name="field.key"
:label="$t(labelKey)"
diff --git a/app/composables/useTours.ts b/app/composables/useTours.ts
new file mode 100644
index 00000000..550803e8
--- /dev/null
+++ b/app/composables/useTours.ts
@@ -0,0 +1,51 @@
+import {
+ tourIds,
+ type TourId,
+ type TourRecords,
+ type TourStatus,
+} from '~~/shared/types/tours'
+export function useTours() {
+ const records = useState<TourRecords>(
+ 'tour-records',
+ () =>
+ Object.fromEntries(tourIds.map((id) => [id, 'pending'])) as TourRecords,
+ )
+ const ready = useState('tour-ready', () => false)
+ const busy = useState('tour-busy', () => false)
+ const revision = useState('tour-revision', () => 0)
+ const toast = useToast()
+ async function load() {
+ ready.value = false
+ try {
+ records.value = await $fetch<TourRecords>('/api/system/tours')
+ ready.value = true
+ } catch {
+ /* Require authoritative state. */
+ }
+ }
+ async function update(
+ id?: TourId,
+ status: TourStatus = 'pending',
+ options: { redirectTo?: string } = {},
+ ) {
+ if (busy.value) return false
+ busy.value = true
+ try {
+ records.value = await $fetch<TourRecords>('/api/system/tours', {
+ method: 'PUT',
+ body: id ? { action: 'set', id, status } : { action: 'reset' },
+ })
+ ready.value = true
+ revision.value++
+ // Keep automatic tours suspended until the reset destination has loaded.
+ if (options.redirectTo) await navigateTo(options.redirectTo)
+ return true
+ } catch {
+ toast.add({ title: $t('tours.saveError'), color: 'error' })
+ return false
+ } finally {
+ busy.value = false
+ }
+ }
+ return { records, ready, busy, revision, load, update }
+}
diff --git a/app/pages/dashboard/albums.vue b/app/pages/dashboard/albums.vue
index 12026aac..69c96c9c 100644
--- a/app/pages/dashboard/albums.vue
+++ b/app/pages/dashboard/albums.vue
@@ -542,13 +542,14 @@ const columns = computed<any[]>(() => [
</script>
<template>
- <UDashboardPanel>
+ <UDashboardPanel data-tour="page">
<template #header>
<UDashboardNavbar :title="$t('title.albums')">
<template #right>
<UButton
icon="tabler:plus"
variant="soft"
+ data-tour="album-create"
@click="openCreateSlideover"
>
{{ $t('dashboard.albums.createButton') }}
@@ -647,7 +648,10 @@ const columns = computed<any[]>(() => [
</template>
<template #actions-cell="{ row }">
- <div class="flex gap-1">
+ <div
+ class="flex gap-1"
+ data-tour="album-actions"
+ >
<UButton
variant="ghost"
color="neutral"
diff --git a/app/pages/dashboard/index.vue b/app/pages/dashboard/index.vue
index b708b0e9..d97cebed 100644
--- a/app/pages/dashboard/index.vue
+++ b/app/pages/dashboard/index.vue
@@ -307,7 +307,7 @@ const onShareSite = () => {
</script>
<template>
- <UDashboardPanel>
+ <UDashboardPanel data-tour="page">
<template #header>
<UDashboardNavbar :title="$t('dashboard.overview.title')" />
</template>
@@ -316,6 +316,7 @@ const onShareSite = () => {
<div class="flex flex-col gap-6">
<div class="grid grid-cols-2 lg:grid-cols-4 gap-4">
<DashboardIndicator
+ data-tour="dashboard-photos"
:title="$t('dashboard.overview.indicator.totalPhotos')"
icon="tabler:photo"
color="blue"
@@ -330,6 +331,7 @@ const onShareSite = () => {
:value="dashboardStats?.photos?.thisMonth || 0"
/>
<DashboardIndicator
+ data-tour="dashboard-queue"
:title="$t('dashboard.overview.indicator.queueStatus.title')"
icon="tabler:loader"
color="purple"
@@ -425,6 +427,7 @@ const onShareSite = () => {
size="xs"
color="info"
trailing-icon="tabler:external-link"
+ data-tour="dashboard-share"
@click="onShareSite"
>
{{ $t('dashboard.overview.shareSite.button') }}
diff --git a/app/pages/dashboard/photos.vue b/app/pages/dashboard/photos.vue
index 96329f25..97afd029 100644
--- a/app/pages/dashboard/photos.vue
+++ b/app/pages/dashboard/photos.vue
@@ -2045,7 +2045,7 @@ onUnmounted(() => {
</script>
<template>
- <UDashboardPanel>
+ <UDashboardPanel data-tour="page">
<template #header>
<UDashboardNavbar :title="$t('dashboard.photos.toolbar.title')">
<template #right>
@@ -2054,6 +2054,7 @@ onUnmounted(() => {
variant="soft"
color="neutral"
icon="tabler:list-check"
+ data-tour="photo-queue"
@click="$router.push('/dashboard/queue')"
>
<span class="hidden sm:inline">{{
@@ -2062,6 +2063,7 @@ onUnmounted(() => {
</UButton>
<UButton
icon="tabler:cloud-upload"
+ data-tour="photo-upload"
@click="openUploadSlideover"
>
<span class="hidden sm:inline">{{
@@ -2306,6 +2308,7 @@ onUnmounted(() => {
</UPopover>
<!-- 过滤器 -->
<USelectMenu
+ data-tour="photo-filter"
v-model="photoFilter"
class="w-full sm:w-48"
:items="[
diff --git a/app/pages/dashboard/settings/general.vue b/app/pages/dashboard/settings/general.vue
index a8643042..e47e114d 100644
--- a/app/pages/dashboard/settings/general.vue
+++ b/app/pages/dashboard/settings/general.vue
@@ -80,7 +80,7 @@ const handleAppearanceSettingsSubmit = async () => {
</script>
<template>
- <UDashboardPanel>
+ <UDashboardPanel data-tour="page">
<template #header>
<UDashboardNavbar :title="$t('title.generalSettings')" />
</template>
diff --git a/app/pages/dashboard/settings/map.vue b/app/pages/dashboard/settings/map.vue
index ebb1a64b..8653607a 100644
--- a/app/pages/dashboard/settings/map.vue
+++ b/app/pages/dashboard/settings/map.vue
@@ -89,7 +89,7 @@ const handleLocationSettingsSubmit = async () => {
</script>
<template>
- <UDashboardPanel>
+ <UDashboardPanel data-tour="page">
<template #header>
<UDashboardNavbar :title="$t('title.mapAndLocation')" />
</template>
diff --git a/app/pages/dashboard/settings/privacy.vue b/app/pages/dashboard/settings/privacy.vue
index 436cd748..d5ebff18 100644
--- a/app/pages/dashboard/settings/privacy.vue
+++ b/app/pages/dashboard/settings/privacy.vue
@@ -47,7 +47,7 @@ const handlePrivacySettingsSubmit = async () => {
</script>
<template>
- <UDashboardPanel>
+ <UDashboardPanel data-tour="page">
<template #header>
<UDashboardNavbar :title="$t('title.privacySettings')" />
</template>
diff --git a/app/pages/dashboard/settings/storage.vue b/app/pages/dashboard/settings/storage.vue
index 70108258..fd35da37 100644
--- a/app/pages/dashboard/settings/storage.vue
+++ b/app/pages/dashboard/settings/storage.vue
@@ -525,7 +525,7 @@ const resetStorageConfigForm = () => {
</script>
<template>
- <UDashboardPanel>
+ <UDashboardPanel data-tour="page">
<template #header>
<UDashboardNavbar :title="$t('title.storageSettings')" />
</template>
@@ -579,6 +579,7 @@ const resetStorageConfigForm = () => {
}"
>
<USelectMenu
+ data-tour="storage-default"
v-model="storageSettingsState.storageConfigId"
:icon="
PROVIDER_ICON[
@@ -684,6 +685,7 @@ const resetStorageConfigForm = () => {
<UButton
size="sm"
variant="soft"
+ data-tour="storage-add"
icon="tabler:plus"
>
{{ $t('settings.storage.actions.add') }}
diff --git a/app/pages/dashboard/settings/system.vue b/app/pages/dashboard/settings/system.vue
index ab91a229..80c3e4ad 100644
--- a/app/pages/dashboard/settings/system.vue
+++ b/app/pages/dashboard/settings/system.vue
@@ -105,7 +105,7 @@ const handleSectionSettingsSubmit = async (
</script>
<template>
- <UDashboardPanel>
+ <UDashboardPanel data-tour="page">
<template #header>
<UDashboardNavbar :title="$t('title.systemSettings')" />
</template>
@@ -125,6 +125,7 @@ const handleSectionSettingsSubmit = async (
</p>
</section>
+ <TourControls />
<template v-if="systemLoading && systemFieldSections.length === 0">
<section
v-for="index in 3"
diff --git a/i18n/locales/en.json b/i18n/locales/en.json
index 8abd589f..1ff8bcd3 100644
--- a/i18n/locales/en.json
+++ b/i18n/locales/en.json
@@ -1726,5 +1726,145 @@
"ogImage": "Page OG image",
"openOgImage": "Open OG image",
"ogImageError": "Could not load the OG image."
+ },
+ "tours": {
+ "controlsTitle": "Getting started tours",
+ "reset": "Reset all tours",
+ "resetHelp": "After resetting, tours appear the next time you visit each page.",
+ "saveError": "Could not save tour state. Please retry.",
+ "next": "Next",
+ "previous": "Previous",
+ "done": "Finish",
+ "skip": "Skip tour",
+ "status": {
+ "pending": "Pending",
+ "completed": "Completed",
+ "skipped": "Skipped"
+ },
+ "dashboard": {
+ "title": "Photo statistics",
+ "description": "This card shows the total number of photos. Click it to open photo management. Nearby cards show new photos this month and storage usage."
+ },
+ "photos": {
+ "title": "Manage photos",
+ "description": "Upload photos, edit details and change visibility. Track upload processing in the task queue."
+ },
+ "albums": {
+ "title": "Manage albums",
+ "description": "Create an album here, add its name and description, and choose a cover and access protection. Then add photos."
+ },
+ "general": {
+ "title": "Site appearance",
+ "description": "Set the site title shown in the gallery header and browser tabs, then save this section."
+ },
+ "storage": {
+ "title": "Photo storage",
+ "description": "Choose the default storage provider for new uploads here, then save your changes."
+ },
+ "map": {
+ "title": "Configure maps",
+ "description": "Choose Mapbox or MapLibre here. Its style and token fields appear below."
+ },
+ "location": {
+ "title": "Location lookup",
+ "description": "Choose the language used for photo location names. Map rendering and location lookup are configured separately."
+ },
+ "privacy": {
+ "title": "Location privacy",
+ "description": "Choose whether uploads automatically remove location information to protect where photos were taken."
+ },
+ "system": {
+ "title": "System settings",
+ "description": "Configure uploads, duplicate checks and third-party sign-in. Use Reset all tours on this page to restart the guides."
+ },
+ "home": {
+ "title": "Your gallery homepage",
+ "description": "Visitors can browse, filter and sort photos, open photo details, and explore albums and maps."
+ },
+ "login": {
+ "title": "How to sign in later",
+ "description": "After signing out, use the sign-in button in the homepage header, or visit /signin directly. Sign in with your administrator account to manage the site."
+ },
+ "adminEntry": {
+ "title": "Open administration",
+ "description": "Once signed in, use the dashboard button in the homepage header or visit /dashboard. The dashboard account menu lets you return to the gallery."
+ },
+ "queueDetails": {
+ "title": "Track processing",
+ "description": "Open the task queue to track uploads, inspect failures and retry tasks."
+ },
+ "shareSite": {
+ "title": "Share your gallery",
+ "description": "Share your newly set up ChronoFrame instance with the community and help others discover your site."
+ },
+ "photoFilter": {
+ "title": "Filter photo types",
+ "description": "Switch between all photos, Live Photos and still images."
+ },
+ "albumActions": {
+ "title": "Manage existing albums",
+ "description": "Reorder, edit or delete albums using these buttons. Album editing includes covers and access protection."
+ },
+ "avatar": {
+ "title": "Site avatar",
+ "description": "Upload or replace the avatar shown in the gallery header."
+ },
+ "appearance": {
+ "title": "Choose appearance",
+ "description": "Choose a light, dark or system theme here."
+ },
+ "saveSettings": {
+ "title": "Save settings",
+ "description": "Save changes using the button for this section. It stays disabled until settings change."
+ },
+ "storageAdd": {
+ "title": "Add storage",
+ "description": "Add a local, S3 or OpenList provider and save its paths and credentials."
+ },
+ "mapStyle": {
+ "title": "Map style",
+ "description": "Set the style URL for the selected map provider."
+ },
+ "mapToken": {
+ "title": "Map access token",
+ "description": "Enter the access token for the selected map provider. The style and token must match the provider."
+ },
+ "locationService": {
+ "title": "Location lookup service",
+ "description": "Set a Nominatim URL here, or configure the Mapbox token above to use Mapbox lookup."
+ },
+ "githubLogin": {
+ "title": "GitHub sign-in",
+ "description": "Enable GitHub sign-in here, then configure its OAuth Client ID and Client Secret."
+ },
+ "uploadLimit": {
+ "title": "Upload size limit",
+ "description": "Set the maximum upload size per file in MB."
+ },
+ "duplicateCheck": {
+ "title": "Duplicate checks",
+ "description": "Enable duplicate checks and choose the handling mode below."
+ },
+ "resetTours": {
+ "title": "Restart the tours",
+ "description": "Reset all tour records here. Each page will show its tour again when visited."
+ },
+ "photoUpload": {
+ "title": "Upload photos",
+ "description": "Click this button to open the upload panel, select your photos and start uploading."
+ },
+ "albumCreate": {
+ "title": "Create an album",
+ "description": "Click this button to open the album creation form. Enter a name and description, then save to create the album."
+ },
+ "homeAvatar": {
+ "title": "Site avatar and sign-in",
+ "description": "This is your site avatar. After signing out, click the avatar to open the sign-in page. You can also visit /signin directly."
+ },
+ "homeDashboard": {
+ "title": "Open the dashboard",
+ "description": "Once signed in as an administrator, click this button to open the dashboard and manage photos, albums and site settings."
+ },
+ "debugTitle": "Tour status"
}
}
diff --git a/i18n/locales/ja.json b/i18n/locales/ja.json
index 76326d7d..54cc6bb0 100644
--- a/i18n/locales/ja.json
+++ b/i18n/locales/ja.json
@@ -1735,5 +1735,145 @@
"ogImage": "ページの OG 画像",
"openOgImage": "OG 画像を開く",
"ogImageError": "OG 画像を読み込めませんでした。"
+ },
+ "tours": {
+ "controlsTitle": "Getting started tours",
+ "reset": "Reset all tours",
+ "resetHelp": "After resetting, tours appear the next time you visit each page.",
+ "saveError": "Could not save tour state. Please retry.",
+ "next": "Next",
+ "previous": "Previous",
+ "done": "Finish",
+ "skip": "Skip tour",
+ "status": {
+ "pending": "Pending",
+ "completed": "Completed",
+ "skipped": "Skipped"
+ },
+ "dashboard": {
+ "title": "Photo statistics",
+ "description": "This card shows the total number of photos. Click it to open photo management. Nearby cards show new photos this month and storage usage."
+ },
+ "photos": {
+ "title": "Manage photos",
+ "description": "Upload photos, edit details and change visibility. Track upload processing in the task queue."
+ },
+ "albums": {
+ "title": "Manage albums",
+ "description": "Create an album here, add its name and description, and choose a cover and access protection. Then add photos."
+ },
+ "general": {
+ "title": "Site appearance",
+ "description": "Set the site title shown in the gallery header and browser tabs, then save this section."
+ },
+ "storage": {
+ "title": "Photo storage",
+ "description": "Choose the default storage provider for new uploads here, then save your changes."
+ },
+ "map": {
+ "title": "Configure maps",
+ "description": "Choose Mapbox or MapLibre here. Its style and token fields appear below."
+ },
+ "location": {
+ "title": "Location lookup",
+ "description": "Choose the language used for photo location names. Map rendering and location lookup are configured separately."
+ },
+ "privacy": {
+ "title": "Location privacy",
+ "description": "Choose whether uploads automatically remove location information to protect where photos were taken."
+ },
+ "system": {
+ "title": "System settings",
+ "description": "Configure uploads, duplicate checks and third-party sign-in. Use Reset all tours on this page to restart the guides."
+ },
+ "home": {
+ "title": "Your gallery homepage",
+ "description": "Visitors can browse, filter and sort photos, open photo details, and explore albums and maps."
+ },
+ "login": {
+ "title": "How to sign in later",
+ "description": "After signing out, use the sign-in button in the homepage header, or visit /signin directly. Sign in with your administrator account to manage the site."
+ },
+ "adminEntry": {
+ "title": "Open administration",
+ "description": "Once signed in, use the dashboard button in the homepage header or visit /dashboard. The dashboard account menu lets you return to the gallery."
+ },
+ "queueDetails": {
+ "title": "Track processing",
+ "description": "Open the task queue to track uploads, inspect failures and retry tasks."
+ },
+ "shareSite": {
+ "title": "Share your gallery",
+ "description": "新しく構築した ChronoFrame インスタンスをコミュニティに共有して、あなたのサイトを紹介しましょう。"
+ },
+ "photoFilter": {
+ "title": "Filter photo types",
+ "description": "Switch between all photos, Live Photos and still images."
+ },
+ "albumActions": {
+ "title": "Manage existing albums",
+ "description": "Reorder, edit or delete albums using these buttons. Album editing includes covers and access protection."
+ },
+ "avatar": {
+ "title": "Site avatar",
+ "description": "Upload or replace the avatar shown in the gallery header."
+ },
+ "appearance": {
+ "title": "Choose appearance",
+ "description": "Choose a light, dark or system theme here."
+ },
+ "saveSettings": {
+ "title": "Save settings",
+ "description": "Save changes using the button for this section. It stays disabled until settings change."
+ },
+ "storageAdd": {
+ "title": "Add storage",
+ "description": "Add a local, S3 or OpenList provider and save its paths and credentials."
+ },
+ "mapStyle": {
+ "title": "Map style",
+ "description": "Set the style URL for the selected map provider."
+ },
+ "mapToken": {
+ "title": "Map access token",
+ "description": "Enter the access token for the selected map provider. The style and token must match the provider."
+ },
+ "locationService": {
+ "title": "Location lookup service",
+ "description": "Set a Nominatim URL here, or configure the Mapbox token above to use Mapbox lookup."
+ },
+ "githubLogin": {
+ "title": "GitHub sign-in",
+ "description": "Enable GitHub sign-in here, then configure its OAuth Client ID and Client Secret."
+ },
+ "uploadLimit": {
+ "title": "Upload size limit",
+ "description": "Set the maximum upload size per file in MB."
+ },
+ "duplicateCheck": {
+ "title": "Duplicate checks",
+ "description": "Enable duplicate checks and choose the handling mode below."
+ },
+ "resetTours": {
+ "title": "Restart the tours",
+ "description": "Reset all tour records here. Each page will show its tour again when visited."
+ },
+ "photoUpload": {
+ "title": "写真をアップロード",
+ "description": "このボタンでアップロードパネルを開き、写真を選択してアップロードを開始します。"
+ },
+ "albumCreate": {
+ "title": "アルバムを作成",
+ "description": "このボタンでアルバム作成フォームを開き、名前と説明を入力して保存します。"
+ },
+ "homeAvatar": {
+ "title": "アバターとログイン",
+ "description": "サイトのアバターです。ログアウト後、アバターをクリックするとログイン画面が開きます。/signin に直接アクセスすることもできます。"
+ },
+ "homeDashboard": {
+ "title": "ダッシュボードを開く",
+ "description": "管理者としてログインした後、このボタンからダッシュボードを開き、写真、アルバム、サイト設定を管理できます。"
+ },
+ "debugTitle": "ガイドの状態"
}
}
diff --git a/i18n/locales/ru.json b/i18n/locales/ru.json
index a7f6db2d..803c5f70 100644
--- a/i18n/locales/ru.json
+++ b/i18n/locales/ru.json
@@ -1726,5 +1726,145 @@
"ogImage": "OG-изображение страницы",
"openOgImage": "Открыть OG-изображение",
"ogImageError": "Не удалось загрузить OG-изображение."
+ },
+ "tours": {
+ "controlsTitle": "Getting started tours",
+ "reset": "Reset all tours",
+ "resetHelp": "After resetting, tours appear the next time you visit each page.",
+ "saveError": "Could not save tour state. Please retry.",
+ "next": "Next",
+ "previous": "Previous",
+ "done": "Finish",
+ "skip": "Skip tour",
+ "status": {
+ "pending": "Pending",
+ "completed": "Completed",
+ "skipped": "Skipped"
+ },
+ "dashboard": {
+ "title": "Photo statistics",
+ "description": "This card shows the total number of photos. Click it to open photo management. Nearby cards show new photos this month and storage usage."
+ },
+ "photos": {
+ "title": "Manage photos",
+ "description": "Upload photos, edit details and change visibility. Track upload processing in the task queue."
+ },
+ "albums": {
+ "title": "Manage albums",
+ "description": "Create an album here, add its name and description, and choose a cover and access protection. Then add photos."
+ },
+ "general": {
+ "title": "Site appearance",
+ "description": "Set the site title shown in the gallery header and browser tabs, then save this section."
+ },
+ "storage": {
+ "title": "Photo storage",
+ "description": "Choose the default storage provider for new uploads here, then save your changes."
+ },
+ "map": {
+ "title": "Configure maps",
+ "description": "Choose Mapbox or MapLibre here. Its style and token fields appear below."
+ },
+ "location": {
+ "title": "Location lookup",
+ "description": "Choose the language used for photo location names. Map rendering and location lookup are configured separately."
+ },
+ "privacy": {
+ "title": "Location privacy",
+ "description": "Choose whether uploads automatically remove location information to protect where photos were taken."
+ },
+ "system": {
+ "title": "System settings",
+ "description": "Configure uploads, duplicate checks and third-party sign-in. Use Reset all tours on this page to restart the guides."
+ },
+ "home": {
+ "title": "Your gallery homepage",
+ "description": "Visitors can browse, filter and sort photos, open photo details, and explore albums and maps."
+ },
+ "login": {
+ "title": "How to sign in later",
+ "description": "After signing out, use the sign-in button in the homepage header, or visit /signin directly. Sign in with your administrator account to manage the site."
+ },
+ "adminEntry": {
+ "title": "Open administration",
+ "description": "Once signed in, use the dashboard button in the homepage header or visit /dashboard. The dashboard account menu lets you return to the gallery."
+ },
+ "queueDetails": {
+ "title": "Track processing",
+ "description": "Open the task queue to track uploads, inspect failures and retry tasks."
+ },
+ "shareSite": {
+ "title": "Share your gallery",
+ "description": "Поделитесь своим новым экземпляром ChronoFrame с сообществом, чтобы другие могли познакомиться с вашим сайтом."
+ },
+ "photoFilter": {
+ "title": "Filter photo types",
+ "description": "Switch between all photos, Live Photos and still images."
+ },
+ "albumActions": {
+ "title": "Manage existing albums",
+ "description": "Reorder, edit or delete albums using these buttons. Album editing includes covers and access protection."
+ },
+ "avatar": {
+ "title": "Site avatar",
+ "description": "Upload or replace the avatar shown in the gallery header."
+ },
+ "appearance": {
+ "title": "Choose appearance",
+ "description": "Choose a light, dark or system theme here."
+ },
+ "saveSettings": {
+ "title": "Save settings",
+ "description": "Save changes using the button for this section. It stays disabled until settings change."
+ },
+ "storageAdd": {
+ "title": "Add storage",
+ "description": "Add a local, S3 or OpenList provider and save its paths and credentials."
+ },
+ "mapStyle": {
+ "title": "Map style",
+ "description": "Set the style URL for the selected map provider."
+ },
+ "mapToken": {
+ "title": "Map access token",
+ "description": "Enter the access token for the selected map provider. The style and token must match the provider."
+ },
+ "locationService": {
+ "title": "Location lookup service",
+ "description": "Set a Nominatim URL here, or configure the Mapbox token above to use Mapbox lookup."
+ },
+ "githubLogin": {
+ "title": "GitHub sign-in",
+ "description": "Enable GitHub sign-in here, then configure its OAuth Client ID and Client Secret."
+ },
+ "uploadLimit": {
+ "title": "Upload size limit",
+ "description": "Set the maximum upload size per file in MB."
+ },
+ "duplicateCheck": {
+ "title": "Duplicate checks",
+ "description": "Enable duplicate checks and choose the handling mode below."
+ },
+ "resetTours": {
+ "title": "Restart the tours",
+ "description": "Reset all tour records here. Each page will show its tour again when visited."
+ },
+ "photoUpload": {
+ "title": "Загрузить фотографии",
+ "description": "Нажмите эту кнопку, чтобы открыть панель загрузки, выбрать фотографии и начать загрузку."
+ },
+ "albumCreate": {
+ "title": "Создать альбом",
+ "description": "Нажмите эту кнопку, чтобы открыть форму создания альбома. Укажите название и описание, затем сохраните альбом."
+ },
+ "homeAvatar": {
+ "title": "Аватар и вход",
+ "description": "Это аватар сайта. После выхода нажмите на него, чтобы открыть страницу входа. Также можно перейти на /signin."
+ },
+ "homeDashboard": {
+ "title": "Открыть панель управления",
+ "description": "После входа в аккаунт администратора нажмите эту кнопку, чтобы управлять фотографиями, альбомами и настройками сайта."
+ },
+ "debugTitle": "Статус подсказок"
}
}
diff --git a/i18n/locales/zh-Hans.json b/i18n/locales/zh-Hans.json
index 7f946443..42ff630f 100644
--- a/i18n/locales/zh-Hans.json
+++ b/i18n/locales/zh-Hans.json
@@ -1726,5 +1726,145 @@
"ogImage": "页面 OG 图",
"openOgImage": "打开 OG 图",
"ogImageError": "OG 图加载失败。"
+ },
+ "tours": {
+ "controlsTitle": "使用引导",
+ "reset": "重置所有引导",
+ "resetHelp": "重置后,再次进入相应页面时将重新展示管理员引导。",
+ "saveError": "引导状态保存失败,请重试",
+ "next": "下一步",
+ "previous": "上一步",
+ "done": "完成",
+ "skip": "跳过引导",
+ "status": {
+ "pending": "待引导",
+ "completed": "已完成",
+ "skipped": "已跳过"
+ },
+ "dashboard": {
+ "title": "照片统计",
+ "description": "这里显示照片总数,点击这张卡片可进入照片管理。旁边还可以查看本月新增照片和存储使用情况。"
+ },
+ "photos": {
+ "title": "照片管理",
+ "description": "上传照片、编辑信息和调整可见性。上传后可以在任务队列查看处理进度。"
+ },
+ "albums": {
+ "title": "相册管理",
+ "description": "点击这里创建相册,填写名称和说明,并选择封面及访问保护。创建后可以添加照片。"
+ },
+ "general": {
+ "title": "站点基本设置",
+ "description": "在这里修改站点标题,首页和浏览器标签页会使用这个名称。修改后点击本板块的保存设置。"
+ },
+ "storage": {
+ "title": "存储设置",
+ "description": "在这里选择默认存储方案,新上传的照片会使用该方案。修改后记得保存。"
+ },
+ "map": {
+ "title": "地图配置",
+ "description": "在这里选择 Mapbox 或 MapLibre。下方会显示所选服务商对应的地图样式和令牌设置。"
+ },
+ "location": {
+ "title": "地点解析",
+ "description": "在这里选择照片地点名称解析时使用的语言,地图显示和地点解析可以分别配置。"
+ },
+ "privacy": {
+ "title": "隐私设置",
+ "description": "检查上传时是否自动删除位置信息,按需要保护照片拍摄地点。"
+ },
+ "system": {
+ "title": "系统设置",
+ "description": "配置文件上传、重复检查和第三方登录。此页的“重置所有引导”可以重新开启各页面引导。"
+ },
+ "home": {
+ "title": "欢迎来到站点首页",
+ "description": "这是访客浏览照片的首页,可以筛选、排序和打开照片详情,也可以浏览相册和地图。"
+ },
+ "login": {
+ "title": "之后如何登录",
+ "description": "退出登录后,使用首页顶部的登录按钮进入登录页面,也可以直接访问 /signin。使用管理员账号登录后即可管理站点。"
+ },
+ "adminEntry": {
+ "title": "如何进入后台",
+ "description": "登录后,点击首页顶部的仪表盘按钮进入后台,也可以直接访问 /dashboard。后台账号菜单中的“查看图库”可返回首页。"
+ },
+ "queueDetails": {
+ "title": "查看处理进度",
+ "description": "点击这里进入任务队列,查看上传照片的处理进度和失败任务,并重试需要处理的任务。"
+ },
+ "shareSite": {
+ "title": "分享站点",
+ "description": "点击这里,向社区分享你刚搭建好的 ChronoFrame 实例,让更多人发现你的站点。"
+ },
+ "photoFilter": {
+ "title": "筛选照片类型",
+ "description": "在这里切换全部照片、实况照片和普通照片,快速找到需要管理的内容。"
+ },
+ "albumActions": {
+ "title": "管理已有相册",
+ "description": "使用这组按钮调整相册顺序、编辑相册信息或删除相册。编辑时可设置封面和访问保护。"
+ },
+ "avatar": {
+ "title": "设置站点头像",
+ "description": "在这里上传或更换站点头像,首页会使用该头像展示作者形象。"
+ },
+ "appearance": {
+ "title": "选择外观",
+ "description": "在这里选择浅色、深色或跟随系统主题。"
+ },
+ "saveSettings": {
+ "title": "保存设置",
+ "description": "修改设置后,点击对应板块的保存按钮使更改生效。没有修改时按钮会保持禁用。"
+ },
+ "storageAdd": {
+ "title": "添加存储方案",
+ "description": "点击这里添加本地、S3 或 OpenList 存储方案,填写对应路径和凭据后保存。"
+ },
+ "mapStyle": {
+ "title": "配置地图样式",
+ "description": "在这里填写当前地图服务商对应的样式地址,控制地图显示效果。"
+ },
+ "mapToken": {
+ "title": "配置地图令牌",
+ "description": "在这里填写所选地图服务商需要的访问令牌。令牌和样式需要与服务商匹配。"
+ },
+ "locationService": {
+ "title": "配置地点解析服务",
+ "description": "在这里设置 Nominatim 地址;也可在上方填写 Mapbox Token 使用 Mapbox 地点解析服务。"
+ },
+ "githubLogin": {
+ "title": "第三方登录",
+ "description": "在这里启用 GitHub 登录,启用后需要填写对应的 OAuth Client ID 和 Client Secret。"
+ },
+ "uploadLimit": {
+ "title": "上传大小限制",
+ "description": "在这里调整单个上传文件的大小上限,单位为 MB。"
+ },
+ "duplicateCheck": {
+ "title": "重复文件检查",
+ "description": "在这里开启上传重复检查,并在下方选择跳过、警告或阻止重复文件的处理方式。"
+ },
+ "resetTours": {
+ "title": "重新开启使用引导",
+ "description": "点击这里可以重置所有页面的引导记录;之后再次进入相应页面即可重新查看。"
+ },
+ "photoUpload": {
+ "title": "上传照片",
+ "description": "点击这个按钮打开上传面板,选择需要上传的照片并开始上传。"
+ },
+ "albumCreate": {
+ "title": "创建相簿",
+ "description": "点击这个按钮打开新建相簿表单,填写名称和说明,保存后即可创建相簿。"
+ },
+ "homeAvatar": {
+ "title": "站点头像与登录入口",
+ "description": "这是站点头像。退出登录后,点击头像即可进入登录页面,也可以直接访问 /signin。"
+ },
+ "homeDashboard": {
+ "title": "进入仪表盘",
+ "description": "使用管理员账号登录后,点击这个按钮进入仪表盘,管理照片、相簿和站点设置。"
+ },
+ "debugTitle": "使用引导状态"
}
}
diff --git a/i18n/locales/zh-Hant-HK.json b/i18n/locales/zh-Hant-HK.json
index 10810e1d..2dc26c60 100644
--- a/i18n/locales/zh-Hant-HK.json
+++ b/i18n/locales/zh-Hant-HK.json
@@ -1726,5 +1726,145 @@
"ogImage": "頁面 OG 圖",
"openOgImage": "開啟 OG 圖",
"ogImageError": "OG 圖載入失敗。"
+ },
+ "tours": {
+ "controlsTitle": "使用引导",
+ "reset": "重置所有引导",
+ "resetHelp": "重置后,再次进入相应页面时将重新展示管理员引导。",
+ "saveError": "引导状态保存失败,请重试",
+ "next": "下一步",
+ "previous": "上一步",
+ "done": "完成",
+ "skip": "跳过引导",
+ "status": {
+ "pending": "待引导",
+ "completed": "已完成",
+ "skipped": "已跳过"
+ },
+ "dashboard": {
+ "title": "照片统计",
+ "description": "这里显示照片总数,点击这张卡片可进入照片管理。旁边还可以查看本月新增照片和存储使用情况。"
+ },
+ "photos": {
+ "title": "照片管理",
+ "description": "上传照片、编辑信息和调整可见性。上传后可以在任务队列查看处理进度。"
+ },
+ "albums": {
+ "title": "相册管理",
+ "description": "点击这里创建相册,填写名称和说明,并选择封面及访问保护。创建后可以添加照片。"
+ },
+ "general": {
+ "title": "站点基本设置",
+ "description": "在这里修改站点标题,首页和浏览器标签页会使用这个名称。修改后点击本板块的保存设置。"
+ },
+ "storage": {
+ "title": "存储设置",
+ "description": "在这里选择默认存储方案,新上传的照片会使用该方案。修改后记得保存。"
+ },
+ "map": {
+ "title": "地图配置",
+ "description": "在这里选择 Mapbox 或 MapLibre。下方会显示所选服务商对应的地图样式和令牌设置。"
+ },
+ "location": {
+ "title": "地点解析",
+ "description": "在这里选择照片地点名称解析时使用的语言,地图显示和地点解析可以分别配置。"
+ },
+ "privacy": {
+ "title": "隐私设置",
+ "description": "检查上传时是否自动删除位置信息,按需要保护照片拍摄地点。"
+ },
+ "system": {
+ "title": "系统设置",
+ "description": "配置文件上传、重复检查和第三方登录。此页的“重置所有引导”可以重新开启各页面引导。"
+ },
+ "home": {
+ "title": "欢迎来到站点首页",
+ "description": "这是访客浏览照片的首页,可以筛选、排序和打开照片详情,也可以浏览相册和地图。"
+ },
+ "login": {
+ "title": "之后如何登录",
+ "description": "退出登录后,使用首页顶部的登录按钮进入登录页面,也可以直接访问 /signin。使用管理员账号登录后即可管理站点。"
+ },
+ "adminEntry": {
+ "title": "如何进入后台",
+ "description": "登录后,点击首页顶部的仪表盘按钮进入后台,也可以直接访问 /dashboard。后台账号菜单中的“查看图库”可返回首页。"
+ },
+ "queueDetails": {
+ "title": "查看处理进度",
+ "description": "点击这里进入任务队列,查看上传照片的处理进度和失败任务,并重试需要处理的任务。"
+ },
+ "shareSite": {
+ "title": "分享站点",
+ "description": "點擊這裡,向社群分享你剛建立好的 ChronoFrame 實例,讓更多人發現你的網站。"
+ },
+ "photoFilter": {
+ "title": "筛选照片类型",
+ "description": "在这里切换全部照片、实况照片和普通照片,快速找到需要管理的内容。"
+ },
+ "albumActions": {
+ "title": "管理已有相册",
+ "description": "使用这组按钮调整相册顺序、编辑相册信息或删除相册。编辑时可设置封面和访问保护。"
+ },
+ "avatar": {
+ "title": "设置站点头像",
+ "description": "在这里上传或更换站点头像,首页会使用该头像展示作者形象。"
+ },
+ "appearance": {
+ "title": "选择外观",
+ "description": "在这里选择浅色、深色或跟随系统主题。"
+ },
+ "saveSettings": {
+ "title": "保存设置",
+ "description": "修改设置后,点击对应板块的保存按钮使更改生效。没有修改时按钮会保持禁用。"
+ },
+ "storageAdd": {
+ "title": "添加存储方案",
+ "description": "点击这里添加本地、S3 或 OpenList 存储方案,填写对应路径和凭据后保存。"
+ },
+ "mapStyle": {
+ "title": "配置地图样式",
+ "description": "在这里填写当前地图服务商对应的样式地址,控制地图显示效果。"
+ },
+ "mapToken": {
+ "title": "配置地图令牌",
+ "description": "在这里填写所选地图服务商需要的访问令牌。令牌和样式需要与服务商匹配。"
+ },
+ "locationService": {
+ "title": "配置地点解析服务",
+ "description": "在这里设置 Nominatim 地址;也可在上方填写 Mapbox Token 使用 Mapbox 地点解析服务。"
+ },
+ "githubLogin": {
+ "title": "第三方登录",
+ "description": "在这里启用 GitHub 登录,启用后需要填写对应的 OAuth Client ID 和 Client Secret。"
+ },
+ "uploadLimit": {
+ "title": "上传大小限制",
+ "description": "在这里调整单个上传文件的大小上限,单位为 MB。"
+ },
+ "duplicateCheck": {
+ "title": "重复文件检查",
+ "description": "在这里开启上传重复检查,并在下方选择跳过、警告或阻止重复文件的处理方式。"
+ },
+ "resetTours": {
+ "title": "重新开启使用引导",
+ "description": "点击这里可以重置所有页面的引导记录;之后再次进入相应页面即可重新查看。"
+ },
+ "photoUpload": {
+ "title": "上傳照片",
+ "description": "點擊這個按鈕開啟上傳面板,選擇需要上傳的照片並開始上傳。"
+ },
+ "albumCreate": {
+ "title": "建立相簿",
+ "description": "點擊這個按鈕開啟新增相簿表單,填寫名稱和說明,儲存後即可建立相簿。"
+ },
+ "homeAvatar": {
+ "title": "網站頭像與登入入口",
+ "description": "這是網站頭像。登出後,點擊頭像即可進入登入頁面,也可以直接前往 /signin。"
+ },
+ "homeDashboard": {
+ "title": "進入儀表板",
+ "description": "使用管理員帳號登入後,點擊這個按鈕進入儀表板,管理照片、相簿和網站設定。"
+ },
+ "debugTitle": "使用引導狀態"
}
}
diff --git a/i18n/locales/zh-Hant-TW.json b/i18n/locales/zh-Hant-TW.json
index a1598b98..18286d83 100644
--- a/i18n/locales/zh-Hant-TW.json
+++ b/i18n/locales/zh-Hant-TW.json
@@ -1726,5 +1726,145 @@
"ogImage": "頁面 OG 圖",
"openOgImage": "開啟 OG 圖",
"ogImageError": "OG 圖載入失敗。"
+ },
+ "tours": {
+ "controlsTitle": "使用引导",
+ "reset": "重置所有引导",
+ "resetHelp": "重置后,再次进入相应页面时将重新展示管理员引导。",
+ "saveError": "引导状态保存失败,请重试",
+ "next": "下一步",
+ "previous": "上一步",
+ "done": "完成",
+ "skip": "跳过引导",
+ "status": {
+ "pending": "待引导",
+ "completed": "已完成",
+ "skipped": "已跳过"
+ },
+ "dashboard": {
+ "title": "照片统计",
+ "description": "这里显示照片总数,点击这张卡片可进入照片管理。旁边还可以查看本月新增照片和存储使用情况。"
+ },
+ "photos": {
+ "title": "照片管理",
+ "description": "上传照片、编辑信息和调整可见性。上传后可以在任务队列查看处理进度。"
+ },
+ "albums": {
+ "title": "相册管理",
+ "description": "点击这里创建相册,填写名称和说明,并选择封面及访问保护。创建后可以添加照片。"
+ },
+ "general": {
+ "title": "站点基本设置",
+ "description": "在这里修改站点标题,首页和浏览器标签页会使用这个名称。修改后点击本板块的保存设置。"
+ },
+ "storage": {
+ "title": "存储设置",
+ "description": "在这里选择默认存储方案,新上传的照片会使用该方案。修改后记得保存。"
+ },
+ "map": {
+ "title": "地图配置",
+ "description": "在这里选择 Mapbox 或 MapLibre。下方会显示所选服务商对应的地图样式和令牌设置。"
+ },
+ "location": {
+ "title": "地点解析",
+ "description": "在这里选择照片地点名称解析时使用的语言,地图显示和地点解析可以分别配置。"
+ },
+ "privacy": {
+ "title": "隐私设置",
+ "description": "检查上传时是否自动删除位置信息,按需要保护照片拍摄地点。"
+ },
+ "system": {
+ "title": "系统设置",
+ "description": "配置文件上传、重复检查和第三方登录。此页的“重置所有引导”可以重新开启各页面引导。"
+ },
+ "home": {
+ "title": "欢迎来到站点首页",
+ "description": "这是访客浏览照片的首页,可以筛选、排序和打开照片详情,也可以浏览相册和地图。"
+ },
+ "login": {
+ "title": "之后如何登录",
+ "description": "退出登录后,使用首页顶部的登录按钮进入登录页面,也可以直接访问 /signin。使用管理员账号登录后即可管理站点。"
+ },
+ "adminEntry": {
+ "title": "如何进入后台",
+ "description": "登录后,点击首页顶部的仪表盘按钮进入后台,也可以直接访问 /dashboard。后台账号菜单中的“查看图库”可返回首页。"
+ },
+ "queueDetails": {
+ "title": "查看处理进度",
+ "description": "点击这里进入任务队列,查看上传照片的处理进度和失败任务,并重试需要处理的任务。"
+ },
+ "shareSite": {
+ "title": "分享站点",
+ "description": "點擊這裡,向社群分享你剛架設好的 ChronoFrame 實例,讓更多人發現你的網站。"
+ },
+ "photoFilter": {
+ "title": "筛选照片类型",
+ "description": "在这里切换全部照片、实况照片和普通照片,快速找到需要管理的内容。"
+ },
+ "albumActions": {
+ "title": "管理已有相册",
+ "description": "使用这组按钮调整相册顺序、编辑相册信息或删除相册。编辑时可设置封面和访问保护。"
+ },
+ "avatar": {
+ "title": "设置站点头像",
+ "description": "在这里上传或更换站点头像,首页会使用该头像展示作者形象。"
+ },
+ "appearance": {
+ "title": "选择外观",
+ "description": "在这里选择浅色、深色或跟随系统主题。"
+ },
+ "saveSettings": {
+ "title": "保存设置",
+ "description": "修改设置后,点击对应板块的保存按钮使更改生效。没有修改时按钮会保持禁用。"
+ },
+ "storageAdd": {
+ "title": "添加存储方案",
+ "description": "点击这里添加本地、S3 或 OpenList 存储方案,填写对应路径和凭据后保存。"
+ },
+ "mapStyle": {
+ "title": "配置地图样式",
+ "description": "在这里填写当前地图服务商对应的样式地址,控制地图显示效果。"
+ },
+ "mapToken": {
+ "title": "配置地图令牌",
+ "description": "在这里填写所选地图服务商需要的访问令牌。令牌和样式需要与服务商匹配。"
+ },
+ "locationService": {
+ "title": "配置地点解析服务",
+ "description": "在这里设置 Nominatim 地址;也可在上方填写 Mapbox Token 使用 Mapbox 地点解析服务。"
+ },
+ "githubLogin": {
+ "title": "第三方登录",
+ "description": "在这里启用 GitHub 登录,启用后需要填写对应的 OAuth Client ID 和 Client Secret。"
+ },
+ "uploadLimit": {
+ "title": "上传大小限制",
+ "description": "在这里调整单个上传文件的大小上限,单位为 MB。"
+ },
+ "duplicateCheck": {
+ "title": "重复文件检查",
+ "description": "在这里开启上传重复检查,并在下方选择跳过、警告或阻止重复文件的处理方式。"
+ },
+ "resetTours": {
+ "title": "重新开启使用引导",
+ "description": "点击这里可以重置所有页面的引导记录;之后再次进入相应页面即可重新查看。"
+ },
+ "photoUpload": {
+ "title": "上傳照片",
+ "description": "點擊這個按鈕開啟上傳面板,選擇需要上傳的照片並開始上傳。"
+ },
+ "albumCreate": {
+ "title": "建立相簿",
+ "description": "點擊這個按鈕開啟新增相簿表單,填寫名稱和說明,儲存後即可建立相簿。"
+ },
+ "homeAvatar": {
+ "title": "網站頭像與登入入口",
+ "description": "這是網站頭像。登出後,點擊頭像即可進入登入頁面,也可以直接前往 /signin。"
+ },
+ "homeDashboard": {
+ "title": "進入儀表板",
+ "description": "使用管理員帳號登入後,點擊這個按鈕進入儀表板,管理照片、相簿和網站設定。"
+ },
+ "debugTitle": "使用引導狀態"
}
}
diff --git a/package.json b/package.json
index 1a47c81d..30cb9660 100644
--- a/package.json
+++ b/package.json
@@ -53,6 +53,7 @@
"@yeger/vue-masonry-wall": "^6.1.1",
"better-sqlite3": "^12.10.0",
"dayjs-nuxt": "2.1.11",
+ "driver.js": "^1.9.0",
"drizzle-orm": "^0.45.2",
"es-toolkit": "^1.47.0",
"exiftool-vendored": "^35.21.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f539600c..669a95a7 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -28,19 +28,19 @@ importers:
'@nuxt/fonts':
specifier: 0.14.0
'@nuxt/icon':
specifier: 2.2.3
'@nuxt/ui':
specifier: ^4.8.2
'@nuxtjs/i18n':
specifier: 10.4.0
'@pinia/nuxt':
specifier: ^0.11.3
'@tailwindcss/vite':
specifier: ^4.3.0
@@ -55,7 +55,7 @@ importers:
version: 0.2.5
'@vueuse/nuxt':
specifier: 14.3.0
- version: 14.3.0([email protected])([email protected](c4ffce57c321c76bf53190f027bd9da9))([email protected]([email protected]))
+ version: 14.3.0([email protected])([email protected](a1419678de6750cd7c5d1a69f73984ab))([email protected]([email protected]))
'@yeger/vue-masonry-wall':
specifier: ^6.1.1
@@ -64,7 +64,10 @@ importers:
version: 12.10.0
dayjs-nuxt:
specifier: 2.1.11
- version: 2.1.11([email protected])
+ version: 2.1.11([email protected])
+ driver.js:
+ specifier: ^1.9.0
+ version: 1.9.0
drizzle-orm:
specifier: ^0.45.2
version: 0.45.2(@cloudflare/[email protected])(@opentelemetry/[email protected])(@types/[email protected])([email protected])
@@ -88,22 +91,22 @@ importers:
nuxt:
specifier: ^4.4.8
- version: 4.4.8(c4ffce57c321c76bf53190f027bd9da9)
+ version: 4.4.8(a1419678de6750cd7c5d1a69f73984ab)
nuxt-auth-utils:
specifier: 0.5.29
- version: 0.5.29([email protected])
+ version: 0.5.29([email protected])
nuxt-gtag:
specifier: 4.1.0
- version: 4.1.0([email protected])
+ version: 4.1.0([email protected])
nuxt-mapbox:
specifier: 1.6.4
nuxt-maplibre:
specifier: ^1.2.2
nuxt-og-image:
specifier: 6.7.2
- version: 6.7.2(fdac1661a613fba480a7cbbe900485ed)
+ version: 6.7.2(40950f6f454047c8e682e0ebc1accde2)
pinia:
specifier: ^3.0.4
@@ -176,7 +179,7 @@ importers:
version: 1.2.35
'@nuxt/test-utils':
specifier: 4.0.3
'@types/better-sqlite3':
specifier: ^7.6.13
version: 7.6.13
@@ -5134,6 +5137,9 @@ packages:
resolution: {integrity: sha512-kCKF62fwtzwYm0IGBNjRUjtJgMfGapII+FslMHIjMR5KTnwEmBmWLDRSnc3XSNP8bNy34tekgQyDT0hr7pERRQ==}
engines: {node: '>=12'}
+ resolution: {integrity: sha512-+YWVdNVUrY1/2spszQshohWYY4soIjNBnMFS6lfmousT8igos2lmswhlqyuuNMhr+qbV0EjJ+L6i2FECPr6Ygg==}
+
resolution: {integrity: sha512-7OZcmQUrdGI+DUNNsKBn1aW8qSoKuTH7d0mYgSP8bAzdFzKoovxEFnoGQp2dVs82EOJeYycqRtciopszwUf8bw==}
hasBin: true
@@ -5407,7 +5413,6 @@ packages:
resolution: {integrity: sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
- deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options.
hasBin: true
peerDependencies:
jiti: '*'
@@ -9318,10 +9323,10 @@ snapshots:
'@drizzle-team/[email protected]': {}
dependencies:
'@dxup/unimport': 0.1.2
- '@nuxt/kit': 4.4.8([email protected])
+ '@nuxt/kit': 4.4.8([email protected])
chokidar: 5.0.0
pathe: 2.0.3
tinyglobby: 0.2.17
@@ -10254,11 +10259,11 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.19.1
dependencies:
'@bomb.sh/tab': 0.0.15([email protected])([email protected])
'@clack/prompts': 1.4.0
- c12: 3.3.4([email protected])
+ c12: 3.3.4([email protected])
citty: 0.2.2
confbox: 0.2.4
consola: 3.4.2
@@ -10302,9 +10307,9 @@ snapshots:
transitivePeerDependencies:
- magicast
dependencies:
- '@nuxt/kit': 3.21.2([email protected])
+ '@nuxt/kit': 3.21.2([email protected])
execa: 8.0.1
transitivePeerDependencies:
@@ -10318,6 +10323,14 @@ snapshots:
transitivePeerDependencies:
- magicast
+ dependencies:
+ '@nuxt/kit': 4.4.6([email protected])
+ execa: 8.0.1
+ transitivePeerDependencies:
+ - magicast
+
dependencies:
'@nuxt/kit': 4.4.8([email protected])
@@ -10420,7 +10433,7 @@ snapshots:
structured-clone-es: 2.0.0
tinyglobby: 0.2.17
which: 6.0.1
ws: 8.20.0
@@ -10430,10 +10443,10 @@ snapshots:
- utf-8-validate
- vue
dependencies:
- '@nuxt/kit': 4.4.2([email protected])
+ '@nuxt/kit': 4.4.2([email protected])
consola: 3.4.2
defu: 6.1.4
@@ -10470,14 +10483,14 @@ snapshots:
- uploadthing
- vite
dependencies:
'@iconify/collections': 1.0.694
'@iconify/types': 2.0.0
'@iconify/utils': 3.1.3
'@iconify/vue': 5.0.1([email protected]([email protected]))
- '@nuxt/kit': 4.4.6([email protected])
+ '@nuxt/kit': 4.4.6([email protected])
consola: 3.4.2
local-pkg: 1.2.1
mlly: 1.8.2
@@ -10491,9 +10504,9 @@ snapshots:
- vite
- vue
dependencies:
- c12: 3.3.4([email protected])
+ c12: 3.3.4([email protected])
consola: 3.4.2
defu: 6.1.7
destr: 2.0.5
@@ -10545,9 +10558,9 @@ snapshots:
transitivePeerDependencies:
- magicast
dependencies:
- c12: 3.3.4([email protected])
+ c12: 3.3.4([email protected])
consola: 3.4.2
defu: 6.1.7
destr: 2.0.5
@@ -10571,9 +10584,9 @@ snapshots:
transitivePeerDependencies:
- magicast
dependencies:
- c12: 3.3.4([email protected])
+ c12: 3.3.4([email protected])
consola: 3.4.2
defu: 6.1.7
destr: 2.0.5
@@ -10598,9 +10611,9 @@ snapshots:
transitivePeerDependencies:
- magicast
dependencies:
- c12: 3.3.4([email protected])
+ c12: 3.3.4([email protected])
consola: 3.4.2
defu: 6.1.7
destr: 2.0.5
@@ -10623,9 +10636,9 @@ snapshots:
transitivePeerDependencies:
- magicast
dependencies:
- c12: 3.3.4([email protected])
+ c12: 3.3.4([email protected])
consola: 3.4.2
defu: 6.1.7
destr: 2.0.5
@@ -10673,6 +10686,31 @@ snapshots:
transitivePeerDependencies:
- magicast
+ dependencies:
+ c12: 3.3.4([email protected])
+ consola: 3.4.2
+ defu: 6.1.7
+ destr: 2.0.5
+ errx: 0.1.0
+ exsolve: 1.0.8
+ ignore: 7.0.5
+ jiti: 2.7.0
+ klona: 2.0.6
+ mlly: 1.8.2
+ ohash: 2.0.11
+ pathe: 2.0.3
+ pkg-types: 2.3.1
+ rc9: 3.0.1
+ scule: 1.3.0
+ semver: 7.8.0
+ tinyglobby: 0.2.17
+ ufo: 1.6.4
+ unctx: 2.5.0
+ untyped: 2.0.0
+ transitivePeerDependencies:
+ - magicast
+
dependencies:
c12: 3.3.4([email protected])
@@ -10723,10 +10761,10 @@ snapshots:
transitivePeerDependencies:
- magicast
dependencies:
'@nuxt/devalue': 2.0.2
- '@nuxt/kit': 4.4.8([email protected])
+ '@nuxt/kit': 4.4.8([email protected])
'@unhead/vue': 2.1.15([email protected]([email protected]))
'@vue/shared': 3.5.35
consola: 3.4.2
@@ -10741,7 +10779,7 @@ snapshots:
klona: 2.0.6
mocked-exports: 0.1.1
- nuxt: 4.4.8(c4ffce57c321c76bf53190f027bd9da9)
+ nuxt: 4.4.8(a1419678de6750cd7c5d1a69f73984ab)
nypm: 0.6.6
ohash: 2.0.11
pathe: 2.0.3
@@ -10799,21 +10837,21 @@ snapshots:
pkg-types: 2.3.1
std-env: 4.1.0
dependencies:
- '@nuxt/kit': 4.4.8([email protected])
+ '@nuxt/kit': 4.4.8([email protected])
citty: 0.2.2
consola: 3.4.2
ofetch: 2.0.0-alpha.3
rc9: 3.0.1
std-env: 4.1.0
dependencies:
'@clack/prompts': 1.2.0
- '@nuxt/kit': 3.21.2([email protected])
- c12: 3.3.4([email protected])
+ '@nuxt/kit': 3.21.2([email protected])
+ c12: 3.3.4([email protected])
consola: 3.4.2
defu: 6.1.7
destr: 2.0.5
@@ -10837,7 +10875,7 @@ snapshots:
tinyexec: 1.1.1
ufo: 1.6.3
unplugin: 3.0.0
vue: 3.5.35([email protected])
optionalDependencies:
playwright-core: 1.59.1
@@ -10847,15 +10885,15 @@ snapshots:
- typescript
- vite
dependencies:
'@floating-ui/dom': 1.7.6
'@iconify/vue': 5.0.1([email protected]([email protected]))
- '@nuxt/kit': 4.4.8([email protected])
+ '@nuxt/kit': 4.4.8([email protected])
'@nuxt/schema': 4.4.8
- '@nuxtjs/color-mode': 3.5.2([email protected])
+ '@nuxtjs/color-mode': 3.5.2([email protected])
'@standard-schema/spec': 1.1.0
'@tailwindcss/postcss': 4.3.0
@@ -10909,8 +10947,8 @@ snapshots:
typescript: 5.9.3
ufo: 1.6.4
unplugin: 3.0.0
vue-component-type-helpers: 3.3.4
optionalDependencies:
@@ -10961,9 +10999,9 @@ snapshots:
- vue
- yjs
dependencies:
- '@nuxt/kit': 4.4.8([email protected])
+ '@nuxt/kit': 4.4.8([email protected])
'@rollup/plugin-replace': 6.0.3([email protected])
@@ -10979,7 +11017,7 @@ snapshots:
magic-string: 0.30.21
mlly: 1.8.2
mocked-exports: 0.1.1
- nuxt: 4.4.8(c4ffce57c321c76bf53190f027bd9da9)
+ nuxt: 4.4.8(a1419678de6750cd7c5d1a69f73984ab)
nypm: 0.6.6
pathe: 2.0.3
pkg-types: 2.3.1
@@ -11019,16 +11057,16 @@ snapshots:
- vue-tsc
- yaml
dependencies:
- '@nuxt/kit': 3.21.2([email protected])
+ '@nuxt/kit': 3.21.2([email protected])
pathe: 1.1.2
pkg-types: 1.3.1
semver: 7.8.0
transitivePeerDependencies:
- magicast
dependencies:
'@intlify/core': 11.4.5
'@intlify/h3': 0.7.4
@@ -11036,7 +11074,7 @@ snapshots:
'@intlify/utils': 0.14.1
'@miyaneee/rollup-plugin-json5': 1.2.0([email protected])
- '@nuxt/kit': 4.4.6([email protected])
+ '@nuxt/kit': 4.4.6([email protected])
'@rollup/plugin-yaml': 4.1.2([email protected])
'@vue/compiler-sfc': 3.5.34
defu: 6.1.7
@@ -11664,9 +11702,9 @@ snapshots:
'@photostructure/[email protected]': {}
dependencies:
- '@nuxt/kit': 4.4.2([email protected])
+ '@nuxt/kit': 4.4.2([email protected])
transitivePeerDependencies:
- magicast
@@ -12990,13 +13028,13 @@ snapshots:
'@vueuse/[email protected]': {}
dependencies:
- '@nuxt/kit': 4.4.4([email protected])
+ '@nuxt/kit': 4.4.4([email protected])
'@vueuse/core': 14.3.0([email protected]([email protected]))
'@vueuse/metadata': 14.3.0
local-pkg: 1.1.2
- nuxt: 4.4.8(c4ffce57c321c76bf53190f027bd9da9)
+ nuxt: 4.4.8(a1419678de6750cd7c5d1a69f73984ab)
vue: 3.5.35([email protected])
transitivePeerDependencies:
- magicast
@@ -13566,9 +13604,9 @@ snapshots:
dependencies:
- '@nuxt/kit': 3.19.3([email protected])
+ '@nuxt/kit': 3.19.3([email protected])
dayjs: 1.11.21
transitivePeerDependencies:
- magicast
@@ -13664,6 +13702,8 @@ snapshots:
+
dependencies:
'@drizzle-team/brocli': 0.10.2
@@ -15443,10 +15483,10 @@ snapshots:
dependencies:
boolbase: 1.0.0
dependencies:
'@adonisjs/hash': 9.1.1
- '@nuxt/kit': 4.4.2([email protected])
+ '@nuxt/kit': 4.4.2([email protected])
defu: 6.1.4
h3: 1.15.4
hookable: 6.1.0
@@ -15463,20 +15503,20 @@ snapshots:
dependencies:
- '@nuxt/kit': 4.1.3([email protected])
+ '@nuxt/kit': 4.1.3([email protected])
defu: 6.1.4
pathe: 2.0.3
ufo: 1.6.1
transitivePeerDependencies:
- magicast
dependencies:
'@mapbox/mapbox-gl-geocoder': 5.1.2
- '@nuxt/kit': 4.1.3([email protected])
+ '@nuxt/kit': 4.1.3([email protected])
'@types/mapbox__mapbox-gl-geocoder': 5.1.0
'@vueuse/core': 13.9.0([email protected]([email protected]))
defu: 6.1.4
@@ -15497,7 +15537,7 @@ snapshots:
transitivePeerDependencies:
- vue
- [email protected](fdac1661a613fba480a7cbbe900485ed):
+ [email protected](40950f6f454047c8e682e0ebc1accde2):
dependencies:
'@clack/prompts': 1.7.0
'@nuxt/kit': 4.4.8([email protected])
@@ -15515,8 +15555,8 @@ snapshots:
magic-string: 0.30.21
magicast: 0.5.3
mocked-exports: 0.1.1
nypm: 0.6.8
ofetch: 1.5.1
ohash: 2.0.11
@@ -15569,13 +15609,13 @@ snapshots:
- magicast
- vue
dependencies:
'@nuxt/devalue': 2.0.2
'@nuxt/kit': 4.4.8([email protected])
h3: 1.15.11
pathe: 2.0.3
pkg-types: 2.3.1
site-config-stack: 4.1.1([email protected]([email protected]))
@@ -15588,16 +15628,16 @@ snapshots:
- vue
- zod
- [email protected](c4ffce57c321c76bf53190f027bd9da9):
+ [email protected](a1419678de6750cd7c5d1a69f73984ab):
dependencies:
- '@dxup/nuxt': 0.4.1([email protected])([email protected])
+ '@dxup/nuxt': 0.4.1([email protected])([email protected])
- '@nuxt/kit': 4.4.8([email protected])
+ '@nuxt/kit': 4.4.8([email protected])
'@nuxt/schema': 4.4.8
- '@nuxt/telemetry': 2.8.0(@nuxt/[email protected]([email protected]))
+ '@nuxt/telemetry': 2.8.0(@nuxt/[email protected]([email protected]))
'@unhead/vue': 2.1.15([email protected]([email protected]))
'@vue/shared': 3.5.35
chokidar: 5.0.0
@@ -15715,7 +15755,7 @@ snapshots:
- xml2js
- yaml
dependencies:
'@clack/prompts': 1.7.0
@@ -15724,7 +15764,7 @@ snapshots:
birpc: 4.0.0
consola: 3.4.2
defu: 6.1.7
- nuxt: 4.4.8(c4ffce57c321c76bf53190f027bd9da9)
+ nuxt: 4.4.8(a1419678de6750cd7c5d1a69f73984ab)
nypm: 0.6.8
ofetch: 1.5.1
pathe: 2.0.3
@@ -15735,7 +15775,7 @@ snapshots:
ufo: 1.6.4
vue: 3.5.35([email protected])
optionalDependencies:
zod: 4.4.3
transitivePeerDependencies:
- magicast
@@ -17367,7 +17407,7 @@ snapshots:
dependencies:
local-pkg: 1.1.2
magic-string: 0.30.21
@@ -17376,7 +17416,7 @@ snapshots:
unplugin: 2.3.11
unplugin-utils: 0.3.1
optionalDependencies:
- '@nuxt/kit': 4.4.8([email protected])
+ '@nuxt/kit': 4.4.8([email protected])
'@vueuse/core': 14.3.0([email protected]([email protected]))
@@ -17384,7 +17424,7 @@ snapshots:
pathe: 2.0.3
picomatch: 4.0.4
dependencies:
chokidar: 5.0.0
local-pkg: 1.2.1
@@ -17397,7 +17437,7 @@ snapshots:
unplugin-utils: 0.3.1
vue: 3.5.35([email protected])
optionalDependencies:
- '@nuxt/kit': 4.4.8([email protected])
+ '@nuxt/kit': 4.4.8([email protected])
dependencies:
@@ -17586,7 +17626,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
ansis: 4.2.0
debug: 4.4.3
@@ -17599,7 +17639,7 @@ snapshots:
optionalDependencies:
- '@nuxt/kit': 4.4.8([email protected])
+ '@nuxt/kit': 4.4.8([email protected])
transitivePeerDependencies:
- supports-color
@@ -17710,9 +17750,9 @@ snapshots:
- universal-cookie
- yaml
dependencies:
transitivePeerDependencies:
- '@cucumber/cucumber'
- '@jest/globals'
diff --git a/server/api/system/tours.ts b/server/api/system/tours.ts
new file mode 100644
index 00000000..b9a99c92
--- /dev/null
+++ b/server/api/system/tours.ts
@@ -0,0 +1,40 @@
+import { z } from 'zod'
+import { tourIds } from '~~/shared/types/tours'
+import { settingsManager } from '~~/server/services/settings/settingsManager'
+export default eventHandler(async (event) => {
+ const session = await requireUserSession(event)
+ if (!session.user.isAdmin)
+ throw createError({
+ statusCode: 403,
+ statusMessage: 'Admin privileges required',
+ })
+ if (event.method === 'PUT') {
+ const body = await readValidatedBody(
+ event,
+ z.discriminatedUnion('action', [
+ z.object({ action: z.literal('reset') }),
+ z.object({
+ action: z.literal('set'),
+ id: z.enum(tourIds),
+ status: z.enum(['pending', 'completed', 'skipped']),
+ }),
+ ]).parse,
+ )
+ for (const id of body.action === 'reset' ? tourIds : [body.id])
+ await settingsManager.set(
+ 'system',
+ `tour.${id}`,
+ body.action === 'reset' ? 'pending' : body.status,
+ undefined,
+ true,
+ )
+ } else if (event.method !== 'GET') throw createError({ statusCode: 405 })
+ return Object.fromEntries(
+ await Promise.all(
+ tourIds.map(async (id) => [
+ id,
+ await settingsManager.get('system', `tour.${id}`, 'pending'),
+ ]),
+ ),
+ )
+})
diff --git a/server/services/settings/contants.ts b/server/services/settings/contants.ts
index e3848095..c2439b6a 100644
--- a/server/services/settings/contants.ts
+++ b/server/services/settings/contants.ts
@@ -1,3 +1,4 @@
+import { tourIds } from '~~/shared/types/tours'
import type { SettingConfig } from '~~/shared/types/settings'
import i18nOptions from '~~/i18n/i18n.options'
@@ -6,6 +7,15 @@ export const STORAGE_PROVIDERS = ['local', 's3', 'openlist'] as const
export type StorageProvider = (typeof STORAGE_PROVIDERS)[number]
export const DEFAULT_SETTINGS = [
+ ...tourIds.map((id) => ({
+ namespace: 'system' as const,
+ key: `tour.${id}` as const,
+ type: 'string' as const,
+ defaultValue: 'pending',
+ enum: ['pending', 'completed', 'skipped'],
+ hidden: true,
+ isReadonly: true,
+ })),
// NAMESPACE: system
{
namespace: 'system',
diff --git a/shared/types/tours.ts b/shared/types/tours.ts
new file mode 100644
index 00000000..07656455
--- /dev/null
+++ b/shared/types/tours.ts
@@ -0,0 +1,14 @@
+export const tourIds = [
+ 'dashboard',
+ 'photos',
+ 'albums',
+ 'general',
+ 'storage',
+ 'map',
+ 'privacy',
+ 'system',
+ 'home',
+] as const
+export type TourId = (typeof tourIds)[number]
+export type TourStatus = 'pending' | 'completed' | 'skipped'
+export type TourRecords = Record<TourId, TourStatus>