Dawnline 0.12.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
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
- The portal's traffic charts show what came down and what went up apart. A device's last 7 days and "Data this month" draw each day both ways: downloads rise above a thin line, uploads hang below it, on one scale. Beside them "↓ 3.2 GB ↑ 557 MB" instead of one total; hover a day for its own, its date where "left" stands - Charts answer the pointer between their bars too, in the portal and in the admin's daily charts (a device's week, a device card's 30 days, the last 30 days): the figures no longer blink back to the total - The calendar under "Access until" plays its days in only when the row is opened, not again each time the page refreshes with it open - On a phone the page comes in from the top down: "Your access" first, then the devices - "Show key" on a router's set-up morphs to "Hide key" with its icon, and brings the keys themselves into focus (it blurred the field names)
This commit is contained in:
1 parent
2f2aaf6c34
commit
fb73ac3a9f
33 files changed
+396
-199
No files matched your search
@@ -24,7 +24,7 @@ import {
|
||||
type Store,
|
||||
} from '../setup';
|
||||
import { accordion } from '../ui/accordion';
|
||||
import { copy, download, sendFile, shareFile } from '../ui/feedback';
|
||||
import { copy, download, sendFile, shareFile, swapIcon } from '../ui/feedback';
|
||||
import { glass } from '../ui/glass';
|
||||
import { menuLine, morphText, setText } from '../ui/morph';
|
||||
import { hint } from '../ui/sheet';
|
||||
@@ -206,7 +206,8 @@ function confLine(line: string, reveal: boolean): Node {
|
||||
const m = /^(\s*[A-Za-z0-9]+\s*=)\s*(.*)$/.exec(line);
|
||||
if (!m) return document.createTextNode(line);
|
||||
const secret = /^(\s*)(PrivateKey|PresharedKey)\b/.test(line);
|
||||
return h('span', {}, h('span', { class: 'k' }, m[1]), ' ', secret && !reveal ? h('span', { class: 'mask' }, '••••••••••••••••') : m[2]);
|
||||
const value = !secret ? m[2] : reveal ? h('span', { class: 'secret' }, m[2]) : h('span', { class: 'mask' }, '••••••••••••••••');
|
||||
return h('span', {}, h('span', { class: 'k' }, m[1]), ' ', value);
|
||||
}
|
||||
|
||||
/** The .conf for a router: a file card to download (or share), and the configuration folded, its keys hidden. */
|
||||
@@ -217,6 +218,8 @@ export function filePane(cfg: ClientConfig): HTMLElement {
|
||||
pre.replaceChildren(...cfg.conf.split('\n').flatMap((l, i) => (i ? ['\n', confLine(l, reveal)] : [confLine(l, reveal)])));
|
||||
paint();
|
||||
const share = !!shareFile(cfg.filename, cfg.conf);
|
||||
let icon = ic('key');
|
||||
const label = h('span', {}, _('Show key'));
|
||||
const eye = h(
|
||||
'button',
|
||||
{
|
||||
@@ -224,10 +227,11 @@ export function filePane(cfg: ClientConfig): HTMLElement {
|
||||
class: 'btn soft sm',
|
||||
onclick: () => {
|
||||
reveal = !reveal;
|
||||
eye.replaceChildren(ic(reveal ? 'x' : 'key'), h('span', {}, reveal ? _('Hide key') : _('Show key')));
|
||||
icon = swapIcon(icon, reveal ? 'x' : 'key');
|
||||
morphText(label, reveal ? _('Hide key') : _('Show key'));
|
||||
paint();
|
||||
// A key shown comes into focus out of a blur; hidden again, the mask fades back.
|
||||
pre.querySelectorAll('.mask, .k').forEach((x) =>
|
||||
pre.querySelectorAll('.mask, .secret').forEach((x) =>
|
||||
play(
|
||||
x,
|
||||
[
|
||||
@@ -239,8 +243,8 @@ export function filePane(cfg: ClientConfig): HTMLElement {
|
||||
);
|
||||
},
|
||||
},
|
||||
ic('key'),
|
||||
h('span', {}, _('Show key')),
|
||||
icon,
|
||||
label,
|
||||
);
|
||||
const cp = h(
|
||||
'button',
|
||||
|
||||
Reference in new issue
Block a user