mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-18 10:57:01 +01:00
v4.6.0.1 - DEV Update NSPanelTs.ts
Hide Entity2 in cardQR
This commit is contained in:
@@ -155,6 +155,7 @@ ReleaseNotes:
|
|||||||
- 16.03.2025 - v4.6.0.1 Add icon2 to Lights
|
- 16.03.2025 - v4.6.0.1 Add icon2 to Lights
|
||||||
- 17.03.2025 - v4.6.0.1 Add Functions to Calculate Colors of RGB and CT Icons (Darken and CT (Kelvin/Mired))
|
- 17.03.2025 - v4.6.0.1 Add Functions to Calculate Colors of RGB and CT Icons (Darken and CT (Kelvin/Mired))
|
||||||
- 17.03.2025 - v4.6.0.1 Add function cie_to_rgb, Add CIE Channel to Lights
|
- 17.03.2025 - v4.6.0.1 Add function cie_to_rgb, Add CIE Channel to Lights
|
||||||
|
- 18.03.2025 - v4.6.0.1 Add hidden Entity2 (Password/Switch) to cardQR (PageItem-Parameter "hideEntity2" true/false)
|
||||||
|
|
||||||
Todo:
|
Todo:
|
||||||
- XX.12.2024 - v5.0.0 ioBroker Adapter
|
- XX.12.2024 - v5.0.0 ioBroker Adapter
|
||||||
@@ -8051,6 +8052,10 @@ function GenerateQRPage (page: NSPanel.PageQR): NSPanel.Payload[] {
|
|||||||
if (page.items[0].hidePassword !== undefined && page.items[0].hidePassword == true) {
|
if (page.items[0].hidePassword !== undefined && page.items[0].hidePassword == true) {
|
||||||
hiddenPWD = true;
|
hiddenPWD = true;
|
||||||
}
|
}
|
||||||
|
let hiddenSwitch = false;
|
||||||
|
if (page.items[0].hideEntity2 !== undefined && page.items[0].hideEntity2 == true) {
|
||||||
|
hiddenSwitch = true;
|
||||||
|
}
|
||||||
|
|
||||||
const tempstr = textQR.split(';');
|
const tempstr = textQR.split(';');
|
||||||
let optionalValue1: any;
|
let optionalValue1: any;
|
||||||
@@ -8072,7 +8077,7 @@ function GenerateQRPage (page: NSPanel.PageQR): NSPanel.Payload[] {
|
|||||||
let type1 = 'text';
|
let type1 = 'text';
|
||||||
let internalName1 = findLocale('qr', 'ssid');
|
let internalName1 = findLocale('qr', 'ssid');
|
||||||
let iconId1 = Icons.GetIcon('wifi');
|
let iconId1 = Icons.GetIcon('wifi');
|
||||||
let iconColor1 = 65535;
|
let iconColor1 = 65535
|
||||||
let displayName1 = findLocale('qr', 'ssid');
|
let displayName1 = findLocale('qr', 'ssid');
|
||||||
let type2 = 'text';
|
let type2 = 'text';
|
||||||
let internalName2 = findLocale('qr', 'password');
|
let internalName2 = findLocale('qr', 'password');
|
||||||
@@ -8080,15 +8085,27 @@ function GenerateQRPage (page: NSPanel.PageQR): NSPanel.Payload[] {
|
|||||||
let iconId2 = Icons.GetIcon('key');
|
let iconId2 = Icons.GetIcon('key');
|
||||||
let displayName2 = findLocale('qr', 'password');
|
let displayName2 = findLocale('qr', 'password');
|
||||||
|
|
||||||
if (hiddenPWD) {
|
if (existsState(page.items[0].id + '.SWITCH')) {
|
||||||
iconColor1 = getState(page.items[0].id + '.SWITCH').val ? rgb_dec565(colorScale0) : rgb_dec565(colorScale10);
|
iconColor1 = getState(page.items[0].id + '.SWITCH').val ? rgb_dec565(colorScale0) : rgb_dec565(colorScale10);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hiddenPWD) {
|
||||||
type2 = 'switch';
|
type2 = 'switch';
|
||||||
internalName2 = id;
|
internalName2 = id;
|
||||||
iconId2 = '';
|
iconId2 = getState(page.items[0].id + '.SWITCH').val ? Icons.GetIcon('router-wireless') : Icons.GetIcon('router-wireless-off');
|
||||||
displayName2 = getState(page.items[0].id + '.SWITCH').val ? findLocale('qr', 'Wlan enabled') : findLocale('qr', 'Wlan disabled');
|
displayName2 = getState(page.items[0].id + '.SWITCH').val ? findLocale('qr', 'Wlan enabled') : findLocale('qr', 'Wlan disabled');
|
||||||
optionalValue2 = getState(page.items[0].id + '.SWITCH').val ? 1 : 0;
|
optionalValue2 = getState(page.items[0].id + '.SWITCH').val ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hiddenSwitch) {
|
||||||
|
iconColor2 = defaultBackgroundColorParam;
|
||||||
|
type2 = 'text';
|
||||||
|
internalName2 = id;
|
||||||
|
iconId2 = '';
|
||||||
|
displayName2 = '';
|
||||||
|
optionalValue2 = '';
|
||||||
|
}
|
||||||
|
|
||||||
out_msgs.push({
|
out_msgs.push({
|
||||||
payload:
|
payload:
|
||||||
'entityUpd~' + //entityUpd
|
'entityUpd~' + //entityUpd
|
||||||
@@ -13319,6 +13336,7 @@ namespace NSPanel {
|
|||||||
targetPage?: string;
|
targetPage?: string;
|
||||||
modeList?: string[];
|
modeList?: string[];
|
||||||
hidePassword?: boolean;
|
hidePassword?: boolean;
|
||||||
|
hideEntity2?: boolean;
|
||||||
autoCreateALias?: boolean;
|
autoCreateALias?: boolean;
|
||||||
yAxis?: string;
|
yAxis?: string;
|
||||||
yAxisTicks?: number[] | string;
|
yAxisTicks?: number[] | string;
|
||||||
|
|||||||
Reference in New Issue
Block a user