Dawnline 0.16.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
- The personal page loads faster and costs the router less: its script and styles come compressed, stay in the browser until the next update, and the icon comes with the page instead of a request of its own - The page uses the system's own font (SF Pro on Apple devices, Segoe UI on Windows, Roboto on Android) instead of downloading one - The top of the page shows the server's name alone, so it fits on a phone - Text can be selected only where it is there to be copied (addresses, file names, the configuration), with the name field's own selection: a soft highlight with handles that glides after the pointer - Sheets scroll without a scrollbar - Red buttons (Remove) light up under the pointer, as the others do - Demo: "Demo" and GitHub are one button; on a phone it floats at the bottom of the screen, and switching scenarios no longer makes the edge fades jump
This commit is contained in:
1 parent
750564ab7e
commit
2388603322
91 files changed
+2564
-1027
No files matched your search
+7
-5
@@ -2,6 +2,7 @@ import { defineConfig } from 'tsup';
|
||||
import { build, transform, type Plugin } from 'esbuild';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import zlib from 'node:zlib';
|
||||
import { catalogOf, parsePo } from './i18n/po.ts';
|
||||
|
||||
const PKG = '../package/luci-app-dawnline';
|
||||
@@ -42,8 +43,6 @@ async function portalCss(): Promise<string> {
|
||||
minify: true,
|
||||
write: false,
|
||||
legalComments: 'none',
|
||||
// The fonts sit next to the stylesheet on the router: their URLs stay as written.
|
||||
external: ['*.woff2'],
|
||||
logLevel: 'silent',
|
||||
});
|
||||
return r.outputFiles[0].text.trim();
|
||||
@@ -86,7 +85,8 @@ export default defineConfig([
|
||||
outDir: ADMIN_OUT,
|
||||
outExtension: () => ({ js: '.js' }),
|
||||
target: 'es2020',
|
||||
clean: false,
|
||||
// The folder is all build output (git-ignored): emptied first, so nothing stale ships.
|
||||
clean: true,
|
||||
sourcemap: false,
|
||||
// Identifiers only: LuCI's require directives in the banner must stay as written.
|
||||
minify: true,
|
||||
@@ -115,7 +115,7 @@ export default defineConfig([
|
||||
outDir: PORTAL_OUT,
|
||||
outExtension: () => ({ js: '.js' }),
|
||||
target: 'es2019',
|
||||
clean: false,
|
||||
clean: true,
|
||||
sourcemap: false,
|
||||
minify: true,
|
||||
noExternal: ['qrcode-generator'],
|
||||
@@ -126,8 +126,10 @@ export default defineConfig([
|
||||
},
|
||||
onSuccess: async () => {
|
||||
fs.writeFileSync(path.join(PORTAL_OUT, 'portal.css'), (await portalCss()) + '\n');
|
||||
// portal.uc sends these to a browser that takes gzip (a third of the bytes over a slow link).
|
||||
for (const f of ['portal.js', 'portal.css'])
|
||||
fs.writeFileSync(path.join(PORTAL_OUT, `${f}.gz`), zlib.gzipSync(fs.readFileSync(path.join(PORTAL_OUT, f)), { level: 9 }));
|
||||
fs.copyFileSync('src/portal/icon.svg', path.join(PORTAL_OUT, 'icon.svg'));
|
||||
for (const f of fs.readdirSync('src/portal/fonts')) fs.copyFileSync(path.join('src/portal/fonts', f), path.join(PORTAL_OUT, f));
|
||||
},
|
||||
},
|
||||
]);
|
||||
Reference in new issue
Block a user