Adds configuration options and environment variables to manage box owner policies, including settings for refresh counts and expiry.
111 lines
4.4 KiB
HTML
111 lines
4.4 KiB
HTML
{{ define "account_head_assets" }}
|
|
<link rel="icon" type="image/png" href="/static/WarpBoxLogo.png">
|
|
<link rel="stylesheet" href="/static/css/account.css">
|
|
{{ end }}
|
|
|
|
{{ define "account_shell_start" }}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{ if .PageTitle }}{{ .PageTitle }}{{ else }}WarpBox Account{{ end }}</title>
|
|
{{ template "account_head_assets" . }}
|
|
</head>
|
|
<body class="account-body">
|
|
<div class="app-shell">
|
|
<div class="app-frame">
|
|
{{ template "account_taskbar" . }}
|
|
{{ end }}
|
|
|
|
{{ define "account_shell_end" }}
|
|
</div>
|
|
</div>
|
|
{{ template "account_toast_modal_containers" . }}
|
|
<script src="/static/js/account-ui.js"></script>
|
|
{{ range .PageScripts }}
|
|
<script src="{{ . }}"></script>
|
|
{{ end }}
|
|
</body>
|
|
</html>
|
|
{{ end }}
|
|
|
|
{{ define "account_taskbar" }}
|
|
{{ $nav := .AccountNav }}
|
|
<header class="top-taskbar" aria-label="Account navigation">
|
|
<a class="start-button" href="/account">
|
|
<span class="start-logo">W</span>
|
|
<span>WarpBox</span>
|
|
</a>
|
|
|
|
<nav class="taskbar-nav" aria-label="Primary">
|
|
<a class="taskbar-button{{ if eq $nav.ActiveSection "dashboard" }} is-active{{ end }}" href="/account">Dashboard</a>
|
|
{{ if $nav.CanViewBoxes }}
|
|
<a class="taskbar-button{{ if eq $nav.ActiveSection "boxes" }} is-active{{ end }}" href="/account/boxes">Boxes</a>
|
|
{{ end }}
|
|
{{ if $nav.CanViewAlerts }}
|
|
<a class="taskbar-button{{ if eq $nav.ActiveSection "alerts" }} is-active{{ end }}" href="/account/alerts">Alerts</a>
|
|
{{ end }}
|
|
{{ if $nav.CanViewUsers }}
|
|
<a class="taskbar-button{{ if eq $nav.ActiveSection "users" }} is-active{{ end }}" href="/account/users">Users</a>
|
|
{{ end }}
|
|
{{ if $nav.CanViewAPIKeys }}
|
|
<a class="taskbar-button{{ if eq $nav.ActiveSection "api-keys" }} is-active{{ end }}" href="/account/api-keys">API Keys</a>
|
|
{{ end }}
|
|
{{ if $nav.CanViewSettings }}
|
|
<a class="taskbar-button{{ if eq $nav.ActiveSection "settings" }} is-active{{ end }}" href="/account/settings">Settings</a>
|
|
{{ end }}
|
|
</nav>
|
|
|
|
<div class="taskbar-session" aria-label="Current session summary">
|
|
{{ if gt $nav.AlertCount 0 }}
|
|
<a class="alert-chip is-{{ $nav.AlertSeverity }}" href="/account/alerts">! {{ $nav.AlertCount }} alerts</a>
|
|
{{ else }}
|
|
<span class="alert-chip is-ok">0 alerts</span>
|
|
{{ end }}
|
|
<span class="session-chip">signed in: {{ $nav.Username }}</span>
|
|
{{ if $nav.IsAdmin }}
|
|
<span class="session-chip">admin</span>
|
|
{{ else }}
|
|
<span class="session-chip">account</span>
|
|
{{ end }}
|
|
<span class="dirty-chip" data-dirty-chip></span>
|
|
</div>
|
|
</header>
|
|
{{ end }}
|
|
|
|
{{ define "account_window_titlebar" }}
|
|
<div class="win98-titlebar">
|
|
<div class="win98-titlebar-label">
|
|
<span class="win98-titlebar-icon">{{ if .WindowIcon }}{{ .WindowIcon }}{{ else }}W{{ end }}</span>
|
|
<h1>{{ if .WindowTitle }}{{ .WindowTitle }}{{ else }}WarpBox Account Control Panel{{ end }}</h1>
|
|
</div>
|
|
<div class="win98-window-controls" aria-hidden="true">
|
|
<button class="win98-control" type="button">_</button>
|
|
<button class="win98-control" type="button">[]</button>
|
|
<button class="win98-control" type="button">x</button>
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ define "account_csrf_field" }}
|
|
<input type="hidden" name="csrf_token" value="{{ .CSRFToken }}">
|
|
{{ end }}
|
|
|
|
{{ define "account_toast_modal_containers" }}
|
|
<div class="toast" id="account-toast" role="status" aria-live="polite"></div>
|
|
<div class="modal-backdrop" id="account-modal-backdrop" aria-hidden="true"></div>
|
|
<section class="account-modal win98-window" id="account-modal" role="dialog" aria-modal="true" aria-labelledby="account-modal-title">
|
|
<div class="win98-titlebar">
|
|
<div class="win98-titlebar-label">
|
|
<span class="win98-titlebar-icon">W</span>
|
|
<h2 id="account-modal-title">WarpBox</h2>
|
|
</div>
|
|
<div class="win98-window-controls">
|
|
<button class="win98-control" type="button" data-modal-close aria-label="Close">x</button>
|
|
</div>
|
|
</div>
|
|
<div class="modal-body sunken-panel" id="account-modal-body"></div>
|
|
</section>
|
|
{{ end }}
|