From 2d4bd10c9b4649b5f991ce9863da64aab7131f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Untersch=C3=BCtz?= Date: Thu, 26 Nov 2026 20:16:28 +0100 Subject: [PATCH] feat(notify): name regions and link the console in alerts; consent to subscribe Alert mails and chat messages named regions by id. They now show the region's name and mails link the monitor in the console. Visitors of a status page accept the platform's terms and the page's privacy policy, where set, before they can subscribe to it; the status page server and the API both check it. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3 --- internal/agentapi/subscriptions.go | 3 + internal/api/alerting.go | 45 +- internal/api/alerting_test.go | 2 + internal/api/providers.go | 9 +- internal/api/statuspages.go | 5 +- internal/api/subscribers.go | 4 + internal/api/subscribers_test.go | 31 +- internal/i18n/locales/de.json | 6 + internal/i18n/locales/en.json | 6 + internal/notify/notify.go | 3 + internal/statuspage/public.go | 4 +- internal/store/incidents.sql.go | 7 +- internal/store/queries/incidents.sql | 5 +- internal/web/legal.go | 28 +- internal/web/public.templ | 24 +- internal/web/public_templ.go | 957 ++++++++++++++------------- 16 files changed, 660 insertions(+), 479 deletions(-) diff --git a/internal/agentapi/subscriptions.go b/internal/agentapi/subscriptions.go index 01a7aef..e1bc5ee 100644 --- a/internal/agentapi/subscriptions.go +++ b/internal/agentapi/subscriptions.go @@ -24,6 +24,9 @@ type SubscribeRequest struct { // uses it for the links in mails only where it does not know the // page's address itself. PageURL string `json:"page_url,omitempty"` + // Accepted says the visitor accepted the terms and privacy policy the + // page links in its form, if it links any. + Accepted bool `json:"accepted"` } // SubscriptionInfo describes a subscription that was confirmed or ended. diff --git a/internal/api/alerting.go b/internal/api/alerting.go index 4456a30..4af0ee5 100644 --- a/internal/api/alerting.go +++ b/internal/api/alerting.go @@ -15,6 +15,7 @@ import ( "git.zb-server.de/ZB-Server/uptimesebi/internal/agentapi" "git.zb-server.de/ZB-Server/uptimesebi/internal/evaluate" + "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" "git.zb-server.de/ZB-Server/uptimesebi/internal/notify" "git.zb-server.de/ZB-Server/uptimesebi/internal/store" "git.zb-server.de/ZB-Server/uptimesebi/internal/tenant" @@ -197,9 +198,40 @@ func eventOf(n store.NotificationDetailsRow) notify.Event { Monitor: notify.Monitor{ID: n.MonitorID, Name: n.MonitorName, Type: n.MonitorType, Target: n.MonitorTarget}, } _ = json.Unmarshal(n.Cause, &ev.Cause) + _ = json.Unmarshal(n.RegionNames, &ev.RegionNames) return ev } +// causeLines describes the errors of ev per region, sorted, naming each +// region as people know it. +func causeLines(ev notify.Event, l *i18n.Localizer) []string { + var out []string + for region, msg := range ev.Cause { + name, ok := ev.RegionNames[region] + switch { + case ok: + case region == heartbeatRegion: + name = l.T("monitors.type_heartbeat", nil) + case region == alertmanagerRegion: + name = "Alertmanager" + default: + name = region + } + out = append(out, name+": "+msg) + } + slices.Sort(out) + return out +} + +// monitorLink is the address of ev's monitor in the console, or "" if +// the platform's own address is unknown. +func (s *Server) monitorLink(ev notify.Event) string { + if ev.Monitor.ID == (uuid.UUID{}) || !absoluteURL(s.cfg.PublicURL) { + return "" + } + return strings.TrimSuffix(s.cfg.PublicURL, "/") + "/monitors/" + ev.Monitor.ID.String() +} + // webhookConfig is stored for webhook channels; Secret is sealed. type webhookConfig struct { URL string `json:"url"` @@ -257,18 +289,17 @@ func (s *Server) mailFor(ev notify.Event, to []string, locale string) notify.Mai "Target": ev.Monitor.Target, "Since": ev.StartedAt.UTC().Format("2006-01-02 15:04 MST"), } - var cause []string - for region, msg := range ev.Cause { - cause = append(cause, region+": "+msg) - } - slices.Sort(cause) - data["Cause"] = strings.Join(cause, "\n") + data["Cause"] = strings.Join(causeLines(ev, l), "\n") if ev.ResolvedAt != nil { data["Duration"] = ev.ResolvedAt.Sub(ev.StartedAt).Round(time.Second).String() } + body := l.T("email."+ev.Kind+".body", data) + if link := s.monitorLink(ev); link != "" { + body += "\n\n" + l.T("email.monitor_link", map[string]any{"Link": link}) + } return notify.Mail{ To: to, Subject: l.T("email."+ev.Kind+".subject", data), - Body: l.T("email."+ev.Kind+".body", data), + Body: body, } } diff --git a/internal/api/alerting_test.go b/internal/api/alerting_test.go index e1fedf5..ef05be4 100644 --- a/internal/api/alerting_test.go +++ b/internal/api/alerting_test.go @@ -128,6 +128,8 @@ func TestAlerting(t *testing.T) { } if msg := mail.Messages()[0].Data; !strings.Contains(msg, "Subject: [DOWN] Shop") || !strings.Contains(msg, "ist in allen Regionen nicht erreichbar") { t.Errorf("down mail = %q, want German down notice", msg) + } else if strings.Contains(msg, eu) || strings.Contains(msg, us) || !strings.Contains(msg, "/monitors/"+monitorID) { + t.Errorf("down mail = %q, want region names instead of ids and a link to the monitor", msg) } healthy.Store(true) diff --git a/internal/api/providers.go b/internal/api/providers.go index 824350d..d23c44c 100644 --- a/internal/api/providers.go +++ b/internal/api/providers.go @@ -134,10 +134,7 @@ func (s *Server) messageFor(ev notify.Event, locale string) notify.Message { switch ev.Kind { case notify.Opened: m.Title = l.T("notify.title_opened", data) - for region, msg := range ev.Cause { - lines = append(lines, region+": "+msg) - } - slices.Sort(lines) + lines = causeLines(ev, l) case notify.Resolved: m.Title = l.T("notify.title_resolved", data) if ev.ResolvedAt != nil { @@ -151,8 +148,6 @@ func (s *Server) messageFor(ev notify.Event, locale string) notify.Message { lines = append([]string{ev.Monitor.Type + " · " + ev.Monitor.Target}, lines...) } m.Body = strings.Join(lines, "\n") - if ev.Monitor.ID != [16]byte{} { - m.URL = strings.TrimSuffix(s.cfg.PublicURL, "/") + "/monitors/" + ev.Monitor.ID.String() - } + m.URL = s.monitorLink(ev) return m } diff --git a/internal/api/statuspages.go b/internal/api/statuspages.go index 0a6427e..034ee5b 100644 --- a/internal/api/statuspages.go +++ b/internal/api/statuspages.go @@ -128,8 +128,9 @@ func (s *Server) buildSnapshot(ctx context.Context, page store.StatusPage) (agen return err } docs, err := q.LegalDocuments(ctx, &page.OrgID) - // Visitors of status pages accept no terms. - snap.Legal = slices.DeleteFunc(mergeLegal(docs), func(d agentapi.LegalDoc) bool { return d.Kind == "terms" }) + // Visitors of status pages accept the platform's terms only when + // they subscribe to it. + snap.Legal = slices.DeleteFunc(mergeLegal(docs), func(d agentapi.LegalDoc) bool { return d.Kind == "terms" && !snap.Subscribe }) return err }) if err != nil { diff --git a/internal/api/subscribers.go b/internal/api/subscribers.go index 88d8469..515c740 100644 --- a/internal/api/subscribers.go +++ b/internal/api/subscribers.go @@ -134,6 +134,10 @@ func (s *Server) agentSubscribe(c *gin.Context) { fail(c, http.StatusUnprocessableEntity, "invalid_email") return } + if !req.Accepted { + fail(c, http.StatusUnprocessableEntity, "consent_required") + return + } ctx := c.Request.Context() a := agentOf(c) var host, slug *string diff --git a/internal/api/subscribers_test.go b/internal/api/subscribers_test.go index b8cb808..1820214 100644 --- a/internal/api/subscribers_test.go +++ b/internal/api/subscribers_test.go @@ -95,13 +95,28 @@ func TestStatusPageSubscriptions(t *testing.T) { return out } - if code, html, _ := visit("GET", "/"+slug, ""); code != 200 || !strings.Contains(html, `action="/`+slug+`/subscribe"`) || !strings.Contains(html, "feed.rss") { + // Subscribers accept the page's privacy policy. + if st, body := owner.do("PUT", "/api/v1/org/legal/privacy", map[string]any{"url": "https://shop.example/privacy"}); st != http.StatusNoContent { + t.Fatalf("set privacy policy = %d %v", st, body) + } + t.Cleanup(func() { owner.do("PUT", "/api/v1/org/legal/privacy", map[string]any{}) }) + pages.Sync(ctx) + code, html, _ := visit("GET", "/"+slug, "") + if code != 200 || !strings.Contains(html, `action="/`+slug+`/subscribe"`) || !strings.Contains(html, "feed.rss") { t.Fatalf("page = %d, want the subscription form and the feed link", code) } - if code, html, _ := visit("POST", "/"+slug+"/subscribe", "email=not-an-address"); code != http.StatusUnprocessableEntity { + if !strings.Contains(html, `name="accept"`) || !strings.Contains(html, `href="https://shop.example/privacy"`) { + t.Error("the subscription form does not ask to accept the privacy policy") + } + if code, html, _ := visit("POST", "/"+slug+"/subscribe", "email=not-an-address&accept=1"); code != http.StatusUnprocessableEntity { t.Errorf("subscribing an invalid address = %d %.200s", code, html) } - if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=Visitor@Example.test"); code != 200 { + visitor = "198.51.100.9:1234" // (not to use up the subscription requests of the first) + if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=visitor@example.test"); code != http.StatusUnprocessableEntity { + t.Errorf("subscribing without accepting the privacy policy = %d, want 422", code) + } + visitor = "198.51.100.7:1234" + if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=Visitor@Example.test&accept=1"); code != 200 { t.Fatalf("subscribe = %d", code) } if c, p := subscribers(); c != 0 || p != 1 { @@ -134,7 +149,7 @@ func TestStatusPageSubscriptions(t *testing.T) { t.Errorf("subscribers after confirming = %d, %d; want 1, 0", c, p) } // Asking again for a confirmed address mails nothing. - visit("POST", "/"+slug+"/subscribe", "email=visitor@example.test") + visit("POST", "/"+slug+"/subscribe", "email=visitor@example.test&accept=1") if n := len(mailsTo("visitor@example.test")); n != 1 { t.Errorf("mails after subscribing a confirmed address again = %d, want 1", n) } @@ -199,10 +214,10 @@ func TestStatusPageSubscriptions(t *testing.T) { }); err != nil { t.Fatal(err) } - if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=second@example.test"); code != 200 { + if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=second@example.test&accept=1"); code != 200 { t.Errorf("subscription within the weekly limit = %d", code) } - if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=third@example.test"); code != http.StatusTooManyRequests { + if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=third@example.test&accept=1"); code != http.StatusTooManyRequests { t.Errorf("subscription beyond the weekly limit = %d, want 429", code) } if n := len(mailsTo("third@example.test")); n != 0 { @@ -218,13 +233,13 @@ func TestStatusPageSubscriptions(t *testing.T) { if code, html, _ := visit("GET", "/"+slug, ""); code != 200 || strings.Contains(html, "/subscribe\"") { t.Errorf("page without subscriptions = %d, still offers the form", code) } - if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=fourth@example.test"); code != http.StatusNotFound { + if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=fourth@example.test&accept=1"); code != http.StatusNotFound { t.Errorf("subscribing where it is off = %d, want 404", code) } // This visitor used up its subscription requests on the server. visitor = "198.51.100.7:1234" - if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=fifth@example.test"); code != http.StatusTooManyRequests { + if code, _, _ := visit("POST", "/"+slug+"/subscribe", "email=fifth@example.test&accept=1"); code != http.StatusTooManyRequests { t.Errorf("sixth subscription request of a visitor = %d, want 429", code) } diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index 9e84ecb..d521855 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -519,6 +519,7 @@ "email.domain_missing.subject": "Der DNS-Eintrag von {{.Domain}} fehlt", "email.domain_off.body": "Der DNS-Eintrag von {{.Domain}} fehlt seit einer Woche, deshalb wird die Statusseite {{.Page}} dort nicht mehr ausgeliefert.\n\nStelle den Eintrag wieder her und prüfe die Domain erneut:\n{{.Link}}", "email.domain_off.subject": "{{.Domain}} wurde abgeschaltet", + "email.monitor_link": "In UptimeSebi öffnen: {{.Link}}", "email.opened.body": "{{.Monitor}} ({{.Target}}) ist in allen Regionen nicht erreichbar seit {{.Since}}.\n\nLetzte Fehler:\n{{.Cause}}\n\nDu erhältst diese Nachricht, weil ein Benachrichtigungskanal deiner Organisation diese Adresse nutzt.", "email.opened.subject": "[DOWN] {{.Monitor}}", "email.region_back.body": "Region {{.Region}} hat wieder einen aktiven Checker; seit {{.Since}} hatte sie keinen. Überfällige Prüfungen laufen sofort.\n\n{{.Link}}", @@ -571,6 +572,7 @@ "error.invalid_credentials": "E-Mail oder Passwort falsch.", "error.invalid_cursor": "Dieser Seitenlink ist ungültig; beginne bei der ersten Seite.", "error.invalid_domain": "Eine der Domains ist ungültig.", + "error.consent_required": "Bitte stimme den Bedingungen zu, um zu abonnieren.", "error.invalid_email": "Bitte eine gültige E-Mail-Adresse eingeben.", "error.invalid_expect_status": "Erwartete Statuscodes müssen Codes wie 200 oder Klassen wie 2xx sein.", "error.invalid_grace": "Die Toleranz muss zwischen 0 Sekunden und einem Tag liegen.", @@ -1573,6 +1575,10 @@ "page.subscribe.email": "E-Mail-Adresse", "page.subscribe.submit": "Abonnieren", "page.subscribe.privacy": "Deine Adresse wird nur für diese E-Mails verwendet. Jede E-Mail enthält einen Link zum Abmelden.", + "page.subscribe.accept_both": "Ich akzeptiere die AGB und habe die Datenschutzerklärung gelesen:", + "page.subscribe.accept_terms": "Ich akzeptiere die AGB:", + "page.subscribe.accept_privacy": "Ich habe die Datenschutzerklärung gelesen:", + "page.subscribe.accept_required": "Bitte stimme den Bedingungen zu, um zu abonnieren.", "page.subscribe.sent_title": "Schau in dein Postfach", "page.subscribe.sent": "Wenn die Adresse abonniert werden kann, ist ein Link zum Bestätigen unterwegs. Er ist 48 Stunden gültig.", "page.subscribe.invalid": "Das ist keine gültige E-Mail-Adresse.", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index 785dd17..d3c047d 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -519,6 +519,7 @@ "email.domain_missing.subject": "The DNS record of {{.Domain}} is gone", "email.domain_off.body": "The DNS record of {{.Domain}} has been missing for a week, so the status page {{.Page}} is no longer served there.\n\nRestore the record and verify the domain again:\n{{.Link}}", "email.domain_off.subject": "{{.Domain}} has been switched off", + "email.monitor_link": "Open in UptimeSebi: {{.Link}}", "email.opened.body": "{{.Monitor}} ({{.Target}}) is down in all of its regions since {{.Since}}.\n\nLast errors:\n{{.Cause}}\n\nYou receive this because a notification channel of your organization is set up for this address.", "email.opened.subject": "[DOWN] {{.Monitor}}", "email.region_back.body": "Region {{.Region}} has an active checker again; it had none since {{.Since}}. Overdue checks run right away.\n\n{{.Link}}", @@ -571,6 +572,7 @@ "error.invalid_credentials": "Wrong email or password.", "error.invalid_cursor": "This page link is invalid; start from the first page.", "error.invalid_domain": "One of the domains is not valid.", + "error.consent_required": "Please accept the terms to subscribe.", "error.invalid_email": "Please enter a valid email address.", "error.invalid_expect_status": "Expected status codes must be codes like 200 or classes like 2xx.", "error.invalid_grace": "The grace period must be between 0 seconds and one day.", @@ -1573,6 +1575,10 @@ "page.subscribe.email": "Email address", "page.subscribe.submit": "Subscribe", "page.subscribe.privacy": "Your address is used for these emails only. Every email contains a link to unsubscribe.", + "page.subscribe.accept_both": "I accept the terms of service and have read the privacy policy:", + "page.subscribe.accept_terms": "I accept the terms of service:", + "page.subscribe.accept_privacy": "I have read the privacy policy:", + "page.subscribe.accept_required": "Please accept the terms to subscribe.", "page.subscribe.sent_title": "Check your inbox", "page.subscribe.sent": "If the address can be subscribed, a link to confirm it is on its way. The link is valid for 48 hours.", "page.subscribe.invalid": "That is not a valid email address.", diff --git a/internal/notify/notify.go b/internal/notify/notify.go index d1b85a9..54100f1 100644 --- a/internal/notify/notify.go +++ b/internal/notify/notify.go @@ -55,6 +55,9 @@ type Event struct { ResolvedAt *time.Time `json:"resolved_at,omitempty"` Cause map[string]string `json:"cause,omitempty"` Monitor Monitor `json:"monitor"` + // RegionNames names the regions Cause has by id, for messages to + // people. + RegionNames map[string]string `json:"-"` } // Webhook signs requests so receivers can verify they came from us: the diff --git a/internal/statuspage/public.go b/internal/statuspage/public.go index 3570fb9..35bcf6b 100644 --- a/internal/statuspage/public.go +++ b/internal/statuspage/public.go @@ -367,10 +367,12 @@ func (s *Server) serveSubscription(c *gin.Context, e entry, kind routeKind, host switch { case kind == routeSubscribe && c.Request.Method != http.MethodPost: c.Redirect(http.StatusSeeOther, base+"#subscribe") + case kind == routeSubscribe && c.PostForm("accept") == "" && len(web.SubscribeConsent(snap, base)) > 0: + notice(http.StatusUnprocessableEntity, i18n.T(ctx, "page.subscribe.title"), i18n.T(ctx, "page.subscribe.accept_required"), nil) case kind == routeSubscribe: err := subs.Subscribe(ctx, agentapi.SubscribeRequest{ Host: host, Slug: slug, Email: c.PostForm("email"), IP: c.ClientIP(), - Locale: c.GetHeader("Accept-Language"), PageURL: pageURL(c, base), + Locale: c.GetHeader("Accept-Language"), PageURL: pageURL(c, base), Accepted: true, }) switch { case err == nil: diff --git a/internal/store/incidents.sql.go b/internal/store/incidents.sql.go index 1adc2af..122d647 100644 --- a/internal/store/incidents.sql.go +++ b/internal/store/incidents.sql.go @@ -578,7 +578,10 @@ const notificationDetails = `-- name: NotificationDetails :many SELECT n.id, n.org_id, n.event, n.attempts, c.type AS channel_type, c.config AS channel_config, c.id AS channel_id, i.id AS incident_id, i.started_at, i.resolved_at, i.cause, - m.id AS monitor_id, m.name AS monitor_name, m.target AS monitor_target, m.type AS monitor_type + m.id AS monitor_id, m.name AS monitor_name, m.target AS monitor_target, m.type AS monitor_type, + -- The names of the regions the cause names by id. + coalesce((SELECT jsonb_object_agg(r.id::text, r.name) FROM regions r + WHERE jsonb_typeof(i.cause) = 'object' AND i.cause ? r.id::text), '{}')::jsonb AS region_names FROM notifications n JOIN notification_channels c ON c.id = n.channel_id JOIN incidents i ON i.id = n.incident_id @@ -602,6 +605,7 @@ type NotificationDetailsRow struct { MonitorName string MonitorTarget string MonitorType string + RegionNames []byte } // System scope. @@ -630,6 +634,7 @@ func (q *Queries) NotificationDetails(ctx context.Context, ids []uuid.UUID) ([]N &i.MonitorName, &i.MonitorTarget, &i.MonitorType, + &i.RegionNames, ); err != nil { return nil, err } diff --git a/internal/store/queries/incidents.sql b/internal/store/queries/incidents.sql index a27c945..a149f72 100644 --- a/internal/store/queries/incidents.sql +++ b/internal/store/queries/incidents.sql @@ -47,7 +47,10 @@ RETURNING id; SELECT n.id, n.org_id, n.event, n.attempts, c.type AS channel_type, c.config AS channel_config, c.id AS channel_id, i.id AS incident_id, i.started_at, i.resolved_at, i.cause, - m.id AS monitor_id, m.name AS monitor_name, m.target AS monitor_target, m.type AS monitor_type + m.id AS monitor_id, m.name AS monitor_name, m.target AS monitor_target, m.type AS monitor_type, + -- The names of the regions the cause names by id. + coalesce((SELECT jsonb_object_agg(r.id::text, r.name) FROM regions r + WHERE jsonb_typeof(i.cause) = 'object' AND i.cause ? r.id::text), '{}')::jsonb AS region_names FROM notifications n JOIN notification_channels c ON c.id = n.channel_id JOIN incidents i ON i.id = n.incident_id diff --git a/internal/web/legal.go b/internal/web/legal.go index f3ee22a..12e66b5 100644 --- a/internal/web/legal.go +++ b/internal/web/legal.go @@ -2,6 +2,7 @@ package web import ( "bytes" + "slices" "github.com/yuin/goldmark" "github.com/yuin/goldmark/ast" @@ -80,7 +81,30 @@ func LegalLinks(docs []agentapi.LegalDoc, base string) []LegalLink { return out } -// PageLegalLinks returns the legal links of a status page. +// PageLegalLinks returns the legal links of a status page's footer. The +// terms are not among them: visitors accept them only when subscribing. func PageLegalLinks(s agentapi.PageSnapshot, base string) []LegalLink { - return LegalLinks(s.Legal, base) + return slices.DeleteFunc(LegalLinks(s.Legal, base), func(l LegalLink) bool { return l.Kind == "terms" }) +} + +// SubscribeConsent returns the documents a visitor of a status page +// accepts by subscribing: the terms and the privacy policy, where set. +func SubscribeConsent(s agentapi.PageSnapshot, base string) []LegalLink { + return slices.DeleteFunc(LegalLinks(s.Legal, base), func(l LegalLink) bool { return l.Kind == "imprint" }) +} + +// ConsentLabelID names the message of the subscription checkbox for links. +func ConsentLabelID(links []LegalLink) string { + var terms, privacy bool + for _, l := range links { + terms = terms || l.Kind == "terms" + privacy = privacy || l.Kind == "privacy" + } + switch { + case terms && privacy: + return "page.subscribe.accept_both" + case terms: + return "page.subscribe.accept_terms" + } + return "page.subscribe.accept_privacy" } diff --git a/internal/web/public.templ b/internal/web/public.templ index d340ee8..86b3a82 100644 --- a/internal/web/public.templ +++ b/internal/web/public.templ @@ -114,10 +114,26 @@ templ publicSubscribe(s agentapi.PageSnapshot, a PublicAssets) {

{ i18n.T(ctx, "page.subscribe.title") }

{ i18n.T(ctx, "page.subscribe.intro") }

-
- - - + +
+ + + +
+ if consent := SubscribeConsent(s, a.LegalBase); len(consent) > 0 { + + }

{ i18n.T(ctx, "page.subscribe.privacy") }

diff --git a/internal/web/public_templ.go b/internal/web/public_templ.go index c0d107e..112e1a6 100644 --- a/internal/web/public_templ.go +++ b/internal/web/public_templ.go @@ -562,14 +562,14 @@ func publicSubscribe(s agentapi.PageSnapshot, a PublicAssets) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 42, "\" class=\"flex max-w-md flex-wrap gap-2\">