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
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:
1 parent
edeb1506fd
commit
4f12ca19e7
94 files changed
+8076
-5009
No files matched your search
+13
-34
@@ -1,5 +1,5 @@
|
||||
// Setting up a device: which app, where it comes from, and whether the page
|
||||
// is open on the device being set up. Pure: the sheet in main.ts draws it.
|
||||
// is open on the device being set up. Pure: the set-up sheet (flows/) draws it.
|
||||
|
||||
import type { Kind } from '../shared/types';
|
||||
|
||||
@@ -33,45 +33,21 @@ export function sameDevice(kind: Kind, platform: Platform): boolean {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The systems a kind may run, when that is the person's call: a computer's
|
||||
* desktop systems, any system for an "other" device (a TV box runs Android, a
|
||||
* NAS Linux). A phone's or a tablet's is read from the browser.
|
||||
*/
|
||||
export const osGroup = (kind: Kind): Platform[] =>
|
||||
kind === 'computer' ? ['windows', 'mac', 'linux'] : kind === 'other' ? ['ios', 'android', 'windows', 'mac', 'linux'] : [];
|
||||
|
||||
export interface AppChoice {
|
||||
id: AppId;
|
||||
name: string;
|
||||
/** The version this server needs, as "4.8.12" or ""; "current" when only the newest will do. */
|
||||
need: string;
|
||||
sub: string;
|
||||
}
|
||||
|
||||
/** The apps that connect to a server with this disguise, the recommended one first. */
|
||||
/** The apps that connect to a server with this disguise, the recommended one first; any WireGuard app without one. */
|
||||
export function appsFor(preset: Preset): AppChoice[] {
|
||||
const need = {
|
||||
off: { vpn: '', awg: '' },
|
||||
balanced: { vpn: '4.8.12', awg: '2.0' },
|
||||
max: { vpn: 'current', awg: '3.1' },
|
||||
legacy: { vpn: '', awg: '' },
|
||||
}[preset];
|
||||
const out: AppChoice[] = [
|
||||
{ id: 'vpn', name: APP_NAME.vpn, need: need.vpn, sub: 'Connects from a link, no files' },
|
||||
{ id: 'awg', name: APP_NAME.awg, need: need.awg, sub: 'The light client: a file or a QR code' },
|
||||
{ id: 'vpn', name: APP_NAME.vpn },
|
||||
{ id: 'awg', name: APP_NAME.awg },
|
||||
];
|
||||
if (preset === 'off') out.push({ id: 'wg', name: APP_NAME.wg, need: '', sub: 'Any WireGuard app: this server has no disguise' });
|
||||
if (preset === 'off') out.push({ id: 'wg', name: APP_NAME.wg });
|
||||
return out;
|
||||
}
|
||||
|
||||
/** "This server needs AmneziaVPN 4.8.12 or newer. …", or "" when any version will do. */
|
||||
export function updateLine(app: AppChoice): string {
|
||||
if (!app.need) return '';
|
||||
const what = app.need === 'current' ? `the current version of ${app.name}` : `${app.name} ${app.need} or newer`;
|
||||
return `This server needs ${what}. Installed a while ago? Update it in the store.`;
|
||||
}
|
||||
|
||||
export type Mark = 'appstore' | 'googleplay' | 'windows' | 'apple' | 'linux' | 'openwrt' | 'github' | 'site';
|
||||
|
||||
export interface Store {
|
||||
@@ -157,7 +133,8 @@ export const routerStore = (app: AppId): Store =>
|
||||
main: 'wireguard-tools',
|
||||
mark: 'openwrt',
|
||||
}
|
||||
: { href: 'https://openwrt.org/packages/start', top: 'OpenWrt packages', main: 'amneziawg-tools + kmod', mark: 'openwrt' };
|
||||
: // One line on a phone: the kernel module goes on top.
|
||||
{ href: 'https://openwrt.org/packages/start', top: 'OpenWrt packages + kmod', main: 'amneziawg-tools', mark: 'openwrt' };
|
||||
|
||||
/**
|
||||
* Does AmneziaVPN here open a `vpn://` link? Only the Android app registers the
|
||||
@@ -234,13 +211,15 @@ export function setupFromHash(hash: string): string | null {
|
||||
return /^#setup=(d_[0-9a-f]{8})$/.exec(hash)?.[1] ?? null;
|
||||
}
|
||||
|
||||
/** The personal link that opens straight on "Add a device": for the device itself to add, from its own browser. */
|
||||
export const addLink = (page: string): string => `${page}#add`;
|
||||
|
||||
/** Does the link ask to add a device (`#add`)? */
|
||||
export const wantsAdd = (hash: string): boolean => hash === '#add';
|
||||
|
||||
/**
|
||||
* "the phone", "the computer": the device being set up, in a sentence. The
|
||||
* sheet's title already names it; the lines under it do not repeat the name.
|
||||
*/
|
||||
export const deviceNoun = (kind: Kind): string =>
|
||||
({ phone: 'phone', tablet: 'tablet', computer: 'computer', router: 'router', other: 'device' })[kind];
|
||||
|
||||
/** "This iPhone", "This Mac": the pill for the device in hand. */
|
||||
export const hereLabel = (platform: Platform): string =>
|
||||
({ ios: 'This iPhone', android: 'This phone', windows: 'This PC', mac: 'This Mac', linux: 'This PC', unknown: 'This device' })[platform];
|
||||
Reference in new issue
Block a user