- auth.rs now infers onboarding-complete from setup_complete + password_hash so nodes stop bouncing users through the intro wizard after browser clear / update / reboot; the flag self-heals to disk on next check - frontend: "backend uncertain" no longer defaults to /onboarding/intro — useOnboarding returns null + callers poll / retry instead of flashing the wizard - login sounds (synthwave, welcome voice, pop, whoosh, oomph) gated by isFirstInstallPhase(); typing sounds unaffected - removed FIPS app, Nostr Relay, Nostr VPN, Routstr, Penpot from catalog, frontend config, Rust AppMetadata + install dispatch + install_penpot_stack; docker/fips-ui + docker/nostr-vpn-ui + apps/penpot dirs and 5 icons deleted; 15 image versions deleted from tx1138, .168, gitea-local registries (.160 Gitea was 502 at release time — follow-up) - AIUI baked into frontend release tarball via demo/aiui/; deploy-to-target falls back to demo/aiui/ when the AIUI sibling checkout is missing - prebuild hook syncs app-catalog/catalog.json → public/catalog.json so the two copies can no longer drift (was the source of the "apps still visible" bug — public/ had stale data) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
111 lines
4.0 KiB
Vue
111 lines
4.0 KiB
Vue
<template>
|
|
<div
|
|
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 mb-8 transition-opacity duration-300"
|
|
:class="{ 'opacity-0 pointer-events-none': !show }"
|
|
>
|
|
<RouterLink
|
|
v-for="(goal, idx) in goals"
|
|
:key="goal.id"
|
|
:to="`/dashboard/goals/${goal.id}`"
|
|
class="goal-card glass-card p-6 block"
|
|
:class="{ 'home-card-animate': animate }"
|
|
:style="{ '--card-stagger': idx }"
|
|
>
|
|
<div class="flex items-start justify-between mb-4">
|
|
<!-- App icons for goals with required apps, emoji fallback otherwise -->
|
|
<div v-if="goalAppIcons(goal).length > 0" class="flex items-center gap-1.5 shrink-0">
|
|
<img
|
|
v-for="icon in goalAppIcons(goal)"
|
|
:key="icon.appId"
|
|
:src="icon.url"
|
|
:alt="icon.appId"
|
|
class="w-8 h-8 rounded-lg object-contain bg-white/5 border border-white/10 p-0.5"
|
|
@error="($event.target as HTMLImageElement).style.display = 'none'"
|
|
/>
|
|
</div>
|
|
<div v-else class="w-10 h-10 rounded-xl bg-white/10 flex items-center justify-center shrink-0">
|
|
<span class="text-xl">{{ goalIcon(goal.icon) }}</span>
|
|
</div>
|
|
<span class="goal-status-badge" :class="statusBadgeClass(goal.id)">
|
|
<span v-if="goalStatuses[goal.id] === 'completed'" class="w-1.5 h-1.5 rounded-full bg-green-400"></span>
|
|
<span v-else-if="goalStatuses[goal.id] === 'in-progress'" class="w-1.5 h-1.5 rounded-full bg-orange-400"></span>
|
|
{{ statusLabel(goal.id) }}
|
|
</span>
|
|
</div>
|
|
|
|
<h3 class="text-lg font-semibold text-white mb-1">{{ goal.title }}</h3>
|
|
<p class="text-sm text-white/55 mb-4 leading-relaxed">{{ goal.subtitle }}</p>
|
|
|
|
<div class="flex items-center justify-between">
|
|
<span class="text-xs text-white/40">{{ goal.estimatedTime }}</span>
|
|
<span class="text-xs text-white/50 flex items-center gap-1">
|
|
{{ goal.difficulty === 'beginner' ? t('easyHome.beginner') : t('easyHome.intermediate') }}
|
|
</span>
|
|
</div>
|
|
</RouterLink>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { RouterLink } from 'vue-router'
|
|
import { useI18n } from 'vue-i18n'
|
|
import { GOALS } from '@/data/goals'
|
|
import { useGoalStore } from '@/stores/goals'
|
|
import type { GoalDefinition } from '@/types/goals'
|
|
|
|
defineProps<{
|
|
show: boolean
|
|
animate: boolean
|
|
}>()
|
|
|
|
const { t } = useI18n()
|
|
const goalStore = useGoalStore()
|
|
const goals = GOALS
|
|
const goalStatuses = goalStore.goalStatuses
|
|
|
|
/** Map appId to its icon file path under /assets/img/app-icons/ */
|
|
const APP_ICON_MAP: Record<string, string> = {
|
|
'bitcoin-knots': '/assets/img/app-icons/bitcoin-knots.webp',
|
|
lnd: '/assets/img/app-icons/lnd.svg',
|
|
'btcpay-server': '/assets/img/app-icons/btcpay-server.png',
|
|
filebrowser: '/assets/img/app-icons/file-browser.webp',
|
|
nextcloud: '/assets/img/app-icons/nextcloud.webp',
|
|
fedimint: '/assets/img/app-icons/fedimint.png',
|
|
mempool: '/assets/img/app-icons/mempool.webp',
|
|
electrs: '/assets/img/app-icons/electrs.svg',
|
|
}
|
|
|
|
function goalAppIcons(goal: GoalDefinition): { appId: string; url: string }[] {
|
|
return goal.requiredApps
|
|
.filter((appId) => APP_ICON_MAP[appId] !== undefined)
|
|
.map((appId) => ({ appId, url: APP_ICON_MAP[appId] as string }))
|
|
}
|
|
|
|
function goalIcon(icon: string): string {
|
|
const icons: Record<string, string> = {
|
|
shop: '🏪',
|
|
payments: '⚡',
|
|
photos: '📸',
|
|
files: '📁',
|
|
lightning: '⚡',
|
|
identity: '🔑',
|
|
backup: '💾',
|
|
}
|
|
return icons[icon] || '📦'
|
|
}
|
|
|
|
function statusLabel(goalId: string): string {
|
|
const status = goalStatuses[goalId]
|
|
if (status === 'completed') return t('easyHome.done')
|
|
if (status === 'in-progress') return t('easyHome.inProgress')
|
|
return t('easyHome.start')
|
|
}
|
|
|
|
function statusBadgeClass(goalId: string): string {
|
|
const status = goalStatuses[goalId]
|
|
if (status === 'completed') return 'goal-status-badge-completed'
|
|
if (status === 'in-progress') return 'goal-status-badge-in-progress'
|
|
return 'goal-status-badge-not-started'
|
|
}
|
|
</script>
|