feat: add hub
This commit is contained in:
@@ -50,5 +50,8 @@ export default defineAppConfig({
|
||||
{ activity: 'Duschen', minDays: 2 },
|
||||
{ activity: 'Kochen', stay: 'Camping' }
|
||||
] as { activity: string, minDays?: number, stay?: string }[]
|
||||
},
|
||||
hub: {
|
||||
packer: { title: 'Packliste', icon: 'i-lucide-backpack', to: '/packer' }
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
useHead({ title: 'Packer', htmlAttrs: { lang: 'de' } })
|
||||
useHead({ title: 'Packliste' })
|
||||
|
||||
const { settings, changed: settingsChanged, reset: resetSettings } = usePackerSettings()
|
||||
const { state, checked, changed: sessionChanged, toggle, add, remove, setWeight, reset: resetSession } = usePackerSession()
|
||||
@@ -34,8 +34,8 @@ const summary = computed(() => [
|
||||
...(weighed.value.length ? [`${unweighed.value ? '≥ ' : ''}${packerWeight(weight.value)}`] : [])
|
||||
].join(' · '))
|
||||
|
||||
// The PDF is named after the trip, e.g. "packer_3_tage"
|
||||
const { savePdf } = usePdfExport(() => `packer_${settings.days}_${settings.days === 1 ? 'tag' : 'tage'}`)
|
||||
// The PDF is named after the trip, e.g. "packliste_3_tage"
|
||||
const { savePdf } = usePdfExport(() => `packliste_${settings.days}_${settings.days === 1 ? 'tag' : 'tage'}`)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -44,7 +44,7 @@ const { savePdf } = usePdfExport(() => `packer_${settings.days}_${settings.days
|
||||
<div class="mb-6 flex items-center gap-3">
|
||||
<div class="me-auto">
|
||||
<h1 class="text-2xl font-semibold text-highlighted">
|
||||
Packer
|
||||
Packliste
|
||||
</h1>
|
||||
<p class="mt-1 hidden text-sm text-muted print:block">
|
||||
{{ summary }}
|
||||
@@ -61,6 +61,7 @@ const { savePdf } = usePdfExport(() => `packer_${settings.days}_${settings.days
|
||||
class="print:hidden"
|
||||
@click="reset"
|
||||
/>
|
||||
<AppHeaderActions />
|
||||
</div>
|
||||
|
||||
<PackerSettingsBar
|
||||
|
||||
@@ -25,7 +25,7 @@ interface PackerField {
|
||||
export function packerTable(event: H3Event): string {
|
||||
const { baserowPackerTableId } = useRuntimeConfig(event)
|
||||
if (!baserowPackerTableId) {
|
||||
throw createError({ statusCode: 500, statusMessage: 'NUXT_BASEROW_PACKER_TABLE_ID is not set' })
|
||||
throw createError({ statusCode: 500, statusMessage: 'NUXT_BASEROW_PACKER_TABLE_ID ist nicht gesetzt' })
|
||||
}
|
||||
return baserowPackerTableId
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user