ENH - add development setup skip

Add a development-only setup assistant control that skips the wizard for the current frontend session without persisting setup completion or changing backend state. Localize the control through the phone locale fallback and resource locale.
This commit is contained in:
Type
2026-08-16 00:33:39 +02:00
parent 96cffcf4d1
commit 252aba03be
4 changed files with 49 additions and 5 deletions
@@ -30,7 +30,7 @@ import {
type WallpaperId,
} from '@/utils/preferences'
const emit = defineEmits<{ complete: [] }>()
const emit = defineEmits<{ complete: []; skip: [] }>()
const phone = usePhoneStore()
const account = useAccountStore()
@@ -86,6 +86,7 @@ const passwordStrength = computed(() => {
const currentWallpaperStyle = computed(() => ({
'--setup-wallpaper': `var(--phone-wallpaper-${phone.preferences.settings.wallpaper})`,
}))
const showDevelopmentSkip = import.meta.env.DEV
function moveTo(nextStep: number): void {
direction.value = nextStep < step.value ? 'back' : 'forward'
@@ -207,6 +208,10 @@ function finish(): void {
phone.completeSetup()
emit('complete')
}
function skipSetupForDevelopment(): void {
emit('skip')
}
</script>
<template>
@@ -217,6 +222,14 @@ function finish(): void {
:aria-label="phone.t('Setup.title')"
>
<div class="setup-assistant__aurora" aria-hidden="true"></div>
<button
v-if="showDevelopmentSkip"
type="button"
class="setup-assistant__development-skip"
@click="skipSetupForDevelopment"
>
{{ phone.t('Setup.development.skip') }}
</button>
<header v-if="step > 0 && step < 9" class="setup-assistant__chrome">
<button
type="button"
@@ -841,6 +854,24 @@ function finish(): void {
filter: blur(28px);
animation: setup-aurora 12s ease-in-out infinite alternate;
}
.setup-assistant__development-skip {
position: absolute;
z-index: 3;
top: 20px;
right: 18px;
min-height: 44px;
padding: 0 12px;
border: 1px solid rgb(255 255 255 / 16%);
border-radius: 12px;
color: rgb(255 255 255 / 82%);
background: rgb(10 16 31 / 72%);
font-size: 11px;
font-weight: 700;
}
.setup-assistant__development-skip:focus-visible {
outline: 2px solid #72b5ff;
outline-offset: 2px;
}
.setup-assistant__chrome {
position: absolute;
z-index: 2;