🎨 Sync 2026-10-09 01:04:17

This commit is contained in:
github-actions[bot] committed 2026-10-09 01:04:17 +08:00
1 parent eb76e89012
commit 812da7f08b
154 files changed
+10613 -3987

No files matched your search

@@ -118,6 +118,19 @@ for (const template of ['header.ut', 'header_login.ut']) {
});
}
test('login layouts allow supported styles and fall back for old or invalid configs', () => {
const selected = (value, hasConfig = true) => runUcodeSnippet(
'ucode/template/themes/argon/sysauth.ut',
"let login_style = 'classic';", '\n\t// Per-request',
configSetup + '\nlet fs = { access };', 'login_style', { login_style: value }, hasConfig
);
assert.equal(selected('classic'), 'classic');
assert.equal(selected('centered'), 'centered');
assert.equal(selected('centered', false), 'classic');
for (const value of [undefined, null, '', 'unknown', 'CENTERED', '" onclick="alert(1)', '../centered', 1, ['centered'], {}])
assert.equal(selected(value), 'classic');
});
test('local backgrounds accept dotted names and encode spaces', () => {
const setup = `
let fs = { lsdir: path => ['photo.jpg', 'my.photo.jpg', 'space name.webp', 'hash#name.jpg', 'what?.png', 'VIDEO.MP4', 'notes.txt'] };