feat(dac-wizard): add mandatory checkboxes for steps 1 and 4

- Welcome step: checkbox to confirm understanding of system changes
- Backup step: checkbox to confirm backup was created
- Start/Next buttons disabled until checkboxes are checked
- Add translations for checkboxes (EN/ES/FR/DE)
This commit is contained in:
vicrodh committed 2026-02-03 02:07:05 -06:00
1 parent b20934b7c7
commit a5a2100a2a
5 files changed
+32 -6

No files matched your search

+20 -2
View File
@@ -77,7 +77,9 @@
let completedSteps = $state(new Set<WizardStep>());
let dacNodeName = $state('');
let selectedApps = $state(['QBZ']);
let welcomeConfirmed = $state(false);
let precheckDone = $state(false);
let backupConfirmed = $state(false);
let restartDone = $state(false);
let showRollback = $state(false);
let selectedDistro = $state('debian');
@@ -119,7 +121,9 @@
completedSteps = new Set();
dacNodeName = '';
selectedApps = ['QBZ'];
welcomeConfirmed = false;
precheckDone = false;
backupConfirmed = false;
restartDone = false;
showRollback = false;
dacCapabilities = null;
@@ -286,6 +290,11 @@
{#if currentStep === 'welcome'}
<div class="step-content">
<p class="body-text">{$t('dacWizard.welcome.body')}</p>
<label class="checkbox-row">
<input type="checkbox" bind:checked={welcomeConfirmed} />
<span>{$t('dacWizard.welcome.checkbox')}</span>
</label>
</div>
{:else if currentStep === 'precheck'}
@@ -450,6 +459,11 @@
/>
<WarningBanner variant="info" body={$t('dacWizard.backup.hint')} />
<label class="checkbox-row">
<input type="checkbox" bind:checked={backupConfirmed} />
<span>{$t('dacWizard.backup.checkbox')}</span>
</label>
</div>
{:else if currentStep === 'pipewire-config'}
@@ -560,7 +574,7 @@
<!-- Footer -->
<footer class="wizard-footer">
{#if currentStep === 'welcome'}
<button class="btn btn-primary" onclick={next}>
<button class="btn btn-primary" onclick={next} disabled={!welcomeConfirmed}>
{$t('dacWizard.welcome.start')}
</button>
{:else if currentStep === 'verify'}
@@ -584,7 +598,11 @@
<button
class="btn btn-primary"
onclick={next}
disabled={(currentStep === 'precheck' && !precheckDone) || (currentStep === 'restart' && !restartDone)}
disabled={
(currentStep === 'precheck' && !precheckDone) ||
(currentStep === 'backup' && !backupConfirmed) ||
(currentStep === 'restart' && !restartDone)
}
>
{$t('dacWizard.buttons.next')}
</button>
+3 -1
View File
@@ -967,6 +967,7 @@
"title": "Geführte DAC-Einrichtung",
"subtitle": "Schritt-für-Schritt-Anleitung.",
"body": "Sie werden Befehle kopieren und im Terminal ausführen. QBZ führt Sie durch jeden Schritt und erklärt alles. Vor Änderungen wird eine Sicherung erstellt.",
"checkbox": "Ich verstehe, dass diese Anleitung die System-Audiokonfiguration ändert",
"start": "Starten"
},
"precheck": {
@@ -1013,7 +1014,8 @@
"backup": {
"title": "Sicherung erstellen",
"subtitle": "Erforderlich vor jeder Änderung.",
"hint": "Sie können diese Sicherung später bei Bedarf wiederherstellen."
"hint": "Sie können diese Sicherung später bei Bedarf wiederherstellen.",
"checkbox": "Ich habe die Sicherung erstellt"
},
"pipewireConfig": {
"title": "Mehrere Abtastraten erlauben",
+3 -1
View File
@@ -1026,6 +1026,7 @@
"title": "Guided DAC Setup",
"subtitle": "Step-by-step instructions.",
"body": "You will copy and run commands in a terminal. QBZ will guide you and explain each step. A backup will be created before any changes.",
"checkbox": "I understand this guide modifies system audio configuration",
"start": "Start"
},
"precheck": {
@@ -1072,7 +1073,8 @@
"backup": {
"title": "Create Backup",
"subtitle": "Required before any changes.",
"hint": "You can restore this backup later if needed."
"hint": "You can restore this backup later if needed.",
"checkbox": "I created the backup"
},
"pipewireConfig": {
"title": "Allow Multiple Sample Rates",
+3 -1
View File
@@ -1026,6 +1026,7 @@
"title": "Configuración Guiada de DAC",
"subtitle": "Instrucciones paso a paso.",
"body": "Copiarás y ejecutarás comandos en una terminal. QBZ te guiará y explicará cada paso. Se creará un backup antes de cualquier cambio.",
"checkbox": "Entiendo que esta guía modifica la configuración de audio del sistema",
"start": "Comenzar"
},
"precheck": {
@@ -1072,7 +1073,8 @@
"backup": {
"title": "Crear Backup",
"subtitle": "Requerido antes de cualquier cambio.",
"hint": "Puedes restaurar este backup después si es necesario."
"hint": "Puedes restaurar este backup después si es necesario.",
"checkbox": "Creé el backup"
},
"pipewireConfig": {
"title": "Permitir Múltiples Sample Rates",
+3 -1
View File
@@ -967,6 +967,7 @@
"title": "Configuration guidée du DAC",
"subtitle": "Instructions étape par étape.",
"body": "Vous allez copier et exécuter des commandes dans un terminal. QBZ vous guidera et expliquera chaque étape. Une sauvegarde sera créée avant toute modification.",
"checkbox": "Je comprends que ce guide modifie la configuration audio du système",
"start": "Commencer"
},
"precheck": {
@@ -1013,7 +1014,8 @@
"backup": {
"title": "Créer une sauvegarde",
"subtitle": "Requis avant toute modification.",
"hint": "Vous pourrez restaurer cette sauvegarde ultérieurement si nécessaire."
"hint": "Vous pourrez restaurer cette sauvegarde ultérieurement si nécessaire.",
"checkbox": "J'ai créé la sauvegarde"
},
"pipewireConfig": {
"title": "Autoriser plusieurs taux d'échantillonnage",