diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 19b7cfe..7e770fd 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -225,7 +225,8 @@ Security is a first-class concern; we run a strict CSP and gate CI on vuln scans a ` - - - +{{template "map-styles"}} +{{template "map-scripts"}} diff --git a/internal/core/templates/config_region_area.html b/internal/core/templates/config_region_area.html index c1efe50..5c1de21 100644 --- a/internal/core/templates/config_region_area.html +++ b/internal/core/templates/config_region_area.html @@ -30,8 +30,7 @@ {{end}} - - +{{template "map-styles"}}
@@ -55,9 +54,10 @@

- Draw with the tools at the top-left of the map. A region needs an area - before it applies to anything — until then it's a draft and no repeater - picks it up. + Draw with the tools at the top-right of the map: click each corner, then + close the outline by clicking the first corner again or pressing Enter. + A region needs an area before it applies to anything — until then it's a + draft and no repeater picks it up.

{{if .Siblings}}

@@ -79,9 +79,8 @@

- - - +{{template "map-scripts"}} +{{template "map-draw-scripts"}} {{/* Values are interpolated in a JS context, so html/template JSON-encodes and escapes them — the region names and shapes are user data. */}} diff --git a/internal/core/templates/console.html b/internal/core/templates/console.html index 1077310..11c0d18 100644 --- a/internal/core/templates/console.html +++ b/internal/core/templates/console.html @@ -148,9 +148,8 @@ swap needs no new markup. The flex row is nested so the [hidden] attribute wins {{if .ShowConfig}} - - - +{{template "map-styles"}} +{{template "map-scripts"}} {{end}} diff --git a/internal/core/templates/dashboard.html b/internal/core/templates/dashboard.html index d801eae..e12d566 100644 --- a/internal/core/templates/dashboard.html +++ b/internal/core/templates/dashboard.html @@ -126,10 +126,9 @@

Repeater map

{{if .Mapped}}
- + {{template "map-styles"}}
- - + {{template "map-scripts"}} - + {{template "map-scripts"}} - + {{template "map-scripts"}} - + {{template "map-scripts"}} + +{{end}} + +{{define "map-draw-scripts"}} + + +{{end}} diff --git a/internal/web/templates/org_config.html b/internal/web/templates/org_config.html index 7fd128c..9dbe582 100644 --- a/internal/web/templates/org_config.html +++ b/internal/web/templates/org_config.html @@ -130,11 +130,10 @@
{{if .Config.HasRegionShapes}} - + {{template "map-styles"}}
- - + {{template "map-scripts"}} {{/* Region names and shapes are user data, interpolated in a JS context so html/template JSON-encodes and escapes them. */}} diff --git a/internal/web/templates/org_public.html b/internal/web/templates/org_public.html index 9ab3fbe..3957ecd 100644 --- a/internal/web/templates/org_public.html +++ b/internal/web/templates/org_public.html @@ -66,12 +66,9 @@

Repeaters

{{if .HasMap}}
- - + {{template "map-styles"}}
- - - + {{template "map-scripts"}} - - + {{template "map-scripts"}}