v0.315.0: one app page with four tabs; the guide the catalog can carry; no Raspberry Pi badge
gates / gates (push) Failing after 47s
gates / gates (push) Failing after 47s
An app was six pages — details, install/settings, logs, export, the per-app backup panel and a
details card for moving data — and every "Vissza" on them went to the app LIST, so there was no way
back to the app you were looking at. It is now ONE page with four tab URLs under /apps/{slug}/,
one shared header and one set of banners.
settings Mukodes (Start/Restart/Stop, Stop confirms) + the cards that want something from the
household + the install-time and optional settings. The default for an installed app,
RENDERED at the bare URL and never redirected to.
data the data folders, move to another drive, the nightly copy, the 2nd-copy setting, export
guide tagline, screenshots, use cases, first steps, the catalog's guide, the FAQ, the docs
link — and the WHOLE page for an app that is not installed
logs the log, and the only tab whose poller runs
The tabs are links, not panels: a link in an alert has to land ON a tab, and the log poller must not
run on the other three. Start/Restart/Stop left the page header, where they read as menu buttons.
The old /stacks/{name}/{deploy,logs,export,backup} GETs answer 302 — never 301, which a browser
caches beyond anyone's reach — to the tab that now holds them, query string carried through, with
name->slug resolved through the stack list rather than assumed equal. Every POST on those paths is
untouched: the backup form, the app-email toggle and the reveal endpoints keep their URLs.
A value asked AFTER the app starts is now generic (D2). The catalog marks a field `after_start: true`
and supplies its label; the ACTION is Go, in a registry keyed by slug + env var. The catalog can
never declare what runs — a declared field with no registered action renders nothing, POSTs 404 and
logs one WARN with the env var KEY, never the value. A red-proof found the second half of that guard
unpinned: deleting the "the catalog must have DECLARED this field" check left the suite green, and a
POST for an undeclared field then reached Plex and opened the setup gate.
TestAfterStart_RegistryAloneIsNotAnInvitation pins it.
New catalog block app_info.guide (sections + faq + checked_version), parsed, localised field by
field and rendered with the household's own address filled in. It renders only when checked_version
names the image tag its author clicked through. No template carries one yet.
The Pi and "csak x86" badges are gone; PiCompatible and the catalog key stay this release, or a box
on 0.314.0 would read "csak x86" on every app (R-1067).
template_id_gate.py now follows {{template}} includes, with a scope decoy proving the walk did not
become vacuous.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117kRTSgs3rJWUFGxyoWN6Y
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
{{define "app_guide"}}
|
||||
{{template "layout_start" .}}
|
||||
{{template "app_shell_start" .}}
|
||||
|
||||
{{/* „UTMUTATO" — the app's own copy, and the WHOLE page for an app that is not installed yet.
|
||||
It replaces the old details page: description and screenshots, what it is for, the first steps,
|
||||
the guide the catalog carries, the questions people ask, and the official documentation.
|
||||
|
||||
THE GUIDE RENDERS ONLY WHEN ITS AUTHOR NAMED THE VERSION THEY CHECKED IT AGAINST
|
||||
(AppGuide.Rendered). A guide walking the household through a screen two releases old is worse
|
||||
than no guide, so an unchecked one is not shown and the page says a guide is still to come.
|
||||
|
||||
Everything here is PLAIN TEXT through html/template. No markdown, no raw HTML: a step that
|
||||
contains a tag is shown as the characters the author typed. */}}
|
||||
|
||||
<!-- Screenshots (graceful — hidden if assets don't exist) -->
|
||||
<div class="app-screenshots" id="screenshots">
|
||||
<img src="{{screenshotURL .Meta.Slug 1}}" alt="" class="app-screenshot"
|
||||
onerror="this.style.display='none'">
|
||||
<img src="{{screenshotURL .Meta.Slug 2}}" alt="" class="app-screenshot"
|
||||
onerror="this.style.display='none'">
|
||||
<img src="{{screenshotURL .Meta.Slug 3}}" alt="" class="app-screenshot"
|
||||
onerror="this.style.display='none'">
|
||||
</div>
|
||||
|
||||
{{if not .Deployed}}
|
||||
{{/* The install button lives on this tab, because this tab IS the page for a not-installed app.
|
||||
The server refuses a non-installable template regardless; hiding the button keeps the page
|
||||
from offering an action that would be rejected. */}}
|
||||
<div class="app-info-card" style="margin-top:1rem">
|
||||
{{if canInstall .Meta}}
|
||||
<a href="/apps/{{.Meta.Slug}}/install" class="btn btn-primary" data-install-cta="1"
|
||||
onclick="return checkBeforeDeploy(event, '{{.Stack.Name}}')">{{T "app_info.telepites"}}</a>
|
||||
{{else}}
|
||||
<p class="form-hint" data-not-installable="1">{{T "app_page.not_installable"}}</p>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="app-info-grid">
|
||||
{{if .AppInfo.UseCases}}
|
||||
<div class="app-info-card">
|
||||
<h3>{{T "app_info.mire_hasznalhato"}}</h3>
|
||||
<ul class="app-info-list">
|
||||
{{range .AppInfo.UseCases}}<li>{{.}}</li>{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .AppInfo.FirstSteps}}
|
||||
<div class="app-info-card">
|
||||
<h3>{{T "app_info.elso_lepesek"}}</h3>
|
||||
<ol class="app-info-list">
|
||||
{{range .AppInfo.FirstSteps}}<li>{{.}}</li>{{end}}
|
||||
</ol>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .AppInfo.Prerequisites}}
|
||||
<div class="app-info-card">
|
||||
<h3>{{T "app_info.elofeltetelek"}}</h3>
|
||||
<ul class="app-info-list">
|
||||
{{range .AppInfo.Prerequisites}}<li>{{.}}</li>{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{/* THE GUIDE. */}}
|
||||
{{if .AppInfo.Guide.Rendered}}
|
||||
<div class="app-guide" data-guide="1" data-guide-checked="{{.AppInfo.Guide.CheckedVersion}}">
|
||||
{{- range .AppInfo.Guide.Sections}}
|
||||
<div class="app-info-card" style="margin-top:1rem" data-guide-section="1">
|
||||
<h3>{{.Title}}</h3>
|
||||
{{if .Intro}}<p>{{.Intro}}</p>{{end}}
|
||||
{{if .Steps}}
|
||||
<ol class="app-info-list">
|
||||
{{- range .Steps}}<li>{{.}}</li>{{end}}
|
||||
</ol>
|
||||
{{end}}
|
||||
</div>
|
||||
{{- end}}
|
||||
{{- if .AppInfo.Guide.FAQ}}
|
||||
<div class="app-info-card" style="margin-top:1rem" data-guide-faq="1">
|
||||
<h3>{{T "app_page.faq"}}</h3>
|
||||
<dl class="app-faq">
|
||||
{{- range .AppInfo.Guide.FAQ}}
|
||||
<dt>{{.Q}}</dt>
|
||||
<dd>{{.A}}</dd>
|
||||
{{- end}}
|
||||
</dl>
|
||||
</div>
|
||||
{{- end}}
|
||||
</div>
|
||||
{{else}}
|
||||
<p class="form-hint" style="margin-top:1rem" data-guide-missing="1">{{T "app_page.guide_missing"}}</p>
|
||||
{{end}}
|
||||
|
||||
<div class="app-info-grid">
|
||||
{{if .AppInfo.DocsURL}}
|
||||
<div class="app-info-card">
|
||||
<h3>{{T "app_info.dokumentacio"}}</h3>
|
||||
<p><a href="{{.AppInfo.DocsURL}}" target="_blank" class="app-info-link">{{T "app_info.hivatalos_dokumentacio"}}</a></p>
|
||||
</div>
|
||||
{{end}}</div>
|
||||
|
||||
{{template "app_press_script" .}}
|
||||
{{template "layout_end" .}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user