fix(fleet-ui): pair-dialog v-else compiler error + TTL docstring correction #27
1 changed files with 8 additions and 4 deletions
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>
commit
76090ab5da
|
|
@ -855,7 +855,8 @@
|
|||
</q-card-section>
|
||||
|
||||
<!-- 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}">
|
||||
Mints a dedicated signing key for
|
||||
<b v-text="(pairDialog.machine && pairDialog.machine.name) || 'this spire'"></b>
|
||||
|
|
@ -880,16 +881,18 @@
|
|||
class="q-mb-md"
|
||||
dense outlined></q-input>
|
||||
</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
|
||||
color="primary" label="Generate seed URL" icon="vpn_key"
|
||||
:loading="pairDialog.saving"
|
||||
@click="submitPair"></q-btn>
|
||||
</q-card-actions>
|
||||
</template>
|
||||
|
||||
<!-- 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">
|
||||
<template v-slot:avatar>
|
||||
<q-icon name="check_circle" color="green"></q-icon>
|
||||
|
|
@ -928,9 +931,10 @@
|
|||
</q-btn>
|
||||
</div>
|
||||
</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-card-actions>
|
||||
</template>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue