- Fix "Cannot set properties of undefined (setting '_class')" after adding a person on a server page: kept Overview/People tabs are taken out before dom.content() wipes their LuCI registry - No portal links while the personal portal is off - "Off" disguise writes a plain WireGuard config (no neutral Jc..H4 lines) - Setup wizard: Settings-style groups, portal off by default, "Internet like a home device" switch; no "Link path" (server ids are picked by the router) - Server ids and imported section names may not contain dashes - Health: Cloudflare-proxied endpoint and portal address are not warnings - Themes other than Outline: solid menus, drawer, palette, toasts and tooltips (Bootstrap colour tokens as fallbacks), custom select chevron - Server section tabs scroll sideways instead of wrapping; centred empty People list; wider search; "1 device" in the palette - lint-ucode: exported functions must end with "};"
This commit is contained in:
1 parent
a3910f8b97
commit
d0955e44b8
13 files changed
+168
-112
No files matched your search
@@ -115,11 +115,7 @@ export function methodPicker(caps: AwgCaps, selected: Method, onSelect: (m: Meth
|
||||
E('div', { class: 'dl-method-head' }, [
|
||||
E('span', { class: 'dl-method-ic' }, icon(m.ic)),
|
||||
E('b', {}, m.title),
|
||||
m.id === current
|
||||
? E('span', { class: 'dl-pill ok' }, 'Current')
|
||||
: m.id === 'standard' && !current
|
||||
? E('span', { class: 'dl-pill' }, 'Recommended')
|
||||
: '',
|
||||
m.id === current ? E('span', { class: 'dl-pill ok' }, 'Current') : '',
|
||||
]),
|
||||
E('p', {}, m.text),
|
||||
E('div', { class: 'dl-method-meters' }, [dots(m.stealth, 'Stealth'), dots(m.speed, 'Speed')]),
|
||||
|
||||
@@ -10,7 +10,7 @@ import { attempt, button, callout, closeModal, confirmDialog, copyText, modal, n
|
||||
import { icon } from '../../shared/icons';
|
||||
import { duration } from '../../shared/format';
|
||||
import { interfacesCard } from '../interfaces';
|
||||
import { card, group, input, row } from '../kit';
|
||||
import { card, group, input, row, sw } from '../kit';
|
||||
import { methodInfo, methodPicker, type Method } from '../disguise';
|
||||
import { ServerOverview } from './overview';
|
||||
import { PeoplePage } from './people';
|
||||
@@ -27,29 +27,6 @@ const SECTIONS: [Section, string][] = [
|
||||
];
|
||||
/** Section names from before the regrouping, for old links. */
|
||||
const OLD_SECTIONS: Record<string, Section> = { general: 'connection', network: 'connection', interfaces: 'access', advanced: 'tunnel' };
|
||||
function choices<T extends string>(items: { v: T; title: string; text: string; ic?: string }[], initial: T, onChange: (v: T) => void) {
|
||||
const el = E(
|
||||
'div',
|
||||
{ class: 'dl-choices' },
|
||||
items.map((o) =>
|
||||
E(
|
||||
'button',
|
||||
{
|
||||
type: 'button',
|
||||
class: `dl-choice${o.v === initial ? ' selected' : ''}`,
|
||||
'data-v': o.v,
|
||||
click: () => {
|
||||
el.querySelectorAll('.dl-choice').forEach((c) => c.classList.toggle('selected', (c as HTMLElement).dataset.v === o.v));
|
||||
onChange(o.v);
|
||||
},
|
||||
},
|
||||
[E('span', { class: 'dl-choice-title' }, [o.ic ? icon(o.ic) : '', o.title]), E('span', { class: 'dl-choice-text' }, o.text)],
|
||||
),
|
||||
),
|
||||
);
|
||||
return el;
|
||||
}
|
||||
|
||||
/** `.conf` names of the disguise parameters, in file order. */
|
||||
const CONF: [string, string][] = [
|
||||
['jc', 'Jc'],
|
||||
@@ -303,6 +280,16 @@ export class ServerPage {
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||
}
|
||||
|
||||
/**
|
||||
* Overview and People stay alive between tab switches. Take them out before
|
||||
* dom.content() runs: it forgets LuCI's registry of every node it removes,
|
||||
* and a form put back afterwards fails on its next render ("setting '_class'").
|
||||
*/
|
||||
detachKept() {
|
||||
const kept = [...Object.values(this.ov).map((o) => o.el), ...Object.values(this.pp).map((p) => p.el)];
|
||||
for (const el of kept) if (el && this.bodyEl.contains(el)) el.remove();
|
||||
}
|
||||
|
||||
/** Swap only the section body; the rest of the page stays as it is. */
|
||||
showSection(k: Section) {
|
||||
this.section = k;
|
||||
@@ -339,7 +326,9 @@ export class ServerPage {
|
||||
disguise: () => this.disguise(srv),
|
||||
tunnel: () => this.tunnel(srv),
|
||||
};
|
||||
dom.content(this.bodyEl, body[k]());
|
||||
const node = body[k]();
|
||||
this.detachKept();
|
||||
dom.content(this.bodyEl, node);
|
||||
}
|
||||
|
||||
/** Name and state, the address bar, and the page actions. */
|
||||
@@ -579,7 +568,6 @@ export class ServerPage {
|
||||
}),
|
||||
]),
|
||||
),
|
||||
row('Link path', E('span', { class: 'dl-mono' }, `/${srv.id}/`), 'Changing it would break every personal link already sent.'),
|
||||
],
|
||||
[],
|
||||
),
|
||||
@@ -678,8 +666,10 @@ export class ServerPage {
|
||||
port: d.port,
|
||||
subnet: d.subnet,
|
||||
preset: 'standard' as Method,
|
||||
portal: true,
|
||||
// Off by default: the portal opens a port on WAN, so it is a choice.
|
||||
portal: false,
|
||||
portal_port: d.portal_port || 8443,
|
||||
lan_like: true,
|
||||
lan_zone: d.lan_zone,
|
||||
wan_zone: d.wan_zone,
|
||||
};
|
||||
@@ -696,33 +686,32 @@ export class ServerPage {
|
||||
const steps = extra ? ['Connection', 'Disguise'] : ['Connection', 'Disguise', 'Portal'];
|
||||
const pages: (() => Node)[] = [
|
||||
() =>
|
||||
E('div', {}, [
|
||||
E('div', { class: 'dl-wizard-groups' }, [
|
||||
E(
|
||||
'p',
|
||||
{},
|
||||
'Where devices connect to. Use a hostname that always points at your router (DDNS), so links keep working when your IP changes.',
|
||||
),
|
||||
row('Name', field('name'), 'Shown to people in their portal.'),
|
||||
row(
|
||||
'Link path',
|
||||
field('id', { maxlength: 24, class: 'cbi-input-text dl-mono' }),
|
||||
'First part of personal links: https://address:port/<path>/<person>.',
|
||||
),
|
||||
row(
|
||||
'Public address',
|
||||
field('endpoint', { placeholder: 'vpn.example.com', class: 'cbi-input-text dl-mono' }),
|
||||
'Hostname or IP address of your router on the internet.',
|
||||
),
|
||||
row(
|
||||
'UDP port',
|
||||
field('port', { inputmode: 'numeric', class: 'cbi-input-text dl-w-port dl-mono' }),
|
||||
'Opened on the WAN firewall automatically. A random high port is fine.',
|
||||
),
|
||||
row(
|
||||
'Tunnel subnet',
|
||||
field('subnet', { class: 'cbi-input-text dl-mono' }),
|
||||
`Addresses for devices. Must not overlap your networks (${d.taken.join(', ') || 'none found'}).`,
|
||||
{ class: 'dl-muted' },
|
||||
'Where devices connect to. A hostname that always points at your router (DDNS) keeps links working when your IP changes.',
|
||||
),
|
||||
group('router', 'Server', 'What people see', [row('Name', field('name'), 'Shown to people in their portal.')]),
|
||||
group('globe', 'Devices connect to', 'Where the tunnel answers from the internet', [
|
||||
row(
|
||||
'Public address',
|
||||
field('endpoint', { placeholder: 'vpn.example.com', class: 'cbi-input-text dl-mono' }),
|
||||
'Hostname or IP address of your router on the internet.',
|
||||
),
|
||||
row(
|
||||
'UDP port',
|
||||
field('port', { inputmode: 'numeric', class: 'cbi-input-text dl-w-port dl-mono' }),
|
||||
'Opened on the WAN firewall automatically. A random high port is fine.',
|
||||
),
|
||||
]),
|
||||
group('network', 'Tunnel network', 'Addresses devices get inside the tunnel', [
|
||||
row(
|
||||
'Tunnel subnet',
|
||||
field('subnet', { class: 'cbi-input-text dl-mono' }),
|
||||
`Must not overlap your networks (${d.taken.join(', ') || 'none found'}).`,
|
||||
),
|
||||
]),
|
||||
]),
|
||||
() =>
|
||||
E('div', {}, [
|
||||
@@ -735,25 +724,46 @@ export class ServerPage {
|
||||
]),
|
||||
() => {
|
||||
const portalPort = field('portal_port', { inputmode: 'numeric', class: 'cbi-input-text dl-w-port dl-mono' });
|
||||
return E('div', {}, [
|
||||
callout(
|
||||
'info',
|
||||
'Devices reach the internet the way devices on your home network do: whatever handles home traffic on this router handles theirs too. You can change this later under Servers → Access.',
|
||||
const portRow = row('Listening port', portalPort, 'TCP port on WAN for the portal; the whole port belongs to it.');
|
||||
portRow.hidden = !state.portal;
|
||||
// Off | On, Off first: the same segmented control as in Settings.
|
||||
const onOff = E(
|
||||
'div',
|
||||
{ class: 'dl-seg', role: 'radiogroup', 'aria-label': 'Personal portal' },
|
||||
(['off', 'on'] as const).map((v) =>
|
||||
E(
|
||||
'button',
|
||||
{
|
||||
type: 'button',
|
||||
role: 'radio',
|
||||
class: (v === 'on') === state.portal ? 'on' : '',
|
||||
'aria-checked': (v === 'on') === state.portal ? 'true' : 'false',
|
||||
click: (ev: Event) => {
|
||||
state.portal = v === 'on';
|
||||
portRow.hidden = !state.portal;
|
||||
onOff.querySelectorAll('button').forEach((x) => {
|
||||
const sel = x === ev.currentTarget;
|
||||
x.classList.toggle('on', sel);
|
||||
x.setAttribute('aria-checked', sel ? 'true' : 'false');
|
||||
});
|
||||
},
|
||||
},
|
||||
v === 'on' ? 'On' : 'Off',
|
||||
),
|
||||
),
|
||||
E('h4', {}, 'Personal portal'),
|
||||
E('p', {}, 'A small page where each person adds their own devices, with their personal link. It gets its own HTTPS port on WAN.'),
|
||||
choices(
|
||||
[
|
||||
{ v: 'on', title: 'On', ic: 'link', text: 'People manage their devices themselves within the limits you set.' },
|
||||
{ v: 'off', title: 'Off', ic: 'x', text: 'Only you add devices, from LuCI.' },
|
||||
],
|
||||
'on',
|
||||
(v) => {
|
||||
state.portal = v === 'on';
|
||||
portalPort.disabled = !state.portal;
|
||||
},
|
||||
),
|
||||
row('Portal port', portalPort, 'TCP port on WAN. The whole port belongs to the portal.'),
|
||||
);
|
||||
return E('div', { class: 'dl-wizard-groups' }, [
|
||||
group('home', 'Internet like a home device', 'How devices reach the internet', [
|
||||
row(
|
||||
'Through the home network',
|
||||
sw(state.lan_like, 'Internet like a home device', (v) => (state.lan_like = v)),
|
||||
'Whatever handles home traffic on this router (proxies, filters, DNS) handles theirs too. Change it later under Servers → Access.',
|
||||
),
|
||||
]),
|
||||
group('link', 'Personal portal', 'A page where each person adds their own devices with their personal link', [
|
||||
row('Portal', onOff, 'Off: only you add devices, from LuCI. On: people manage their devices within the limits you set.'),
|
||||
portRow,
|
||||
]),
|
||||
]);
|
||||
},
|
||||
];
|
||||
@@ -812,7 +822,7 @@ export class ServerPage {
|
||||
state.preset,
|
||||
state.lan_zone,
|
||||
state.wan_zone,
|
||||
true,
|
||||
state.lan_like,
|
||||
extra ? undefined : state.portal,
|
||||
extra ? undefined : state.portal_port,
|
||||
),
|
||||
|
||||
@@ -77,7 +77,7 @@ function build(st: Status, q: string, done: () => void): Item[] {
|
||||
items.push({
|
||||
group: 'People',
|
||||
label: p.name,
|
||||
hint: `${ACCESS_SHORT[p.access]} · ${p.online ? `${p.online} online` : `${p.devices.length} devices`}`,
|
||||
hint: `${ACCESS_SHORT[p.access]} · ${p.online ? `${p.online} online` : `${p.devices.length} device${p.devices.length === 1 ? '' : 's'}`}`,
|
||||
avatar: initials(p.name),
|
||||
run: () => (location.href = personUrl(p.id)),
|
||||
});
|
||||
|
||||
+25
-16
@@ -9,11 +9,13 @@
|
||||
|
||||
const CSS = `
|
||||
:root {
|
||||
--dl-card: var(--panel-bg, transparent);
|
||||
--dl-line: var(--border, color-mix(in srgb, currentColor 14%, transparent));
|
||||
/* Outline's tokens first, then LuCI Bootstrap's, then something that works anywhere. */
|
||||
--dl-card: var(--panel-bg, var(--background-color-high, transparent));
|
||||
--dl-elevated: var(--elevated, var(--background-color-high, Canvas));
|
||||
--dl-line: var(--border, var(--border-color-medium, color-mix(in srgb, currentColor 14%, transparent)));
|
||||
--dl-soft: var(--muted, color-mix(in srgb, currentColor 5%, transparent));
|
||||
--dl-soft-hover: var(--soft-hover, color-mix(in srgb, currentColor 10%, transparent));
|
||||
--dl-fg: var(--foreground, inherit);
|
||||
--dl-fg: var(--foreground, var(--text-color-highest, inherit));
|
||||
--dl-fg-muted: var(--muted-foreground, color-mix(in srgb, currentColor 65%, transparent));
|
||||
--dl-fg-faint: var(--text-tertiary, color-mix(in srgb, currentColor 50%, transparent));
|
||||
--dl-accent: var(--accent, #3a83f7);
|
||||
@@ -110,7 +112,8 @@ const CSS = `
|
||||
.dl-map .cbi-section-table-row > .td.cbi-section-actions > div { display: flex; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
|
||||
.dl-map .cbi-section-table-row > .td.cbi-section-actions > div > * { margin: 0 !important; flex: 0 0 auto; }
|
||||
.dl-map .cbi-section-table-row > .td::before { display: none !important; }
|
||||
.dl-map .cbi-section-table-row.placeholder { color: var(--dl-fg-muted); justify-content: center; }
|
||||
.dl-map .cbi-section-table-row.placeholder { color: var(--dl-fg-muted); display: flex !important; justify-content: center; align-items: center; min-height: 0 !important; height: auto !important; padding: 28px 16px !important; text-align: center; }
|
||||
.dl-map .cbi-section-table-row.placeholder > * { position: static !important; padding: 0 !important; margin: 0 !important; border: 0 !important; flex: 0 1 auto !important; }
|
||||
.dl-map .cbi-section-table-row.dl-off .dl-card-name, .dl-map .cbi-section-table-row.dl-off .dl-avatar { opacity: .6; }
|
||||
.dl-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
|
||||
.dl-avatar { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
|
||||
@@ -160,7 +163,7 @@ const CSS = `
|
||||
/* choice cards */
|
||||
/* LuCI's modal above the device drawer (900); menus above both. */
|
||||
#modal_overlay { z-index: 1100 !important; }
|
||||
.dl-dd { position: fixed; z-index: 1200; min-width: 200px; padding: 4px; border-radius: 12px; background: var(--elevated, var(--dl-card)); border: 1px solid var(--dl-line);
|
||||
.dl-dd { position: fixed; z-index: 1200; min-width: 200px; padding: 4px; border-radius: 12px; background: var(--dl-elevated); border: 1px solid var(--dl-line);
|
||||
box-shadow: 0 12px 32px #0000004d; display: flex; flex-direction: column; }
|
||||
.dl-dd button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--dl-fg); }
|
||||
.dl-dd button .dl-icon { width: 15px; height: 15px; color: var(--dl-fg-muted); }
|
||||
@@ -281,7 +284,8 @@ const CSS = `
|
||||
.dl-method.on { border-color: var(--dl-accent); background: color-mix(in srgb, var(--dl-accent) 8%, transparent); box-shadow: inset 0 0 0 1px var(--dl-accent); }
|
||||
.dl-method.off { cursor: not-allowed; opacity: .55; }
|
||||
.dl-method.off:hover { background: var(--dl-card); }
|
||||
.dl-method-head { display: flex; align-items: center; gap: 10px; }
|
||||
.dl-method-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
|
||||
.dl-method-head .dl-pill { flex: none; }
|
||||
.dl-method-head b { font-weight: 500; font-size: 14.5px; flex: 1; }
|
||||
.dl-method-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--dl-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--dl-fg-muted); flex: 0 0 auto; }
|
||||
.dl-method-ic .dl-icon { width: 17px; height: 17px; }
|
||||
@@ -454,7 +458,7 @@ const CSS = `
|
||||
.dl-searchbtn { display: inline-flex !important; align-items: center; gap: 6px; }
|
||||
.dl-searchbtn kbd { font-size: 11px; padding: 1px 5px; border-radius: 5px; background: var(--dl-soft); color: var(--dl-fg-muted); font-family: inherit; }
|
||||
.dl-toolbar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: nowrap; min-width: 0; }
|
||||
.dl-toolbar-end .dl-search { flex: 0 1 260px; min-width: 160px; }
|
||||
.dl-toolbar-end .dl-search { flex: 0 1 300px; min-width: 160px; }
|
||||
@media (max-width: 640px) { .dl-toolbar-end { flex-wrap: wrap; width: 100%; } .dl-toolbar-end .dl-search { flex: 1 1 100%; } }
|
||||
.dl-healthstrip { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 9px 14px; margin: 0 0 12px; border-radius: 12px;
|
||||
border: 1px solid color-mix(in srgb, var(--dl-warn) 45%, transparent); background: var(--dl-warn-wash); font-size: 13px; color: var(--dl-fg-muted); }
|
||||
@@ -682,6 +686,10 @@ const CSS = `
|
||||
font-size: 13px; font-weight: 500; color: var(--dl-fg-muted); white-space: nowrap; }
|
||||
.dl-seg button:hover { color: var(--dl-fg); }
|
||||
.dl-seg button.on { background: var(--dl-soft-hover); color: var(--dl-fg); }
|
||||
/* Server sections: one row that scrolls sideways on narrow screens */
|
||||
.dl-seg.dl-srvsections { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
|
||||
.dl-seg.dl-srvsections::-webkit-scrollbar { display: none; }
|
||||
.dl-seg.dl-srvsections button { flex: none; white-space: nowrap; }
|
||||
.dl-seg button:focus-visible { outline: 2px solid var(--dl-ring); }
|
||||
.dl-seg button b { font-weight: 500; font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--dl-soft); }
|
||||
.dl-seg button b.warn { background: var(--dl-warn-wash); color: var(--dl-warn); }
|
||||
@@ -711,9 +719,9 @@ const CSS = `
|
||||
box-shadow: 0 0 0 4px rgba(237, 237, 237, .18), 0 2px 6px rgba(0,0,0,.5); color: #131313; }
|
||||
.dl-mk-home-ic { width: 13px; height: 13px; }
|
||||
.dl-popup { z-index: 4; }
|
||||
.dl-popup .maplibregl-popup-content { background: var(--elevated, #131313); color: var(--dl-fg); border: 1px solid var(--dl-line); border-radius: 12px; padding: 12px;
|
||||
.dl-popup .maplibregl-popup-content { background: var(--dl-elevated); color: var(--dl-fg); border: 1px solid var(--dl-line); border-radius: 12px; padding: 12px;
|
||||
box-shadow: var(--shadow-xl, 0 8px 16px -4px rgba(0,0,0,.4)); font: inherit; }
|
||||
.dl-popup .maplibregl-popup-tip { border-top-color: var(--elevated, #131313) !important; border-bottom-color: var(--elevated, #131313) !important; }
|
||||
.dl-popup .maplibregl-popup-tip { border-top-color: var(--dl-elevated) !important; border-bottom-color: var(--dl-elevated) !important; }
|
||||
.dl-pop { display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 18px; min-width: 210px; }
|
||||
.dl-pop-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 2px; }
|
||||
.dl-mk.multi { width: 26px; height: 26px; }
|
||||
@@ -744,7 +752,7 @@ const CSS = `
|
||||
.dl-bar:hover i { filter: brightness(1.25); }
|
||||
.dl-bar.empty { background: linear-gradient(to top, var(--dl-line) 2px, transparent 2px); }
|
||||
.dl-tip { position: absolute; top: -8px; transform: translate(-50%, -100%); padding: 8px 10px; border-radius: 10px; font-size: 12px; line-height: 18px; white-space: nowrap;
|
||||
background: var(--elevated, #131313); border: 1px solid var(--dl-line); box-shadow: var(--shadow-xl, 0 8px 16px -4px rgba(0,0,0,.4)); pointer-events: none; z-index: 3; }
|
||||
background: var(--dl-elevated); border: 1px solid var(--dl-line); box-shadow: var(--shadow-xl, 0 8px 16px -4px rgba(0,0,0,.4)); pointer-events: none; z-index: 3; }
|
||||
.dl-tip-title { font-weight: 500; }
|
||||
.dl-tip-float { position: fixed; z-index: 2000; color: var(--dl-fg); }
|
||||
.dl-spark i:hover { opacity: 1; filter: brightness(1.25); }
|
||||
@@ -851,7 +859,7 @@ const CSS = `
|
||||
.dl-pside-state.live { color: var(--dl-ok); }
|
||||
.dl-pside-foot { font-size: 12px; }
|
||||
.dl-pside .dl-use-num b { font-size: 20px; }
|
||||
.dl-map .cbi-section-table-row > .td:has(.dl-pcard) { flex: 1 1 100%; max-width: none !important; width: 100% !important; }
|
||||
.dl-map .cbi-section-table-row > .td:has(.dl-pcard) { flex: 1 1 100%; max-width: none !important; width: 100% !important; margin: 0 !important; }
|
||||
.dl-none { display: none !important; }
|
||||
.dl-pcard-actions { display: flex; gap: 6px; flex: 0 0 auto; }
|
||||
.dl-pcard-actions .cbi-button { height: 32px !important; }
|
||||
@@ -891,11 +899,12 @@ const CSS = `
|
||||
@media (max-width: 760px) { .dl-pcard { grid-template-columns: 1fr; } .dl-pside { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--dl-line); } .dl-fixes { margin-left: 0; } }
|
||||
.dl-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 12px; border: 1px solid var(--input, var(--dl-line)); border-radius: 999px;
|
||||
background: var(--input-bg, transparent); width: 280px; max-width: 100%; color: var(--dl-fg-faint); box-sizing: border-box; min-width: 0; }
|
||||
.dl-search-input { border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; flex: 1; min-width: 0; color: var(--dl-fg);
|
||||
.dl-search-input { text-overflow: ellipsis; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; flex: 1; min-width: 0; color: var(--dl-fg);
|
||||
font: inherit; font-size: 13px; padding: 0 !important; height: 32px !important; }
|
||||
.dl-select { height: 34px !important; border-radius: 999px !important; min-width: 0 !important; padding: 0 30px 0 12px !important; }
|
||||
.dl-select { height: 34px !important; border-radius: 999px !important; min-width: 136px !important; width: auto !important; padding: 0 34px 0 14px !important;
|
||||
appearance: none !important; -webkit-appearance: none !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8f98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 12px center !important; background-size: 14px !important; }
|
||||
.dl-savebar { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 160%); opacity: 0; transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s;
|
||||
display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--elevated, #131313); border: 1px solid var(--dl-line);
|
||||
display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--dl-elevated); border: 1px solid var(--dl-line);
|
||||
box-shadow: var(--shadow-2xl, 0 16px 32px -8px rgba(0,0,0,.5)); z-index: 60; pointer-events: none; }
|
||||
.dl-savebar.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
|
||||
.dl-savebar-text { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
|
||||
@@ -908,7 +917,7 @@ const CSS = `
|
||||
/* device drawer */
|
||||
.dl-drawer-overlay { position: fixed; inset: 0; z-index: 900; display: flex; justify-content: flex-end; background: transparent; transition: background .2s; }
|
||||
.dl-drawer-overlay.open { background: var(--scrim, rgba(0,0,0,.45)); }
|
||||
.dl-drawer { width: min(520px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--dialog-bg, var(--elevated, #111)); color: var(--dl-fg);
|
||||
.dl-drawer { width: min(520px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--dialog-bg, var(--dl-elevated)); color: var(--dl-fg);
|
||||
border-left: 1px solid var(--dl-line); box-shadow: var(--shadow-2xl, -16px 0 32px -8px rgba(0,0,0,.5)); transform: translateX(100%);
|
||||
transition: transform .22s cubic-bezier(.2,.8,.2,1); }
|
||||
.dl-drawer-overlay.open .dl-drawer { transform: none; }
|
||||
@@ -958,7 +967,7 @@ const CSS = `
|
||||
|
||||
/* command menu */
|
||||
.dl-pal-overlay { position: fixed; inset: 0; z-index: 1000; background: var(--scrim, rgba(0,0,0,.5)); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 0; }
|
||||
.dl-pal { width: min(640px, 100%); background: var(--elevated, #131313); color: var(--dl-fg); border-radius: 16px; overflow: hidden;
|
||||
.dl-pal { width: min(640px, 100%); background: var(--dl-elevated); color: var(--dl-fg); border-radius: 16px; overflow: hidden;
|
||||
box-shadow: var(--shadow-menu, 0 16px 32px -8px rgba(0,0,0,.6)); border: 1px solid var(--dl-line); }
|
||||
.dl-pal-search { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--dl-line); color: var(--dl-fg-faint); }
|
||||
.dl-pal-input { flex: 1; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; font: inherit; font-size: 16px; color: var(--dl-fg); padding: 0 !important; }
|
||||
|
||||
Reference in new issue
Block a user