forked from Nixius/authelia
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:
parent
6356cbb1da
commit
084548fcd7
|
|
@ -173,11 +173,10 @@
|
|||
{{if .StackRunning}}
|
||||
<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>
|
||||
{{else if not .StackDeployed}}
|
||||
<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>
|
||||
{{else if and .StackDeployed (not .StackRunning)}}
|
||||
<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}}
|
||||
|
||||
{{if .StackDeployed}}
|
||||
<hr class="divider">
|
||||
<div class="actions">
|
||||
{{if .StackRunning}}
|
||||
|
|
@ -195,13 +194,14 @@
|
|||
<button type="submit" class="btn btn-sm">Start</button>
|
||||
</form>
|
||||
{{end}}
|
||||
{{if .StackDeployed}}
|
||||
<form method="POST" action="/stack-manage" style="margin:0"
|
||||
onsubmit="return confirm('Destroy your stack? All containers will be removed. Volumes are preserved.')">
|
||||
<input type="hidden" name="action" value="destroy">
|
||||
<button type="submit" class="btn btn-danger btn-sm">Destroy</button>
|
||||
</form>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="card">
|
||||
<h2>Manage</h2>
|
||||
|
|
|
|||
Loading…
Reference in New Issue