mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-20 05:04:44 +01:00
v4.4.0.5 - Update NSPanelTs.ts
- Remove day.js - Change identifier from day.js to moment.js
This commit is contained in:
@@ -25,7 +25,7 @@ durchführen und FlashNextion wiederholen.
|
|||||||
Ab Tasmota > 13.0.0 ist für ein Upgrade ggfs. eine Umpartitionierung erforderlich
|
Ab Tasmota > 13.0.0 ist für ein Upgrade ggfs. eine Umpartitionierung erforderlich
|
||||||
https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Tasmota-FAQ#3-tasmota-update-probleme
|
https://github.com/joBr99/nspanel-lovelace-ui/wiki/NSPanel-Tasmota-FAQ#3-tasmota-update-probleme
|
||||||
*****************************************************************************************************************************
|
*****************************************************************************************************************************
|
||||||
Ab Script Version 4.3.2.1 muss in der JavaScript Instanz die npm Module 'moment', 'moment-parseformat' und 'dayjs' eingetragen sein
|
Ab Script Version 4.3.2.1 muss in der JavaScript Instanz die npm Module 'moment' und 'moment-parseformat' eingetragen sein
|
||||||
https://github.com/joBr99/nspanel-lovelace-ui/wiki/iobroker---Basisinstallation#8--einstellungen-in-js-adapter-instanz
|
https://github.com/joBr99/nspanel-lovelace-ui/wiki/iobroker---Basisinstallation#8--einstellungen-in-js-adapter-instanz
|
||||||
*****************************************************************************************************************************
|
*****************************************************************************************************************************
|
||||||
|
|
||||||
@@ -1024,10 +1024,10 @@ let checkBlindActive: boolean = false;
|
|||||||
async function Init_momentjs() {
|
async function Init_momentjs() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
moment.locale(`'${getDayjsLocale()}'`);
|
moment.locale(`'${getMomentjsLocale()}'`);
|
||||||
|
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
log('error at function init_dayjs: ' + err.message, 'warn');
|
log('error at function init_momentjs: ' + err.message, 'warn');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Init_momentjs();
|
Init_momentjs();
|
||||||
@@ -2703,7 +2703,7 @@ setTimeout(async function () {
|
|||||||
|
|
||||||
//------------------Begin Update Functions
|
//------------------Begin Update Functions
|
||||||
|
|
||||||
function getDayjsLocale(): String {
|
function getMomentjsLocale(): String {
|
||||||
try {
|
try {
|
||||||
let locale = getState(NSPanel_Path + 'Config.locale').val;
|
let locale = getState(NSPanel_Path + 'Config.locale').val;
|
||||||
if (locale == 'hy-AM' || locale == 'zh-CN' || locale == 'zh-TW') {
|
if (locale == 'hy-AM' || locale == 'zh-CN' || locale == 'zh-TW') {
|
||||||
@@ -2712,7 +2712,7 @@ function getDayjsLocale(): String {
|
|||||||
return locale.substring(0, 2);
|
return locale.substring(0, 2);
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
log('error in function getDayjsLocale: ' + err.message, 'warn');
|
log('error in function getMomentjsLocale: ' + err.message, 'warn');
|
||||||
return 'en';
|
return 'en';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user