Dawnline 0.10.0
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions

- Portal redesigned from scratch. No header bar: the page opens with the
  server's name and the person's and fades under the edges. Device cards
  show the status, the last 7 days (hover a day for its figures) and a
  Connect or Update button; "Your access" folds into rows: what they can
  reach (with the names at home), data this month day by day, and when
  access ends. The page follows the system's light or dark theme
- Adding a device: pick the kind (PC, Mobile, Router, Other) and a name, or
  add it from the device itself with the page's QR code. The set-up sheet
  then shows the app for that system and the connection, waits for the
  first connection, says "<device> connected" and closes on its own
- Switching apps in the set-up sheet changes only what differs: the old
  words blur into the new ones, and the menu path is shown for iOS and
  Android in one line. Names, numbers and statuses that change on the page
  morph in place
- Dialogs open in the middle on a computer, on the same spring as the menu;
  buttons that wait for the router show a spinner at once
- A paused account gets one card that says so; the page's messages are
  short and no longer send people to the admin. A QR code of the page sits
  beside the breadcrumb, to open it on another device
- Allowed hours are shown in the visitor's own time zone
- The portal's Title setting is gone: the page and its tab take the
  server's name. A title set before is removed on upgrade
- The admin names .conf files after the server too, as the portal does
  (Outline-Home.conf); its device menu says "Download AmneziaWG config" and
  "Copy AmneziaVPN config", and its QR codes use the portal's round look in
  the admin's light or dark colours
- README rewritten, with screenshots made from a demo cast
  (scripts/capture-screenshots.mjs --demo)
This commit is contained in:
Aemeath committed 2026-10-19 21:07:14 +03:00
1 parent edeb1506fd
commit 4f12ca19e7
94 files changed
+8076 -5009

No files matched your search

+68
View File
@@ -0,0 +1,68 @@
// A button held busy while the router answers: its content blurs away and an
// orb comes up through the blur in its place, then the other way round. The orb
// is B4 Converge from aicss.dev's Orbs (controls.css draws it). Each change starts
// from where the last one stands, so an answer that lands mid-change turns back
// without a jump.
import { h } from '../dom';
import { EASE_IN, EASE_OUT, play } from '../motion';
const SHOWN: Keyframe = { opacity: 1, filter: 'blur(0px)', transform: 'none' };
const GONE: Keyframe = { opacity: 0, filter: 'blur(5px)', transform: 'scale(.86)' };
const ORB_GONE: Keyframe = { opacity: 0, filter: 'blur(5px)', transform: 'scale(.6)' };
/** Out quick, in a little later and slower: the two cross in the blur. */
const OUT = { duration: 180, easing: EASE_IN, fill: 'forwards' } as const;
const IN = { duration: 340, delay: 70, easing: EASE_OUT, fill: 'backwards' } as const;
/** Until the orb is all the way in: a quicker answer waits for it, so the orb never just flickers. */
export const BUSY_IN = IN.delay + IN.duration;
const runs = new WeakMap<HTMLElement, Animation[]>();
/** Where an element stands now, mid-animation included. */
function now(el: Element): Keyframe {
const s = getComputedStyle(el);
return { opacity: s.opacity, filter: s.filter === 'none' ? 'blur(0px)' : s.filter, transform: s.transform };
}
/** What gives way: the button's own elements (a bare word goes into a span first). */
function content(btn: HTMLElement): Element[] {
for (const n of [...btn.childNodes])
if (n.nodeType === Node.TEXT_NODE && n.textContent?.trim()) n.replaceWith(h('span', {}, n.textContent));
return [...btn.children].filter((c) => !c.classList.contains('orb'));
}
/** The new change takes over: the old one stops once the new one is in place (nothing paints between). */
function hand(btn: HTMLElement, next: Animation[]) {
const old = runs.get(btn) ?? [];
runs.set(btn, next);
old.forEach((a) => a.cancel());
}
export function busyOn(btn: HTMLElement) {
btn.querySelector(':scope > .orb')?.remove();
const parts = content(btn);
const from = parts.map(now);
const orb = h('span', { class: 'orb', 'aria-hidden': 'true' }, h('i'), h('i'));
btn.append(orb);
btn.classList.add('busy');
btn.setAttribute('aria-busy', 'true');
hand(btn, [...parts.map((p, i) => play(p, [from[i], GONE], OUT)), play(orb, [ORB_GONE, SHOWN], IN)]);
}
export function busyOff(btn: HTMLElement) {
const orb = btn.querySelector(':scope > .orb');
const parts = content(btn);
const next = [...(orb ? [play(orb, [now(orb), ORB_GONE], OUT)] : []), ...parts.map((p) => play(p, [now(p), SHOWN], IN))];
hand(btn, next);
btn.removeAttribute('aria-busy');
Promise.all(next.map((a) => a.finished)).then(
() => {
if (runs.get(btn) !== next) return; // busy again meanwhile
runs.delete(btn);
next.forEach((a) => a.cancel());
orb?.remove();
btn.classList.remove('busy');
},
() => {},
);
}