modules: fix default values

fix default values for luci-base and luci-mod-{dashboard,status,system}

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
This commit is contained in:
Andy Chiang
2025-10-21 04:18:35 +07:00
committed by Paul Donald
parent 2382578209
commit f83fe35dae
4 changed files with 8 additions and 9 deletions

View File

@@ -52,12 +52,12 @@ return baseclass.extend({
var date = new Date(unixtime * 1000),
zn = uci.get('system', '@system[0]', 'zonename')?.replaceAll(' ', '_') || 'UTC',
ts = uci.get('system', '@system[0]', 'clock_timestyle') || 0,
hc = uci.get('system', '@system[0]', 'clock_hourcycle') || 'h23';
hc = uci.get('system', '@system[0]', 'clock_hourcycle') || 0;
datestr = new Intl.DateTimeFormat(undefined, {
dateStyle: 'medium',
timeStyle: (ts == 0) ? 'long' : 'full',
hourCycle: hc,
hourCycle: (hc == 0) ? undefined : hc,
timeZone: zn
}).format(date);
}