mirror of
https://github.com/openwrt/luci.git
synced 2026-04-15 19:01:56 +00:00
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:
@@ -73,12 +73,12 @@ var CBILogreadBox = function(logtag, name) {
|
||||
try {
|
||||
const tz = uci.get('system', '@system[0]', 'zonename')?.replaceAll(' ', '_');
|
||||
const ts = uci.get('system', '@system[0]', 'clock_timestyle') || 0;
|
||||
const hc = uci.get('system', '@system[0]', 'clock_hourcycle') || 'h23';
|
||||
const hc = uci.get('system', '@system[0]', 'clock_hourcycle') || 0;
|
||||
const logEntries = await callLogRead(this.fetchMaxRows, false, true);
|
||||
const dateObj = new Intl.DateTimeFormat(undefined, {
|
||||
dateStyle: 'medium',
|
||||
timeStyle: (ts == 0) ? 'long' : 'full',
|
||||
hourCycle: hc,
|
||||
hourCycle: (hc == 0) ? undefined : hc,
|
||||
timeZone: tz
|
||||
});
|
||||
|
||||
|
||||
@@ -315,12 +315,12 @@ return baseclass.extend({
|
||||
const date = new Date(unixtime * 1000);
|
||||
const zn = uci.get('system', '@system[0]', 'zonename')?.replaceAll(' ', '_') || 'UTC';
|
||||
const ts = uci.get('system', '@system[0]', 'clock_timestyle') || 0;
|
||||
const hc = uci.get('system', '@system[0]', 'clock_hourcycle') || 'h23';
|
||||
const 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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -52,12 +52,12 @@ function formatTime(epoch) {
|
||||
var date = new Date(epoch * 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;
|
||||
|
||||
return new Intl.DateTimeFormat(undefined, {
|
||||
dateStyle: 'medium',
|
||||
timeStyle: (ts == 0) ? 'long' : 'full',
|
||||
hourCycle: hc,
|
||||
hourCycle: (hc == 0) ? undefined : hc,
|
||||
timeZone: zn
|
||||
}).format(date);
|
||||
}
|
||||
@@ -157,7 +157,6 @@ return view.extend({
|
||||
};
|
||||
|
||||
o = s.taboption('general', form.Flag, 'clock_timestyle', _('Full TimeZone Name'), _('Unchecked means the timezone offset (E.g. GMT+1) is displayed'));
|
||||
o.default = o.enabled;
|
||||
|
||||
o = s.taboption('general', form.ListValue, 'clock_hourcycle', _('Time Format'));
|
||||
o.value('', _('Default'));
|
||||
|
||||
Reference in New Issue
Block a user