Redesign the dashboard and sign-in page with the Lightwell design language
CI / test (push) Successful in 2m27s
CI / test (push) Successful in 2m27s
Warm neutrals, teal accent, 15px type, and Lightwell's component shapes. Status is a badge with text instead of a colored dot. Every destructive action asks first, naming the object and what is lost. Dialogs trap focus, close on Escape and return focus. The sidebar is a drawer on phones, there is a theme switch, loading shows skeleton rows, and empty states explain what belongs there. Emoji and dashes are gone, and server errors are capitalized and tell visitors what to do next. Adds scripts/lint-design.mjs and docs/design.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2b7cb5dd35
commit
d74e6c1e72
7 files changed
+536
-253
No files matched your search
@@ -18,6 +18,8 @@ import (
|
||||
|
||||
"git.veillax.com/Veillax/hammerhead/internal/secretbox"
|
||||
"git.veillax.com/Veillax/reef/model"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
type Org struct {
|
||||
@@ -433,8 +435,13 @@ func writeJSON(w http.ResponseWriter, code int, v any) {
|
||||
json.NewEncoder(w).Encode(v)
|
||||
}
|
||||
|
||||
// fail sends an error to the browser. Messages are shown to people, so they start with a capital letter.
|
||||
func fail(w http.ResponseWriter, code int, err error) {
|
||||
writeJSON(w, code, map[string]string{"error": err.Error()})
|
||||
msg := err.Error()
|
||||
if r, n := utf8.DecodeRuneInString(msg); n > 0 {
|
||||
msg = string(unicode.ToUpper(r)) + msg[n:]
|
||||
}
|
||||
writeJSON(w, code, map[string]string{"error": msg})
|
||||
}
|
||||
|
||||
func failf(w http.ResponseWriter, code int, format string, a ...any) {
|
||||
|
||||
Reference in new issue
Block a user