feat: auto-hide navigation bar #45

This commit is contained in:
leukipp
2025-07-10 20:54:32 +02:00
parent d3af6d397e
commit cbfd0538e7
2 changed files with 23 additions and 9 deletions
+4 -3
View File
@@ -20,6 +20,8 @@ const init = async () => {
console.error("Please provide the '--mqtt-url' parameter with mqtt(s)");
return app.quit();
}
// Parse arguments
const url = new URL(ARGS.mqtt_url);
const user = ARGS.mqtt_user ? ARGS.mqtt_user : null;
const password = ARGS.mqtt_password ? ARGS.mqtt_password : null;
@@ -30,14 +32,13 @@ const init = async () => {
const hostName = hardware.getHostName();
const serialNumber = hardware.getSerialNumber();
const serialNumberSuffix = serialNumber.slice(-6);
const deviceId = serialNumberSuffix.toUpperCase().replace(/[^A-Z0-9]/g, "");
const deviceName = hostName.charAt(0).toUpperCase() + hostName.slice(1);
const deviceId = serialNumberSuffix.toUpperCase().replace(/[^A-Z0-9]/g, "");
// Init globals
INTEGRATION.discovery = discovery;
INTEGRATION.node = `rpi_${deviceId}`;
INTEGRATION.root = `${app.getName()}/${INTEGRATION.node}`;
INTEGRATION.discovery = discovery;
INTEGRATION.device = {
name: `TouchKio ${deviceName}`,
model: model,