Single embedded HTML page that reads the daily summary and activities endpoints with a user-supplied API key: goals, totals by kind, top labels and a timeline for the selected day. Co-Authored-By: Claude Opus 5.5 <[email protected]>
17 lines
356 B
Go
17 lines
356 B
Go
// Package web serves the dashboard, a single static page that reads the
|
|
// /api/v1 query endpoints with an API key the viewer enters.
|
|
package web
|
|
|
|
import (
|
|
_ "embed"
|
|
"net/http"
|
|
)
|
|
|
|
//go:embed index.html
|
|
var index []byte
|
|
|
|
func Handler(w http.ResponseWriter, r *http.Request) {
|
|
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
|
w.Write(index)
|
|
}
|