feat: show no-WFB kiosk fallback only while video absent (#2)
Build Ground Station / build (push) Successful in 44s

This commit was merged in pull request #9.
This commit is contained in:
2026-10-01 14:40:24 +02:00
parent 53ab05ce12
commit b169a64ad5
11 changed files with 715 additions and 28 deletions
+6 -1
View File
@@ -18,10 +18,15 @@ import (
// buildTarget selects the target-specific opener and template. Each target
// owns its own backend and layouts; there is no shared global template.
// buildTarget wires one shared video presence signal into both the opener
// (which observes the video output lifecycle) and the fallback template
// (which shows or hides itself from it).
func buildTarget(name string) (display.Opener, display.Template, error) {
switch name {
case "x11":
return display.X11Opener{}, display.NewStatusTemplate("Brak polaczenia WFB"), nil
video := display.NewVideoPresence()
return display.X11Opener{Video: video},
display.NewFallbackTemplate(video, "Brak połączenia WFB"), nil
default:
return nil, nil, fmt.Errorf("unknown display target %q (supported: x11)", name)
}