Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions public/js/admin-app-form.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { clr as rc, el, inp as inpById, q as qSel, qa, qi, tgt } from '/js/utils.js?v=ada0c382';
import { clr as rc, el, inp as inpById, q as qSel, qa, qi, tgt } from '/js/utils.js?v=70cbc405';
import { html, raw, setHtml } from '/js/html.js?v=c71f8903';
import { loadLocalIcons, resolveIcon, iconChain, cdnIconRef, splitIconRef } from '/js/icons.js?v=9c8c550c';
import { state } from '/js/admin-state.js?v=5a5d655f';
Expand All @@ -11,7 +11,7 @@ import {
nextActiveIndex,
sameIconName,
} from '/js/admin-logic.js?v=69e57d35';
import { t } from '/js/i18n.js?v=e644a5c5';
import { t } from '/js/i18n.js?v=1f1ea9c1';
import {
toast,
ag,
Expand All @@ -21,10 +21,10 @@ import {
reveal,
setTogDisabled,
swapContent,
} from '/js/admin-shared.js?v=ca64cc9c';
import { createListbox } from '/js/listbox.js?v=3e267705';
} from '/js/admin-shared.js?v=5cf446fa';
import { createListbox } from '/js/listbox.js?v=a67e9c98';
import { MAX_LABELS } from '/js/badge-logic.js?v=b3c8b6c2';
import { renderColorControl, BADGE_SWATCHES, BADGE_DEFAULT } from '/js/admin-color-control.js?v=cfb3b3e9';
import { renderColorControl, BADGE_SWATCHES, BADGE_DEFAULT } from '/js/admin-color-control.js?v=47d9d808';
import { badgeErrorAdvice, TONE } from '/js/admin-error.js?v=10f3cdb1';
import { fluidHoverClear, fluidHoverKb } from '/js/fluid-hover.js?v=cb886e86';

Expand Down
6 changes: 3 additions & 3 deletions public/js/admin-auth.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ag, ap } from '/js/admin-shared.js?v=ca64cc9c';
import { t } from '/js/i18n.js?v=e644a5c5';
import { ag, ap } from '/js/admin-shared.js?v=5cf446fa';
import { t } from '/js/i18n.js?v=1f1ea9c1';
import { pwStrength } from '/js/password-strength.js?v=42f45ac7';
import { el, inp as inpById, qa } from '/js/utils.js?v=ada0c382';
import { el, inp as inpById, qa } from '/js/utils.js?v=70cbc405';

export async function checkAuth(onLogin) {
try {
Expand Down
6 changes: 3 additions & 3 deletions public/js/admin-color-control.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PE_SVG, initInlineEdit, toast, reveal } from '/js/admin-shared.js?v=ca64cc9c';
import { t } from '/js/i18n.js?v=e644a5c5';
import { PE_SVG, initInlineEdit, toast, reveal } from '/js/admin-shared.js?v=5cf446fa';
import { t } from '/js/i18n.js?v=1f1ea9c1';
import { html, raw, setHtml } from '/js/html.js?v=c71f8903';
import { qa, q } from '/js/utils.js?v=ada0c382';
import { qa, q } from '/js/utils.js?v=70cbc405';

const CC_SWATCHES = ['#1c1c1e', '#8e8e93', '#f2f2f7', '#ff393c', '#ffcd00', '#35c759', '#0289ff', '#cb30df'];
export const BADGE_DEFAULT = '#1e6ef4';
Expand Down
2 changes: 1 addition & 1 deletion public/js/admin-drag.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import { applyDrop, canJoinFolder, folderRowZone } from '/js/admin-drag-logic.js?v=6b767e76';
import { state } from '/js/admin-state.js?v=5a5d655f';
import { snapshotItems } from '/js/admin-save-logic.js?v=4f71ef6c';
import { qa } from '/js/utils.js?v=ada0c382';
import { qa } from '/js/utils.js?v=70cbc405';

/** @type {(before: unknown) => void} */
let _save = () => {};
Expand Down
10 changes: 5 additions & 5 deletions public/js/admin-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
import { collapsedFolders, filter, state } from '/js/admin-state.js?v=5a5d655f';
import { snapshotItems } from '/js/admin-save-logic.js?v=4f71ef6c';
import { reorderItems } from '/js/admin-logic.js?v=69e57d35';
import { initDrag, wireRowDrag } from '/js/admin-drag.js?v=e514303e';
import { paintIcon } from '/js/admin-shared.js?v=ca64cc9c';
import { clr as rc, el, qa, setUserText } from '/js/utils.js?v=ada0c382';
import { initDrag, wireRowDrag } from '/js/admin-drag.js?v=85ce4de5';
import { paintIcon } from '/js/admin-shared.js?v=5cf446fa';
import { clr as rc, el, qa, setUserText } from '/js/utils.js?v=70cbc405';
import { html, raw, setHtml } from '/js/html.js?v=c71f8903';
import { t } from '/js/i18n.js?v=e644a5c5';
import { sizeLabel } from '/js/admin-widget-form.js?v=20f4cf98';
import { t } from '/js/i18n.js?v=1f1ea9c1';
import { sizeLabel } from '/js/admin-widget-form.js?v=6c778690';
import { widgetGlyph } from '/js/widget-glyphs.js?v=12b0a947';

/** @type {{ openModal: (idx: number|null) => void,
Expand Down
6 changes: 3 additions & 3 deletions public/js/admin-settings.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { toast, ag, ap, reveal, swapContent } from '/js/admin-shared.js?v=ca64cc9c';
import { toast, ag, ap, reveal, swapContent } from '/js/admin-shared.js?v=5cf446fa';
import { pwStrength } from '/js/password-strength.js?v=42f45ac7';
import { t } from '/js/i18n.js?v=e644a5c5';
import { t } from '/js/i18n.js?v=1f1ea9c1';
import {
shouldWritePassword,
settingsSaveBlocker,
Expand All @@ -9,7 +9,7 @@ import {
BLOCK,
} from '/js/admin-logic.js?v=69e57d35';
import { confirmText } from '/js/modal.js?v=11fa1eff';
import { el, inp, setUserText } from '/js/utils.js?v=ada0c382';
import { el, inp, setUserText } from '/js/utils.js?v=70cbc405';

/* Mirrors the server's rule: auth cannot be switched on with no password. */
let _passwordSet = false;
Expand Down
6 changes: 3 additions & 3 deletions public/js/admin-shared.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Stateless helpers shared by the admin modules. Mutable state stays out. */
import { recoversSession, toastHoldMs } from '/js/admin-logic.js?v=69e57d35';
import { el, q } from '/js/utils.js?v=ada0c382';
import { t } from '/js/i18n.js?v=e644a5c5';
import { el, q } from '/js/utils.js?v=70cbc405';
import { t } from '/js/i18n.js?v=1f1ea9c1';
import { iconChain } from '/js/icons.js?v=9c8c550c';

export const API = '';
Expand Down Expand Up @@ -38,7 +38,7 @@ export const toast = (m, t = 'ok') => {

/* Carry `kind` and `detail`, so callers branch on data, never on message
text. */
/** An error carrying the API's structured fields. See docs/api-errors.md.
/** An error carrying the API's structured fields.
@typedef {Error & { status?: number, kind?: string, detail?: Record<string, unknown> }} ApiError */

/** @param {number} status @param {any} body @returns {ApiError} */
Expand Down
10 changes: 5 additions & 5 deletions public/js/admin-widget-form.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { state } from '/js/admin-state.js?v=5a5d655f';
import { PE_SVG, initInlineEdit, swapContent } from '/js/admin-shared.js?v=ca64cc9c';
import { createListbox } from '/js/listbox.js?v=3e267705';
import { renderWidgetConfigForm } from '/js/widget-config-form.js?v=b0c9ade8';
import { PE_SVG, initInlineEdit, swapContent } from '/js/admin-shared.js?v=5cf446fa';
import { createListbox } from '/js/listbox.js?v=a67e9c98';
import { renderWidgetConfigForm } from '/js/widget-config-form.js?v=785f41f6';
import { html, raw, setHtml } from '/js/html.js?v=c71f8903';
import { sizesForView, widgetConfigMode, rejectionLines, carriesTypedValues } from '/js/admin-logic.js?v=69e57d35';
import { t } from '/js/i18n.js?v=e644a5c5';
import { q, qi, qa } from '/js/utils.js?v=ada0c382';
import { t } from '/js/i18n.js?v=1f1ea9c1';
import { q, qi, qa } from '/js/utils.js?v=70cbc405';

const SIZE_ICONS = {
small:
Expand Down
24 changes: 12 additions & 12 deletions public/js/admin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { buildAppForm, buildFolderForm, captureActLabels, serializeKvRows } from '/js/admin-app-form.js?v=06ddf610';
import { checkAuth, requireLogin, wirePasswordStrength } from '/js/admin-auth.js?v=ae0bd2a5';
import { initList, render, syncFilterUI } from '/js/admin-list.js?v=937c0555';
import { buildAppForm, buildFolderForm, captureActLabels, serializeKvRows } from '/js/admin-app-form.js?v=0ed92d16';
import { checkAuth, requireLogin, wirePasswordStrength } from '/js/admin-auth.js?v=8f4673da';
import { initList, render, syncFilterUI } from '/js/admin-list.js?v=d0669049';
import { resolveAdminSection } from '/js/admin-logic.js?v=69e57d35';
import {
buildAppItem,
Expand All @@ -10,15 +10,15 @@ import {
snapshotItems,
upsertItem,
} from '/js/admin-save-logic.js?v=4f71ef6c';
import { loadSettings, settingsDirty, showBgFields, showWallpaperFile } from '/js/admin-settings.js?v=98013f90';
import { ag, ap, initInlineEdit, paintIcon, reveal, setReauthHandler, toast } from '/js/admin-shared.js?v=ca64cc9c';
import { loadSettings, settingsDirty, showBgFields, showWallpaperFile } from '/js/admin-settings.js?v=81778efd';
import { ag, ap, initInlineEdit, paintIcon, reveal, setReauthHandler, toast } from '/js/admin-shared.js?v=5cf446fa';
import { collapsedFolders, filter, state } from '/js/admin-state.js?v=5a5d655f';
import { buildWidgetForm } from '/js/admin-widget-form.js?v=20f4cf98';
import { buildWidgetForm } from '/js/admin-widget-form.js?v=6c778690';
import { initFluidHover } from '/js/fluid-hover.js?v=cb886e86';
import { initGlideSelect, syncGlideSelect } from '/js/glide-select.js?v=8b39e9d0';
import { createListbox } from '/js/listbox.js?v=3e267705';
import { createListbox } from '/js/listbox.js?v=a67e9c98';
import { html, raw, setHtml } from '/js/html.js?v=c71f8903';
import { initI18n, LANGUAGES, t } from '/js/i18n.js?v=e644a5c5';
import { initI18n, LANGUAGES, t } from '/js/i18n.js?v=1f1ea9c1';
import { loadLocalIcons } from '/js/icons.js?v=9c8c550c';
import {
clearSkipTls,
Expand All @@ -29,11 +29,11 @@ import {
parseErrorsAsSkipped,
SKIP,
} from '/js/import-foreign.js?v=722d1c25';
import { isMobileLayout, onLayoutChange } from '/js/layout.js?v=9de1cb7d';
import { isMobileLayout, onLayoutChange } from '/js/layout.js?v=e9f4b607';
import { confirmModal, confirmText, openModal as openDialog, promptModal } from '/js/modal.js?v=11fa1eff';
import { readMode, watchSystemTheme, writeMode } from '/js/theme.js?v=00c011c9';
import { el, inp, q, qa, clr as rc, sanitizeCssUrl, setUserText, tgt } from '/js/utils.js?v=ada0c382';
import { normalizeColorInput } from '/js/admin-color-control.js?v=cfb3b3e9';
import { readMode, watchSystemTheme, writeMode } from '/js/theme.js?v=787bfdff';
import { el, inp, q, qa, clr as rc, sanitizeCssUrl, setUserText, tgt } from '/js/utils.js?v=70cbc405';
import { normalizeColorInput } from '/js/admin-color-control.js?v=47d9d808';
import { parseYamlTolerant, YamlLiteError } from '/js/yaml-lite.js?v=6ebb564c';
import { loadWallpaper, saveWallpaper } from '/js/wallpaper-cache.js?v=c5f8a3e6';

Expand Down
10 changes: 5 additions & 5 deletions public/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import {
setUserText,
teardownWidgets,
titleWhenTruncated,
} from '/js/utils.js?v=ada0c382';
} from '/js/utils.js?v=70cbc405';
import { initFluidHover } from '/js/fluid-hover.js?v=cb886e86';
import { initSpotlight } from '/js/spotlight.js?v=bcf8c942';
import { initSpotlight } from '/js/spotlight.js?v=12d9a895';
import { html, setHtml, raw } from '/js/html.js?v=c71f8903';
import { initI18n, t, currentLang } from '/js/i18n.js?v=e644a5c5';
import { initI18n, t, currentLang } from '/js/i18n.js?v=1f1ea9c1';
import { pwStrength, passwordMismatch } from '/js/password-strength.js?v=42f45ac7';
import { sanitizeItemLinks } from '/js/link-url.js?v=54adb40f';
import {
Expand All @@ -39,14 +39,14 @@ import {
buildMobile,
resetMobileChrome,
mkFolderGlyph,
} from '/js/ui.js?v=cc6f0031';
} from '/js/ui.js?v=8c5a8dba';
import { badgeMinimum, badgeSignature, computeBadgeVisual, readBadgeUpdate } from '/js/badge-logic.js?v=b3c8b6c2';
import { formatNumber } from '/js/format-number.js?v=4a5ccef4';
import { closeBadgePopover, wireBadgePopover } from '/js/badge-popover.js?v=aa52b1a3';
import { configChanged, desktopCols, landingAfterSetup, restorePage } from '/js/dashboard-logic.js?v=a8f759ed';
import { loadWallpaper, saveWallpaper } from '/js/wallpaper-cache.js?v=c5f8a3e6';
import { jitter } from '/js/jitter.js?v=4eeef4c9';
import { isMobileLayout, onLayoutChange } from '/js/layout.js?v=9de1cb7d';
import { isMobileLayout, onLayoutChange } from '/js/layout.js?v=e9f4b607';
import { startWakeLock } from '/js/wake-lock.js?v=6b9591cf';
import { applyLabelTones, loadSamplingImage, sampleImage, toneForColor } from '/js/label-contrast.js?v=c1ac6fb8';

Expand Down
3 changes: 1 addition & 2 deletions public/js/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ async function fetchCatalog(code) {
}
}

/* Development locales, reached by ?lang= and absent from the registry.
What each one does: docs/i18n.md. */
/* Development locales, reached by ?lang= and absent from the registry. */
export const PSEUDO_LANG = 'en-XA';
export const KEY_LANG = 'cimode';

Expand Down
3 changes: 1 addition & 2 deletions public/js/layout.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @ts-check
/* Keep this module free of imports. Both entry points load it first.
Why the test has two halves: docs/frontend.md, Layout. */
/* Keep this module free of imports. Both entry points load it first. */

export const MOBILE_QUERY = '(max-width:768px)';
const PORTRAIT_QUERY = '(orientation:portrait)';
Expand Down
2 changes: 1 addition & 1 deletion public/js/listbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { nextActiveIndex } from '/js/admin-logic.js?v=69e57d35';
import { fluidHoverClear, fluidHoverKb } from '/js/fluid-hover.js?v=cb886e86';
import { html, raw, setHtml } from '/js/html.js?v=c71f8903';
import { qa } from '/js/utils.js?v=ada0c382';
import { qa } from '/js/utils.js?v=70cbc405';

const CHEV =
'<svg class="dd-chev" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 10.5 12 6.5 16 10.5"/><path d="M8 13.5 12 17.5 16 13.5"/></svg>';
Expand Down
4 changes: 2 additions & 2 deletions public/js/spotlight.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fluidHoverClear, fluidHoverKb } from '/js/fluid-hover.js?v=cb886e86';
import { mk, clr, el, inp as inpById, q, qa, setUserText } from '/js/utils.js?v=ada0c382';
import { t } from '/js/i18n.js?v=e644a5c5';
import { mk, clr, el, inp as inpById, q, qa, setUserText } from '/js/utils.js?v=70cbc405';
import { t } from '/js/i18n.js?v=1f1ea9c1';

/* Attached to the window so a re-open can undo the previous one. */
const _w = /** @type {any} */ (window);
Expand Down
5 changes: 2 additions & 3 deletions public/js/theme.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* Never write the choice to the config: it is per device.
Why it is resolved here rather than in a media query, and why admin-theme.js
repeats it: docs/frontend.md, Theme. */
/* Never write the choice to the config: it is per device. admin-theme.js
repeats this decision before first paint. */

export const THEME_KEY = 'sy-theme';

Expand Down
4 changes: 2 additions & 2 deletions public/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
q,
qa,
setUserText,
} from '/js/utils.js?v=ada0c382';
import { t, currentLang } from '/js/i18n.js?v=e644a5c5';
} from '/js/utils.js?v=70cbc405';
import { t, currentLang } from '/js/i18n.js?v=1f1ea9c1';
import { toneForColor } from '/js/label-contrast.js?v=c1ac6fb8';
import { mobileMetrics, gridColumnWidth, gridCellCount } from '/js/mobile-metrics.js?v=ab5fe77e';

Expand Down
2 changes: 1 addition & 1 deletion public/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { iconChain } from '/js/icons.js?v=9c8c550c';
import { toneForColor } from '/js/label-contrast.js?v=c1ac6fb8';
import { SETTINGS_ICON } from '/js/settings-icon.js?v=b96e5b13';
import { BRAND_MARK } from '/js/brand-mark.js?v=1dcbf1ac';
import { t } from '/js/i18n.js?v=e644a5c5';
import { t } from '/js/i18n.js?v=1f1ea9c1';

export const mk = (t, a = {}) => {
const e = document.createElement(t);
Expand Down
13 changes: 6 additions & 7 deletions public/js/widget-config-form.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* Renders a widget's declared `fields` into a config form and reads the values
back. Each builder returns { el, get, control, liveValue }. See
docs/widgets.md. */
back. Each builder returns { el, get, control, liveValue }. */

import { t } from '/js/i18n.js?v=e644a5c5';
import { t } from '/js/i18n.js?v=1f1ea9c1';
import { html, raw, setHtml } from '/js/html.js?v=c71f8903';
import { reveal } from '/js/admin-shared.js?v=ca64cc9c';
import { createListbox } from '/js/listbox.js?v=3e267705';
import { renderColorControl } from '/js/admin-color-control.js?v=cfb3b3e9';
import { reveal } from '/js/admin-shared.js?v=5cf446fa';
import { createListbox } from '/js/listbox.js?v=a67e9c98';
import { renderColorControl } from '/js/admin-color-control.js?v=47d9d808';
import {
seedCarried,
applyOptionSet,
Expand All @@ -16,7 +15,7 @@ import {
visibleFieldFlags,
} from '/js/admin-logic.js?v=69e57d35';
import { optionsErrorAdvice, TONE } from '/js/admin-error.js?v=10f3cdb1';
import { qi } from '/js/utils.js?v=ada0c382';
import { qi } from '/js/utils.js?v=70cbc405';

const PE =
'<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5"/><path d="M18.4 2.6a1.85 1.85 0 0 1 2.6 2.6l-9.1 9.1-3.4 1 1-3.4z"/></svg>';
Expand Down
5 changes: 2 additions & 3 deletions public/js/widget-error.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check
/* The failure states every widget shares. The wording comes from the kind the
API sends, documented in docs/api-errors.md.
API sends.

Never draw a response's error message. It names hosts, ports and status
codes, and it is not translated. */
Expand Down Expand Up @@ -126,8 +126,7 @@ function ensureStyle(doc) {
doc.head.appendChild(s);
}

/** One widget's error, empty and healthy states. The options are documented in
docs/widgets.md.
/** One widget's error, empty and healthy states.

@param {any} opts */
export function errorState(opts = {}) {
Expand Down
4 changes: 1 addition & 3 deletions public/js/widget-toolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { esc, html, setHtml } from '/js/html.js?v=c71f8903';
import { isSafeLinkUrl } from '/js/link-url.js?v=54adb40f';
import { jitter } from '/js/jitter.js?v=4eeef4c9';
import { errorState as _errorState, errorKind, errorCopy } from '/js/widget-error.js?v=27d63b49';
import { errorState as _errorState, errorKind, errorCopy } from '/js/widget-error.js?v=962e496a';

export { esc, html, setHtml };

Expand Down Expand Up @@ -282,8 +282,6 @@ export function errorLine(err) {
return _t(key, text);
}

/* The options and the poll lifecycle are documented in docs/widgets.md. */

/* Widgets on a page the user has swiped away from keep running: the dashboard
mounts every page at once. It multiplies their poll interval through
window.__setPollRate, which the dashboard calls on each frame. */
Expand Down
2 changes: 1 addition & 1 deletion public/widgets/backup/backup.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<body>
<div class="widget" id="widget" role="group" aria-label="Backup status"></div>
<script type="module">
import { poll, fetchData, openUrl, html, setHtml, loadStrings, wt, errorState } from '/js/widget-toolbox.js?v=01f4c217';
import { poll, fetchData, openUrl, html, setHtml, loadStrings, wt, errorState } from '/js/widget-toolbox.js?v=22c75845';
await loadStrings();
document.getElementById('widget').setAttribute('aria-label', wt('ui.backupStatus', 'Backup status'));
const id = new URLSearchParams(location.search).get('id') || '';
Expand Down
Loading