Documentation
¶
Overview ¶
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
templ: version: v0.3.1001
Index ¶
- func EyeLogo(state string, sizePx int) templ.Component
- func InboundCard(s inbound.Status) templ.Component
- func InboundCardList(items []inbound.Status) templ.Component
- func Modal(name, title string) templ.Component
- func ModalsStore() templ.Component
- func StatChip(label, phase string) templ.Component
- func WGTable(rows []WGRow) templ.Component
- type WGRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EyeLogo ¶
EyeLogo is the animated brand mark — an almond-shaped eye with a pupil that dilates between three states. Mirrors the Android client's `design/GoloomEye.kt`. The state is bound via Alpine: replace `state` with an x-data expression at the call-site if it should react live (e.g. SSE flips the connection status).
States:
"idle" - relaxed eye, slow blink loop "connecting" - pulsing pupil, eyebrow tightens "on" - fully open, accent-coloured iris
func InboundCard ¶
InboundCard renders one inbound row on the dashboard. Plain DOM node: refreshes via SSE replacing the whole InboundCardList wrapper, or per-card htmx targeted swap via #inbound-card-<id>. Action buttons hit the JSON API endpoints from the original admin server, then trigger a targeted refresh.
func InboundCardList ¶
InboundCardList is the wrapper that holds all card elements; SSE "inbounds" event replaces this whole node so newly created / removed inbounds appear without a page refresh.
func Modal ¶
Modal is a generic Alpine-driven dialog. Show/hide by toggling `Alpine.store('modals').<name>` boolean, e.g.:
<button @click="$store.modals.account = true">Аккаунт</button>
@components.Modal("account", "Сменить пароль") { ... }
Backdrop click closes; Esc closes; focus trap is handled by Alpine where `x-trap.inert` is supported, otherwise it's a soft trap.
func ModalsStore ¶
ModalsStore registers the Alpine store the Modal component reads from. Drop one of these once per page (typically in Layout-level children) so all modals share state cleanly.