forked from Nixius/authelia
1
0
Fork 0

Fix dashboard stack state UI after Destroy

- Inverted condition was showing 'being provisioned' when stack not deployed
- Actions block was gated on StackDeployed so no Start button after destroy
- Start button now always shown when not running
- Destroy button only shown when stack is deployed
- 'Being provisioned' message replaced with accurate 'stopped' message

Made-with: Cursor
This commit is contained in:
Leopere 2026-03-03 16:56:48 -05:00
parent 6356cbb1da
commit 084548fcd7
Signed by: colin
SSH Key Fingerprint: SHA256:nRPCQTeMFLdGytxRQmPVK9VXY3/ePKQ5lGRyJhT5DY8
1 changed files with 4 additions and 4 deletions

View File

@ -173,11 +173,10 @@
{{if .StackRunning}} {{if .StackRunning}}
<p style="color: var(--muted); font-size: 0.9rem; margin-top: 0.75rem;">Your dedicated environment is accessible at:</p> <p style="color: var(--muted); font-size: 0.9rem; margin-top: 0.75rem;">Your dedicated environment is accessible at:</p>
<a class="stack-link" href="https://{{.User}}.{{.Domain}}">{{.User}}.{{.Domain}}</a> <a class="stack-link" href="https://{{.User}}.{{.Domain}}">{{.User}}.{{.Domain}}</a>
{{else if not .StackDeployed}} {{else if and .StackDeployed (not .StackRunning)}}
<p style="color: var(--muted); font-size: 0.9rem; margin-top: 0.75rem;">Your stack is being provisioned. Refresh this page in a moment.</p> <p style="color: var(--muted); font-size: 0.9rem; margin-top: 0.75rem;">Your stack is stopped. Start it to access your environment.</p>
{{end}} {{end}}
{{if .StackDeployed}}
<hr class="divider"> <hr class="divider">
<div class="actions"> <div class="actions">
{{if .StackRunning}} {{if .StackRunning}}
@ -195,13 +194,14 @@
<button type="submit" class="btn btn-sm">Start</button> <button type="submit" class="btn btn-sm">Start</button>
</form> </form>
{{end}} {{end}}
{{if .StackDeployed}}
<form method="POST" action="/stack-manage" style="margin:0" <form method="POST" action="/stack-manage" style="margin:0"
onsubmit="return confirm('Destroy your stack? All containers will be removed. Volumes are preserved.')"> onsubmit="return confirm('Destroy your stack? All containers will be removed. Volumes are preserved.')">
<input type="hidden" name="action" value="destroy"> <input type="hidden" name="action" value="destroy">
<button type="submit" class="btn btn-danger btn-sm">Destroy</button> <button type="submit" class="btn btn-danger btn-sm">Destroy</button>
</form> </form>
{{end}}
</div> </div>
{{end}}
</div> </div>
<div class="card"> <div class="card">
<h2>Manage</h2> <h2>Manage</h2>