Dawnline 0.2.0
- Diagnostics page: Health and Log tabs in place of Health and Activity - Watchdog: repairs the AmneziaWG module, tunnels, nft table, firewall rules, uhttpd portal setting, portal, resolver and rpcd after two bad checks in a row, with backoff; after 3 failed repairs logs once in red, keeps repairing quietly and logs "restored" when it works again - Heartbeat cron job restarts a hung agent - Service log: tunnel and service starts with reasons (restarted, router start, update, crash), stops Dawnline made itself vs unexpected ones, certificate renewal and expiry, WAN address changes - Admin actions logged as "You ..." with their own icon and tint; every event has an icon tile; names kept for removed people and devices; server pill on events when there are several servers - Log filters: All, Connections, People, System, Problems; search and the command palette removed - Home network reaches people's devices: fw4 forwarding from the home zones, limited to people with home access - "Devices reach each other" per server, in the Access card - Portal: "This device" card first with a dotted border, key rotation and copy address in the menu, devices sorted Online/Offline/Not set up/Paused, over-limit slots in orange - People cards: slot bar, Online / Never connected, add chip always shown - Person and device pages: Add device tile, Connect at the bottom with File/Key/QR tabs, status text without dots; pulsing server tab dot - Server pill: Running / Not running / Turned off
This commit is contained in:
1 parent
d0955e44b8
commit
82ab86848e
50 files changed
+2166
-982
No files matched your search
@@ -118,3 +118,12 @@ export function slugify(s: string): string {
|
||||
.replace(/^-+|-+$/g, '')
|
||||
.slice(0, 32);
|
||||
}
|
||||
|
||||
/** Online, then offline, then not set up yet, then turned off; the order they were added within each. */
|
||||
export function byDeviceState<T extends { online: boolean; handshake: number; disabled: boolean }>(list: T[]): T[] {
|
||||
const rank = (d: T) => (d.disabled ? 3 : d.online ? 0 : d.handshake ? 1 : 2);
|
||||
return list
|
||||
.map((d, i) => [d, i] as const)
|
||||
.sort((a, b) => rank(a[0]) - rank(b[0]) || a[1] - b[1])
|
||||
.map(([d]) => d);
|
||||
}
|
||||
Reference in new issue
Block a user