generated from eblume/project-template
All checks were successful
Build / validate (pull_request) Successful in 6m31s
Replace the manual bearer-token paste with a proper browser OIDC sign-in.
- Hub: unauthenticated GET /config -> {issuer, client_id} (added after the auth
layer), sourced from the verifier's new TokenVerifier::oidc_config(). Lets the
PWA self-configure when served from the hub. Tests in web_serve.rs.
- PWA: src/oauth.js implements PKCE (S256), the authorize redirect, the callback
token exchange, and silent refresh (offline_access). Settings gains a "Login
with Authentik" button (manual token kept under a fallback disclosure); rpc.js
retries once on 401 via a refresh hook; app.js completes the callback / refreshes
on load; sw.js skips caching the callback URL and ships oauth.js in the shell.
Requires the PWA origin registered as a redirect URI on the Authentik provider.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
524 lines
8.9 KiB
CSS
524 lines
8.9 KiB
CSS
/* heph-pwa — a dark, terminal-flavored mirror of heph-tui, tuned for touch. */
|
|
|
|
:root {
|
|
--bg: #15181d;
|
|
--bg-elev: #1c2027;
|
|
--bg-row: #1a1e24;
|
|
--border: #2a2f38;
|
|
--fg: #e6e9ef;
|
|
--fg-dim: #8b94a3;
|
|
--accent: #6db3f2;
|
|
--att-red: #ff6b6b;
|
|
--att-orange: #ffb454;
|
|
--att-blue: #6db3f2;
|
|
--att-white: #e6e9ef;
|
|
--bullet-none: #5a6373;
|
|
--danger: #ff6b6b;
|
|
--safe-top: env(safe-area-inset-top, 0px);
|
|
--safe-bottom: env(safe-area-inset-bottom, 0px);
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
height: 100%;
|
|
background: var(--bg);
|
|
color: var(--fg);
|
|
font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
|
|
overscroll-behavior-y: none;
|
|
}
|
|
|
|
#app {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
}
|
|
|
|
/* --- App bar --- */
|
|
.appbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: calc(var(--safe-top) + 6px) 8px 6px;
|
|
background: var(--bg-elev);
|
|
border-bottom: 1px solid var(--border);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 5;
|
|
}
|
|
.appbar-title {
|
|
flex: 1;
|
|
font-weight: 600;
|
|
font-size: 18px;
|
|
padding-left: 4px;
|
|
}
|
|
.icon-btn {
|
|
background: none;
|
|
border: 0;
|
|
color: var(--fg);
|
|
font-size: 20px;
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: 8px;
|
|
}
|
|
.icon-btn:active {
|
|
background: var(--bg-row);
|
|
}
|
|
|
|
/* --- Main / list --- */
|
|
#main {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
padding-bottom: calc(var(--safe-bottom) + 96px);
|
|
}
|
|
.notice {
|
|
padding: 32px 20px;
|
|
text-align: center;
|
|
color: var(--fg-dim);
|
|
}
|
|
.notice.error {
|
|
color: var(--att-orange);
|
|
}
|
|
|
|
.list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.row {
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.row-head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 12px 14px;
|
|
min-height: 28px;
|
|
}
|
|
.row.expanded {
|
|
background: var(--bg-row);
|
|
}
|
|
.flag {
|
|
width: 14px;
|
|
text-align: center;
|
|
flex: 0 0 auto;
|
|
}
|
|
.bullet {
|
|
flex: 0 0 auto;
|
|
font-size: 12px;
|
|
}
|
|
.title {
|
|
flex: 1;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.row.expanded .title {
|
|
white-space: normal;
|
|
}
|
|
.recur {
|
|
color: #c678dd;
|
|
flex: 0 0 auto;
|
|
}
|
|
.chip {
|
|
flex: 0 0 auto;
|
|
font-size: 13px;
|
|
color: var(--fg-dim);
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
.chip.overdue {
|
|
color: var(--att-red);
|
|
font-weight: 700;
|
|
}
|
|
|
|
/* --- Task detail --- */
|
|
.detail {
|
|
padding: 4px 14px 14px 36px;
|
|
}
|
|
.meta {
|
|
margin-bottom: 10px;
|
|
font-size: 13px;
|
|
color: var(--fg-dim);
|
|
}
|
|
.meta-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
}
|
|
.meta-k {
|
|
width: 64px;
|
|
flex: 0 0 auto;
|
|
}
|
|
.actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
}
|
|
.act {
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
color: var(--fg);
|
|
border-radius: 8px;
|
|
padding: 8px 10px;
|
|
font-size: 14px;
|
|
}
|
|
.act:active {
|
|
background: var(--border);
|
|
}
|
|
.act.danger {
|
|
color: var(--danger);
|
|
border-color: #4a2a2a;
|
|
}
|
|
.preview {
|
|
margin: 12px 0 0;
|
|
padding: 10px;
|
|
background: #0f1216;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
color: var(--fg-dim);
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
max-height: 240px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
/* --- FAB --- */
|
|
.fab {
|
|
position: fixed;
|
|
right: 18px;
|
|
bottom: calc(var(--safe-bottom) + 18px);
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 30px;
|
|
border: 0;
|
|
background: var(--accent);
|
|
color: #0c1014;
|
|
font-size: 34px;
|
|
line-height: 1;
|
|
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
|
|
z-index: 6;
|
|
}
|
|
.fab:active {
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
/* --- Drawer --- */
|
|
.backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: opacity 0.18s;
|
|
z-index: 9;
|
|
}
|
|
.backdrop.show {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
}
|
|
.drawer {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: 78%;
|
|
max-width: 320px;
|
|
background: var(--bg-elev);
|
|
border-right: 1px solid var(--border);
|
|
transform: translateX(-100%);
|
|
transition: transform 0.2s ease;
|
|
z-index: 10;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.drawer.open {
|
|
transform: translateX(0);
|
|
}
|
|
.drawer-head {
|
|
padding: calc(var(--safe-top) + 16px) 16px 12px;
|
|
font-weight: 700;
|
|
font-size: 20px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.drawer-body {
|
|
overflow-y: auto;
|
|
padding-bottom: var(--safe-bottom);
|
|
}
|
|
.drawer-section {
|
|
padding: 14px 16px 6px;
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
color: var(--fg-dim);
|
|
}
|
|
.drawer-empty {
|
|
padding: 4px 16px 8px;
|
|
color: var(--fg-dim);
|
|
font-size: 14px;
|
|
}
|
|
.drawer-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 12px 16px;
|
|
}
|
|
.drawer-item.active {
|
|
background: var(--bg-row);
|
|
box-shadow: inset 3px 0 0 var(--accent);
|
|
}
|
|
.drawer-item:active {
|
|
background: var(--border);
|
|
}
|
|
|
|
/* --- Modals --- */
|
|
.modal-root {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 20;
|
|
display: none;
|
|
}
|
|
.modal-root.show {
|
|
display: block;
|
|
}
|
|
.modal-backdrop {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.55);
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
padding: calc(var(--safe-top) + 12vh) 12px 12px;
|
|
}
|
|
.modal {
|
|
width: 100%;
|
|
max-width: 560px;
|
|
background: var(--bg-elev);
|
|
border: 1px solid var(--border);
|
|
border-radius: 14px;
|
|
padding: 14px;
|
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
|
|
}
|
|
.modal-title {
|
|
font-weight: 600;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.qa {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
.qa-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
.qa-input,
|
|
.search-input {
|
|
flex: 1;
|
|
width: 100%;
|
|
background: #0f1216;
|
|
border: 1px solid var(--border);
|
|
color: var(--fg);
|
|
border-radius: 10px;
|
|
padding: 13px 12px;
|
|
font-size: 17px; /* ≥16px so iOS doesn't zoom on focus */
|
|
}
|
|
.qa-input:focus,
|
|
.search-input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
.qa-mic {
|
|
flex: 0 0 auto;
|
|
width: 46px;
|
|
height: 46px;
|
|
border-radius: 10px;
|
|
border: 1px solid var(--border);
|
|
background: var(--bg-row);
|
|
font-size: 20px;
|
|
}
|
|
.qa-mic.listening {
|
|
border-color: var(--att-red);
|
|
animation: pulse 1s infinite;
|
|
}
|
|
@keyframes pulse {
|
|
50% {
|
|
background: #3a2326;
|
|
}
|
|
}
|
|
.qa-preview {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
align-items: center;
|
|
min-height: 22px;
|
|
}
|
|
.qa-hint {
|
|
color: var(--fg-dim);
|
|
font-size: 13px;
|
|
}
|
|
.qa-title {
|
|
font-weight: 600;
|
|
}
|
|
.qa-tag {
|
|
font-size: 13px;
|
|
color: var(--fg-dim);
|
|
background: var(--bg-row);
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
padding: 2px 6px;
|
|
}
|
|
.qa-foot {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
}
|
|
.qa-dest {
|
|
color: var(--fg-dim);
|
|
font-size: 13px;
|
|
}
|
|
.qa-add {
|
|
background: var(--accent);
|
|
color: #0c1014;
|
|
border: 0;
|
|
border-radius: 10px;
|
|
padding: 11px 22px;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.picker-list {
|
|
max-height: 50vh;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.picker-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 12px 6px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.picker-item:active {
|
|
background: var(--bg-row);
|
|
}
|
|
|
|
.settings-label {
|
|
font-size: 13px;
|
|
color: var(--fg-dim);
|
|
margin-bottom: -4px;
|
|
}
|
|
.settings-foot {
|
|
justify-content: flex-end;
|
|
}
|
|
.settings-test {
|
|
font-size: 13px;
|
|
min-height: 18px;
|
|
color: var(--fg-dim);
|
|
}
|
|
.settings-test.ok {
|
|
color: #7ec77e;
|
|
}
|
|
.settings-test.bad {
|
|
color: var(--att-red);
|
|
}
|
|
.settings-hint {
|
|
font-size: 12px;
|
|
color: var(--fg-dim);
|
|
}
|
|
.settings-login {
|
|
align-self: stretch;
|
|
}
|
|
.settings-auth {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
.settings-auth .settings-test {
|
|
flex: 1;
|
|
}
|
|
.settings-manual > summary {
|
|
font-size: 13px;
|
|
color: var(--fg-dim);
|
|
cursor: pointer;
|
|
margin-bottom: 6px;
|
|
}
|
|
.settings-manual[open] > summary {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
/* --- Search --- */
|
|
.search-pane {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
}
|
|
.search-bar {
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 10px 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.search-close {
|
|
background: var(--bg-row);
|
|
border: 1px solid var(--border);
|
|
color: var(--fg);
|
|
border-radius: 10px;
|
|
width: 46px;
|
|
font-size: 18px;
|
|
}
|
|
.search-results {
|
|
overflow-y: auto;
|
|
}
|
|
.search-hit {
|
|
display: flex;
|
|
gap: 10px;
|
|
padding: 12px 14px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.hit-kind {
|
|
color: var(--fg-dim);
|
|
font: 13px ui-monospace, monospace;
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
/* --- Toast --- */
|
|
.toast {
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: calc(var(--safe-bottom) + 90px);
|
|
display: flex;
|
|
justify-content: center;
|
|
z-index: 30;
|
|
pointer-events: none;
|
|
padding: 0 12px;
|
|
}
|
|
.toast-body {
|
|
pointer-events: auto;
|
|
background: #2a2f38;
|
|
color: var(--fg);
|
|
border-radius: 10px;
|
|
padding: 11px 14px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
|
|
max-width: 560px;
|
|
}
|
|
.toast-action {
|
|
background: none;
|
|
border: 0;
|
|
color: var(--accent);
|
|
font-weight: 700;
|
|
font-size: 15px;
|
|
}
|