v0.5.45-beta - wizard-knop toegevoegd in Instellingen
Some checks failed
Deploy server-up (dev) / deploy (push) Failing after 25s

De wizard was alleen te zien bij een verse installatie: zodra hij een keer was
afgerond, was er geen enkele manier meer om hem te openen. De vertaalsleutels
wizard_open en wizard_reset bestonden al, en /api/wizard/reset werkte ook, maar
de knop is nooit gebouwd - ook niet in v0.4.60.

- Blok "Setup Wizard" onder Instellingen met "Wizard openen" en "Opnieuw
  uitvoeren". Dat laatste zet WIZARD_DONE terug en opent hem meteen.
- openWizard() staat los van checkWizard(), zodat handmatig openen niet meer
  afhangt van of de wizard al gedraaid heeft. Stap wordt op 0 gezet.
- Sluitknop in de wizard zelf; die kon je eerder alleen verlaten door hem
  helemaal af te ronden.
- De staptitels lopen nu via t() in plaats van harde Nederlandse teksten.

De wizard-stappen zelf zijn end-to-end nagelopen tegen een draaiende instantie
(paths, git, sync, complete, reset): alle endpoints geven 200.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C7oLCRYzY5ixJ5Sv8Y8EFb
This commit is contained in:
Ramon 2026-07-27 00:39:35 +02:00
parent dea949a003
commit cb04c4a7ad
4 changed files with 47 additions and 17 deletions

View file

@ -1 +1 @@
0.5.44-beta 0.5.45-beta

View file

@ -482,6 +482,23 @@ tailwind.config = {
</div> </div>
</div> </div>
<!-- Setup wizard opnieuw doorlopen -->
<div class="card">
<div class="px-5 py-4 flex items-center gap-2.5 border-b border-bd dark:border-bd-dark">
<span class="mdi mdi-wizard-hat text-ac dark:text-ac-dark text-lg"></span>
<span class="font-bold text-wh dark:text-wh-dark text-sm" x-text="t('wizard')">Setup Wizard</span>
</div>
<div class="p-5 flex flex-wrap items-center gap-2">
<p class="text-xs text-t2 dark:text-t2-dark flex-1 min-w-[200px]" x-text="t('wizard_hint')"></p>
<button class="btn btn-sm" @click="openWizard()">
<span class="mdi mdi-play-outline"></span> <span x-text="t('wizard_open')">Wizard openen</span>
</button>
<button class="btn btn-sm" @click="resetWizard()">
<span class="mdi mdi-restart"></span> <span x-text="t('wizard_reset')">Opnieuw uitvoeren</span>
</button>
</div>
</div>
<!-- Beveiliging: accounts + wachtwoord --> <!-- Beveiliging: accounts + wachtwoord -->
<div class="card"> <div class="card">
<div class="px-5 py-4 flex items-center gap-2.5 border-b border-bd dark:border-bd-dark"> <div class="px-5 py-4 flex items-center gap-2.5 border-b border-bd dark:border-bd-dark">
@ -1273,7 +1290,8 @@ tailwind.config = {
<div x-show="wizard.step === 4"><p class="text-sm">We synchroniseren nu de repos en zijn klaar voor gebruik.</p></div> <div x-show="wizard.step === 4"><p class="text-sm">We synchroniseren nu de repos en zijn klaar voor gebruik.</p></div>
</div> </div>
<div class="px-7 py-4 border-t border-bd dark:border-bd-dark flex justify-end gap-2"> <div class="px-7 py-4 border-t border-bd dark:border-bd-dark flex justify-end gap-2">
<button class="btn" @click="wizard.step = Math.max(0, wizard.step-1)" :disabled="wizard.step===0">Terug</button> <button class="btn" @click="wizard.open = false" x-text="t('close')">Sluiten</button>
<button class="btn" @click="wizard.step = Math.max(0, wizard.step-1)" :disabled="wizard.step===0" x-text="t('prev')">Terug</button>
<button class="btn btn-primary" @click="wizardNext()"><span x-text="wizard.step < wizard.steps.length-1 ? 'Volgende' : 'Klaar'"></span></button> <button class="btn btn-primary" @click="wizardNext()"><span x-text="wizard.step < wizard.steps.length-1 ? 'Volgende' : 'Klaar'"></span></button>
</div> </div>
</div> </div>
@ -2100,21 +2118,31 @@ function app() {
this.toast(this.t('restart_slow'), 'wr'); this.toast(this.t('restart_slow'), 'wr');
}, },
// Bij het opstarten: alleen openen als de wizard nog niet is afgerond.
async checkWizard() { async checkWizard() {
const d = await this.rpc('/api/wizard'); const d = await this.rpc('/api/wizard');
if (!d.done) { if (!d.done) await this.openWizard();
},
// Handmatig openen vanuit Instellingen, ongeacht of hij al gedraaid heeft.
async openWizard() {
const d = await this.rpc('/api/wizard');
this.wizard.steps = [ this.wizard.steps = [
{ title: 'Welkom bij Server Up 🚀', subtitle: 'Beheer je Docker stacks via een eenvoudige web-UI.' }, { title: this.t('wizard_welcome') + ' 🚀', subtitle: this.t('wizard_welcome_sub') },
{ title: 'Paden', subtitle: 'Waar moeten stacks en data komen?' }, { title: this.t('wizard_paths'), subtitle: this.t('wizard_paths_sub') },
{ title: 'Repositories', subtitle: 'Server Up start met een ingebouwde stacks-repo en de ChristianLempa Boilerplates.' }, { title: this.t('module_repos'), subtitle: 'Server Up start met een ingebouwde stacks-repo en de ChristianLempa Boilerplates.' },
{ title: 'Eigen Git Server', subtitle: 'Optioneel: gebruik een zelfgehoste git voor eigen boilerplates.' }, { title: this.t('wizard_git'), subtitle: this.t('wizard_git_sub') },
{ title: 'Klaar!', subtitle: 'We synchroniseren nu de repos en zijn klaar voor gebruik.' }, { title: this.t('wizard_done'), subtitle: this.t('wizard_done_sub') },
]; ];
this.wizard.step = 0;
this.wizard.LIBRARY_DIR = d.defaults?.LIBRARY_DIR || '/opt/serverup/stacks'; this.wizard.LIBRARY_DIR = d.defaults?.LIBRARY_DIR || '/opt/serverup/stacks';
this.wizard.DATA_DIR = d.defaults?.DATA_DIR || '/opt/serverup/appdata'; this.wizard.DATA_DIR = d.defaults?.DATA_DIR || '/opt/serverup/appdata';
this.wizard.BACKUP_DIR = d.defaults?.BACKUP_DIR || '/opt/serverup/backups'; this.wizard.BACKUP_DIR = d.defaults?.BACKUP_DIR || '/opt/serverup/backups';
this.wizard.open = true; this.wizard.open = true;
} },
// Opnieuw uitvoeren: markeer als niet-afgerond en open hem.
async resetWizard() {
await this.rpc('/api/wizard/reset', {});
await this.openWizard();
}, },
async wizardNext() { async wizardNext() {
if (this.wizard.step < this.wizard.steps.length - 1) { if (this.wizard.step < this.wizard.steps.length - 1) {

View file

@ -241,5 +241,6 @@
"range_krap": "fits inside", "range_krap": "fits inside",
"range_count": "{count} addresses", "range_count": "{count} addresses",
"already_added": "already added", "already_added": "already added",
"detect_empty": "No network with a default route was found on this server. Fill in the details below manually." "detect_empty": "No network with a default route was found on this server. Fill in the details below manually.",
"wizard_hint": "Run the wizard again to adjust paths and repositories. Your existing stacks are left untouched."
} }

View file

@ -241,5 +241,6 @@
"range_krap": "past binnen", "range_krap": "past binnen",
"range_count": "{count} adressen", "range_count": "{count} adressen",
"already_added": "al toegevoegd", "already_added": "al toegevoegd",
"detect_empty": "Er is geen netwerk met een default route gevonden op deze server. Vul de gegevens hieronder handmatig in." "detect_empty": "Er is geen netwerk met een default route gevonden op deze server. Vul de gegevens hieronder handmatig in.",
"wizard_hint": "Doorloop de wizard opnieuw om paden en repositories aan te passen. Je bestaande stacks blijven staan."
} }