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:
1 parent
b20934b7c7
commit
a5a2100a2a
5 files changed
+32
-6
No files matched your search
@@ -77,7 +77,9 @@
|
|||||||
let completedSteps = $state(new Set<WizardStep>());
|
let completedSteps = $state(new Set<WizardStep>());
|
||||||
let dacNodeName = $state('');
|
let dacNodeName = $state('');
|
||||||
let selectedApps = $state(['QBZ']);
|
let selectedApps = $state(['QBZ']);
|
||||||
|
let welcomeConfirmed = $state(false);
|
||||||
let precheckDone = $state(false);
|
let precheckDone = $state(false);
|
||||||
|
let backupConfirmed = $state(false);
|
||||||
let restartDone = $state(false);
|
let restartDone = $state(false);
|
||||||
let showRollback = $state(false);
|
let showRollback = $state(false);
|
||||||
let selectedDistro = $state('debian');
|
let selectedDistro = $state('debian');
|
||||||
@@ -119,7 +121,9 @@
|
|||||||
completedSteps = new Set();
|
completedSteps = new Set();
|
||||||
dacNodeName = '';
|
dacNodeName = '';
|
||||||
selectedApps = ['QBZ'];
|
selectedApps = ['QBZ'];
|
||||||
|
welcomeConfirmed = false;
|
||||||
precheckDone = false;
|
precheckDone = false;
|
||||||
|
backupConfirmed = false;
|
||||||
restartDone = false;
|
restartDone = false;
|
||||||
showRollback = false;
|
showRollback = false;
|
||||||
dacCapabilities = null;
|
dacCapabilities = null;
|
||||||
@@ -286,6 +290,11 @@
|
|||||||
{#if currentStep === 'welcome'}
|
{#if currentStep === 'welcome'}
|
||||||
<div class="step-content">
|
<div class="step-content">
|
||||||
<p class="body-text">{$t('dacWizard.welcome.body')}</p>
|
<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>
|
</div>
|
||||||
|
|
||||||
{:else if currentStep === 'precheck'}
|
{:else if currentStep === 'precheck'}
|
||||||
@@ -450,6 +459,11 @@
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<WarningBanner variant="info" body={$t('dacWizard.backup.hint')} />
|
<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>
|
</div>
|
||||||
|
|
||||||
{:else if currentStep === 'pipewire-config'}
|
{:else if currentStep === 'pipewire-config'}
|
||||||
@@ -560,7 +574,7 @@
|
|||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<footer class="wizard-footer">
|
<footer class="wizard-footer">
|
||||||
{#if currentStep === 'welcome'}
|
{#if currentStep === 'welcome'}
|
||||||
<button class="btn btn-primary" onclick={next}>
|
<button class="btn btn-primary" onclick={next} disabled={!welcomeConfirmed}>
|
||||||
{$t('dacWizard.welcome.start')}
|
{$t('dacWizard.welcome.start')}
|
||||||
</button>
|
</button>
|
||||||
{:else if currentStep === 'verify'}
|
{:else if currentStep === 'verify'}
|
||||||
@@ -584,7 +598,11 @@
|
|||||||
<button
|
<button
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
onclick={next}
|
onclick={next}
|
||||||
disabled={(currentStep === 'precheck' && !precheckDone) || (currentStep === 'restart' && !restartDone)}
|
disabled={
|
||||||
|
(currentStep === 'precheck' && !precheckDone) ||
|
||||||
|
(currentStep === 'backup' && !backupConfirmed) ||
|
||||||
|
(currentStep === 'restart' && !restartDone)
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{$t('dacWizard.buttons.next')}
|
{$t('dacWizard.buttons.next')}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -967,6 +967,7 @@
|
|||||||
"title": "Geführte DAC-Einrichtung",
|
"title": "Geführte DAC-Einrichtung",
|
||||||
"subtitle": "Schritt-für-Schritt-Anleitung.",
|
"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.",
|
"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"
|
"start": "Starten"
|
||||||
},
|
},
|
||||||
"precheck": {
|
"precheck": {
|
||||||
@@ -1013,7 +1014,8 @@
|
|||||||
"backup": {
|
"backup": {
|
||||||
"title": "Sicherung erstellen",
|
"title": "Sicherung erstellen",
|
||||||
"subtitle": "Erforderlich vor jeder Änderung.",
|
"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": {
|
"pipewireConfig": {
|
||||||
"title": "Mehrere Abtastraten erlauben",
|
"title": "Mehrere Abtastraten erlauben",
|
||||||
|
|||||||
@@ -1026,6 +1026,7 @@
|
|||||||
"title": "Guided DAC Setup",
|
"title": "Guided DAC Setup",
|
||||||
"subtitle": "Step-by-step instructions.",
|
"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.",
|
"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"
|
"start": "Start"
|
||||||
},
|
},
|
||||||
"precheck": {
|
"precheck": {
|
||||||
@@ -1072,7 +1073,8 @@
|
|||||||
"backup": {
|
"backup": {
|
||||||
"title": "Create Backup",
|
"title": "Create Backup",
|
||||||
"subtitle": "Required before any changes.",
|
"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": {
|
"pipewireConfig": {
|
||||||
"title": "Allow Multiple Sample Rates",
|
"title": "Allow Multiple Sample Rates",
|
||||||
|
|||||||
@@ -1026,6 +1026,7 @@
|
|||||||
"title": "Configuración Guiada de DAC",
|
"title": "Configuración Guiada de DAC",
|
||||||
"subtitle": "Instrucciones paso a paso.",
|
"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.",
|
"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"
|
"start": "Comenzar"
|
||||||
},
|
},
|
||||||
"precheck": {
|
"precheck": {
|
||||||
@@ -1072,7 +1073,8 @@
|
|||||||
"backup": {
|
"backup": {
|
||||||
"title": "Crear Backup",
|
"title": "Crear Backup",
|
||||||
"subtitle": "Requerido antes de cualquier cambio.",
|
"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": {
|
"pipewireConfig": {
|
||||||
"title": "Permitir Múltiples Sample Rates",
|
"title": "Permitir Múltiples Sample Rates",
|
||||||
|
|||||||
@@ -967,6 +967,7 @@
|
|||||||
"title": "Configuration guidée du DAC",
|
"title": "Configuration guidée du DAC",
|
||||||
"subtitle": "Instructions étape par étape.",
|
"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.",
|
"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"
|
"start": "Commencer"
|
||||||
},
|
},
|
||||||
"precheck": {
|
"precheck": {
|
||||||
@@ -1013,7 +1014,8 @@
|
|||||||
"backup": {
|
"backup": {
|
||||||
"title": "Créer une sauvegarde",
|
"title": "Créer une sauvegarde",
|
||||||
"subtitle": "Requis avant toute modification.",
|
"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": {
|
"pipewireConfig": {
|
||||||
"title": "Autoriser plusieurs taux d'échantillonnage",
|
"title": "Autoriser plusieurs taux d'échantillonnage",
|
||||||
|
|||||||
Reference in new issue
Block a user