Satoru
package webui import ( "context" "fmt" "html" "io" "time" "github.com/a-h/templ" "satoru/internal/store" ) func Home(now time.Time, user store.User) templ.Component { return templ.ComponentFunc(func(_ context.Context, w io.Writer) error { role := "Operator" if user.IsAdmin { role = "Admin" } var body string if user.ID == 0 { body = `
Sign in to continue.
` } else { body = fmt.Sprintf(`Signed in as %s (%s).
Current server time: %s
`, html.EscapeString(user.Username), role, now.Format(time.RFC1123)) } _, err := io.WriteString(w, fmt.Sprintf(`Satoru