Files
felhom-controller/controller/internal/web/templates/launcher.html
T
admin 2c80868c63 Launcher polish: monogram reveal-on-failure + app placeholder on every icon surface (v0.163.1)
(A) The launcher monogram bled through every transparent white logo — it rendered
unconditionally under the img. Now hidden by default (.launch-mono display:none),
revealed only when the img chain fails (onerror adds .launch-tile--noimg).

(B) The /static/app-placeholder.svg default reached only app_list_row. The four
other sanctioned app-logo onerror chains now match the canonical SVG->PNG->placeholder
grammar: backups_apps (aligned row), stacks (infra->infra-logo else placeholder),
app_info hero (screenshots still vanish), deploy (keeps .LogoURL/.LogoPNGURL).

Template/CSS only; no handler/funcmap change. 5 tests + 2 red-proofs.
2026-07-24 10:14:25 +02:00

44 lines
1.9 KiB
HTML

{{define "launcher"}}
{{template "layout_start" .}}
<div class="page-header">
<h2>Indítópult</h2>
<span class="domain-badge">{{.Domain}}</span>
</div>
{{if .Apps}}
<div class="launch-grid">
{{range .Apps}}
{{if isOperational .State}}
<a class="launch-cell" href="https://{{.Subdomain}}.{{$.Domain}}{{.OpenPath}}" target="_blank" rel="noopener">
<span class="launch-tile" style="background: {{tileColor .Slug .BrandColor}}">
<span class="launch-mono">{{initial .DisplayName}}</span>
<img class="launch-logo" src="{{logoURL .Slug}}" alt=""
onerror="if(!this.dataset.step){this.dataset.step='1';this.src='{{logoPNGURL .Slug}}';}else{this.onerror=null;this.style.display='none';this.parentElement.classList.add('launch-tile--noimg');}">
</span>
<span class="launch-name">{{.DisplayName}}</span>
{{if ne (stateStr .State) "running"}}<span class="tag tag-{{stateColor .State}}"><span class="dot"></span>{{stateLabel .State}}</span>{{end}}
</a>
{{else}}
<div class="launch-cell launch-cell--off">
<span class="launch-tile launch-tile--off" style="background: {{tileColor .Slug .BrandColor}}">
<span class="launch-mono">{{initial .DisplayName}}</span>
<img class="launch-logo" src="{{logoURL .Slug}}" alt=""
onerror="if(!this.dataset.step){this.dataset.step='1';this.src='{{logoPNGURL .Slug}}';}else{this.onerror=null;this.style.display='none';this.parentElement.classList.add('launch-tile--noimg');}">
</span>
<span class="launch-name">{{.DisplayName}}</span>
<span class="tag tag-{{stateColor .State}}"><span class="dot"></span>{{stateLabel .State}}</span>
</div>
{{end}}
{{end}}
</div>
{{else}}
<div class="empty-state">
<p>Még nincs telepített alkalmazás.</p>
<p><a href="/stacks" class="empty-state-link">Alkalmazások telepítése</a></p>
</div>
{{end}}
{{template "layout_end"}}
{{end}}