- Replace gorilla/csrf with net/http CrossOriginProtection - Require valkey-password and add TLS options for session store - End session at /logout and revoke refresh tokens - Re-derive identity and roles from provider every five minutes - Process each Stripe webhook event in its own Temporal workflow - Give each outbox entry its own workflow with Temporal retries - Guard against stale Stripe events with provider timestamps - Derive transport security from base-url scheme
166 lines
7.3 KiB
HTML
166 lines
7.3 KiB
HTML
{{- /* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial */ -}}
|
|
{{- /* SPDX-FileCopyrightText: 2025-2026 Christian Galo */ -}}
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<title>{{ deploymentName }}</title>
|
|
<meta name="description" content="Console for {{ deploymentName }} members">
|
|
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta property="og:title" content="{{ deploymentName }}">
|
|
<meta property="og:description" content="Console for {{ deploymentName }} members">
|
|
<meta property="og:image" content="/static/apple-touch-icon.png">
|
|
<meta property="og:url" content="/index.html">
|
|
<meta property="og:site_name" content="{{ deploymentName }}">
|
|
|
|
<meta name="htmx-config" content='{"includeIndicatorCSS": false, "noSwap": [204, 304, 403, "5xx"], "defaultSettleDelay": 0}'>
|
|
<link href="/static/bootstrap.css" rel="stylesheet">
|
|
<script defer src="/static/bootstrap.bundle.js"></script>
|
|
<script defer src="/static/shell.js"></script>
|
|
<script defer src="/static/htmx.min.js"></script>
|
|
<script defer src="/static/error-handler.js"></script>
|
|
<script defer src="/static/success-toast.js"></script>
|
|
<script defer src="/static/confirm-action-modal.js"></script>
|
|
<script defer src="/static/help-init.js"></script>
|
|
{{/* Integration dashboard-card scripts: page-level deferred external
|
|
tags only; CSP forbids inline scripts, and script tags inside
|
|
HTMX-swapped fragments have unreliable execution order. */}}
|
|
{{ range .DashboardCards }}{{ range .Scripts }}
|
|
<script defer src="{{ . }}"></script>{{ end }}{{ end }}
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png">
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png">
|
|
<link rel="manifest" href="/static/site.webmanifest">
|
|
|
|
<link href="/static/app.css" rel="stylesheet">
|
|
</head>
|
|
|
|
<body class="d-flex flex-column vh-100">
|
|
{{ template "shell_topbar.html" .Shell }}
|
|
|
|
<div class="d-flex flex-column flex-lg-row flex-grow-1">
|
|
{{ template "shell_rail_member.html" .Shell }}
|
|
|
|
<!-- Main Content (page-anatomy "Every page has one main landmark") -->
|
|
<main id="member-main" class="flex-fill p-4">
|
|
<div class="container-xxl px-0">
|
|
{{ template "pageHeader" .Header }}
|
|
{{ if eq .CheckoutStatus "success" }}
|
|
<div class="alert alert-success" role="alert">
|
|
<strong>Thanks!</strong> We're finalizing your upgrade; this can take a moment.
|
|
<a href="/products">View your plan on the Products page</a>.
|
|
</div>
|
|
{{ else if eq .CheckoutStatus "cancel" }}
|
|
<div class="alert alert-secondary" role="alert">
|
|
Checkout canceled. Your current plan is unchanged.
|
|
</div>
|
|
{{ end }}
|
|
{{/* Pending domain claims (dissolve-member-domains): the durable
|
|
re-entry point for an in-flight DNS verification now that the
|
|
standalone Domains page is gone. Server-side conditional: no
|
|
empty chrome when there is nothing pending. Opening a claim swaps
|
|
the claim-status partial into this same .domains-surface wrapper;
|
|
reopening mints nothing (pure read). */}}
|
|
{{ if .PendingDomainClaims }}
|
|
<div class="alert alert-info mt-3 domains-surface" role="status">
|
|
<strong>Domain verification in progress.</strong>
|
|
{{ range .PendingDomainClaims }}
|
|
<div class="d-flex align-items-center gap-2 mt-1">
|
|
<code class="text-break">{{ .Root }}</code>
|
|
<button type="button" class="btn btn-link btn-sm p-0 align-baseline"
|
|
hx-get="{{ routeURL "/partials/domains/claims/{claimID}" .ClaimID }}"
|
|
hx-target="closest .domains-surface" hx-swap="innerHTML">View DNS records</button>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
{{ template "sectionHeader" .AccountHeader }}
|
|
<div class="card mb-3">
|
|
<div class="card-body">
|
|
<dl class="row mb-0">
|
|
<dt class="col-sm-3">Name</dt>
|
|
<dd class="col-sm-9">{{ .Name }}</dd>
|
|
<dt class="col-sm-3">Username</dt>
|
|
<dd class="col-sm-9">{{ .Username }}</dd>
|
|
<dt class="col-sm-3">Email</dt>
|
|
<dd class="col-sm-9 mb-0">{{ .Email }}</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Workspace Management Section (progressive disclosure). Titled
|
|
here so the heading survives the list/create-form swaps inside
|
|
#workspaceContent. -->
|
|
{{ if .HasMultipleWorkspaces }}
|
|
<div id="workspace-management">
|
|
{{ template "sectionHeader" .WorkspacesHeader }}
|
|
<!-- Composed on the server from /partials/workspaces (page-anatomy
|
|
"A page arrives complete"); the id stays the swap target for
|
|
the create and switch actions. -->
|
|
<div id="workspaceContent">{{ .Workspaces }}</div>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{/* The dashboard's one empty state (member-dashboard ADDED
|
|
requirement "The dashboard has one empty state"; design D25):
|
|
when no integration declared a card AND the org holds no
|
|
entitlement, one emptyState renders in place of the cards
|
|
section; otherwise nothing changes. */}}
|
|
{{ if .IsEmpty }}
|
|
{{ template "emptyState" .Empty }}
|
|
{{ else }}
|
|
{{/* Integration dashboard cards: one generic shell per declaration
|
|
collected from the integration registry (registry order). The
|
|
body is integration-owned: the server composes it from the
|
|
declared partial route; core renders no integration markup. */}}
|
|
{{ range .DashboardCards }}
|
|
{{ template "sectionHeader" .Header }}
|
|
{{ if .Description }}<p class="text-body-secondary mb-2">{{ .Description }}</p>{{ end }}
|
|
<div class="card mb-3">
|
|
<div class="card-body">
|
|
<!-- The body is composed on the server from the declared partial
|
|
route (page-anatomy "A page arrives complete"); the route
|
|
stays the swap source for the card's refresh event. -->
|
|
{{ if .RefreshEvent }}<div hx-get="{{ .PartialPath }}" hx-trigger="{{ .RefreshEvent }} from:body" hx-swap="innerHTML">{{ .Body }}</div>{{ else }}<div>{{ .Body }}</div>{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
</main>
|
|
</div>
|
|
|
|
<!-- Toast Container -->
|
|
<div class="toast-container">
|
|
<div id="errorToast" class="toast align-items-center text-bg-danger border-0" role="alert" aria-live="assertive"
|
|
aria-atomic="true">
|
|
<div class="d-flex">
|
|
<div class="toast-body" id="errorToastBody">
|
|
An error occurred. Try again.
|
|
</div>
|
|
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast"
|
|
aria-label="Close"></button>
|
|
</div>
|
|
</div>
|
|
<div id="successToast" class="toast align-items-center text-bg-success border-0" role="status" aria-live="polite"
|
|
aria-atomic="true">
|
|
<div class="d-flex">
|
|
<div class="toast-body" id="successToastBody">
|
|
Done.
|
|
</div>
|
|
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast"
|
|
aria-label="Close"></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{ template "shell_confirm_modal.html" . }}
|
|
|
|
</body>
|
|
|
|
</html> |