fix(fleet-ui): wrap pair-dialog steps in template v-if/v-else

The Pair dialog had two interleaved v-if/v-else sibling pairs
(q-card-section + q-card-actions per step). Vue requires v-else to
immediately follow its v-if sibling, so the second v-else (actions)
trailed a v-else (section) — illegal, throwing compiler error 30
("v-else has no adjacent v-if") and breaking the entire Vue mount.
Wrap each step's section+actions in one <template v-if> / <template
v-else> so there's exactly one adjacent pair. Verified with
@vue/compiler-dom and a live pair/revoke round-trip against regtest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-19 00:59:29 +02:00
commit 76090ab5da

View file

@ -855,7 +855,8 @@
</q-card-section> </q-card-section>
<!-- Step 1 — configure + generate --> <!-- Step 1 — configure + generate -->
<q-card-section v-if="!pairDialog.result"> <template v-if="!pairDialog.result">
<q-card-section>
<p class="text-caption q-mb-md" :style="{opacity: 0.7}"> <p class="text-caption q-mb-md" :style="{opacity: 0.7}">
Mints a dedicated signing key for Mints a dedicated signing key for
<b v-text="(pairDialog.machine && pairDialog.machine.name) || 'this spire'"></b> <b v-text="(pairDialog.machine && pairDialog.machine.name) || 'this spire'"></b>
@ -880,16 +881,18 @@
class="q-mb-md" class="q-mb-md"
dense outlined></q-input> dense outlined></q-input>
</q-card-section> </q-card-section>
<q-card-actions v-if="!pairDialog.result" align="right" class="text-primary"> <q-card-actions align="right" class="text-primary">
<q-btn flat label="Cancel" v-close-popup></q-btn> <q-btn flat label="Cancel" v-close-popup></q-btn>
<q-btn <q-btn
color="primary" label="Generate seed URL" icon="vpn_key" color="primary" label="Generate seed URL" icon="vpn_key"
:loading="pairDialog.saving" :loading="pairDialog.saving"
@click="submitPair"></q-btn> @click="submitPair"></q-btn>
</q-card-actions> </q-card-actions>
</template>
<!-- Step 2 — show the seed URL --> <!-- Step 2 — show the seed URL -->
<q-card-section v-else> <template v-else>
<q-card-section>
<q-banner dense rounded class="bg-green-1 text-grey-9 q-mb-md"> <q-banner dense rounded class="bg-green-1 text-grey-9 q-mb-md">
<template v-slot:avatar> <template v-slot:avatar>
<q-icon name="check_circle" color="green"></q-icon> <q-icon name="check_circle" color="green"></q-icon>
@ -928,9 +931,10 @@
</q-btn> </q-btn>
</div> </div>
</q-card-section> </q-card-section>
<q-card-actions v-else align="right" class="text-primary"> <q-card-actions align="right" class="text-primary">
<q-btn flat label="Done" color="primary" v-close-popup></q-btn> <q-btn flat label="Done" color="primary" v-close-popup></q-btn>
</q-card-actions> </q-card-actions>
</template>
</q-card> </q-card>
</q-dialog> </q-dialog>