feat(ui): add desktop footer, legal custom link and about dialog

This commit is contained in:
sandrodach committed 2026-10-30 20:19:02 +01:00
1 parent bc7bdc481e
commit c181ffea54
12 files changed
+179 -13

No files matched your search

+2
View File
@@ -52,6 +52,8 @@ func (s *Server) handleAuthStatus(w http.ResponseWriter, r *http.Request) {
"hasImprintContent": s.cfg.Legal.ImprintContent != "",
"privacyUrl": s.cfg.Legal.PrivacyURL,
"hasPrivacyContent": s.cfg.Legal.PrivacyContent != "",
"customLinkLabel": s.cfg.Legal.CustomLinkLabel,
"customLinkUrl": s.cfg.Legal.CustomLinkURL,
},
}
// Countdown to the next demo reset; seconds as well, so client clocks do not matter
+9 -2
View File
@@ -1388,7 +1388,12 @@ func TestLegalTextsArePublic(t *testing.T) {
}
defer store.Close()
cfg := &config.Config{Port: "8080", DatabasePath: dbPath, JWTSecret: "test-jwt-secret-key",
Legal: config.LegalTexts{ImprintContent: "# Impressum\nMax Muster", PrivacyURL: "https://example.org/datenschutz"}}
Legal: config.LegalTexts{
ImprintContent: "# Impressum\nMax Muster",
PrivacyURL: "https://example.org/datenschutz",
CustomLinkLabel: "Support",
CustomLinkURL: "https://support.example.org",
}}
router := NewServer(cfg, store, ws.NewHub(), nil).Router()
rec := httptest.NewRecorder()
@@ -1399,10 +1404,12 @@ func TestLegalTextsArePublic(t *testing.T) {
HasImprintContent bool `json:"hasImprintContent"`
PrivacyURL string `json:"privacyUrl"`
HasPrivacyContent bool `json:"hasPrivacyContent"`
CustomLinkLabel string `json:"customLinkLabel"`
CustomLinkURL string `json:"customLinkUrl"`
} `json:"legal"`
}
_ = json.Unmarshal(rec.Body.Bytes(), &st)
if !st.Legal.HasImprintContent || st.Legal.HasPrivacyContent || st.Legal.PrivacyURL != "https://example.org/datenschutz" {
if !st.Legal.HasImprintContent || st.Legal.HasPrivacyContent || st.Legal.PrivacyURL != "https://example.org/datenschutz" || st.Legal.CustomLinkLabel != "Support" || st.Legal.CustomLinkURL != "https://support.example.org" {
t.Fatalf("unexpected legal status: %+v", st.Legal)
}