feat(web): add vanilla JS/CSS SPA with embed.FS
Stream view with date grouping, card view sorted by usage, capture bar with client-side grammar parsing, tag rail filter, detail pane with card affordances (template slot fill, checklist toggle, link open), promote modal with auto-detect, keyboard shortcuts (j/k/n/p/ Enter/dd/1/2). Dark theme, responsive layout. Embedded in Go binary.
This commit is contained in:
+7
-1
@@ -3,6 +3,7 @@ package cmd
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
@@ -14,6 +15,8 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var WebFS fs.FS
|
||||
|
||||
var (
|
||||
servePort int
|
||||
serveDev bool
|
||||
@@ -51,7 +54,10 @@ func runServe(_ *cobra.Command, _ []string) error {
|
||||
}
|
||||
defer store.Close()
|
||||
|
||||
router := api.NewRouter(store, serveDev)
|
||||
var router = api.NewRouter(store, serveDev)
|
||||
if WebFS != nil {
|
||||
router = api.NewRouter(store, serveDev, WebFS)
|
||||
}
|
||||
|
||||
addr := fmt.Sprintf(":%d", port)
|
||||
srv := &http.Server{
|
||||
|
||||
Reference in New Issue
Block a user