Adding Invert commands to groups

This commit is contained in:
Robert Strouse 2024-01-05 17:03:45 -08:00
parent 4272d2245e
commit 9d3d7ae21f
9 changed files with 56 additions and 14 deletions

View file

@ -1 +1 @@
2.3.0
2.3.1

View file

@ -3,11 +3,11 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="main.css?v=2.3.0" type="text/css" />
<link rel="stylesheet" href="widgets.css?v=2.3.0" type="text/css" />
<link rel="stylesheet" href="icons.css?v=2.3.0" type="text/css" />
<link rel="stylesheet" href="main.css?v=2.3.1" type="text/css" />
<link rel="stylesheet" href="widgets.css?v=2.3.1" type="text/css" />
<link rel="stylesheet" href="icons.css?v=2.3.1" type="text/css" />
<link rel="icon" type="image/png" href="favicon.png" />
<script type="text/javascript" src="index.js?v=2.3.0"></script>
<script type="text/javascript" src="index.js?v=2.3.1"></script>
</head>
<body>
<div id="divContainer" class="container main" data-auth="false">
@ -554,6 +554,13 @@
<input id="fldGroupName" name="groupName" data-bind="name" type="text" length=20 placeholder="Name">
<label for="fldGroupName">Name</label>
</div>
<div style="margin-top:-10px;" id="divFlipGrpCommands">
<div class="field-group" style="display:inline-block">
<input id="cbFlipGrpCommands" name="flipCommands" data-bind="flipCommands" type="checkbox" style="" />
<label for="cbFlipGrpCommands" style="display:block;font-size:1em;margin-top:0px;margin-left:7px;display:inline-block;">Invert Commands</label>
</div>
</div>
<div classs="field-group" style="display:inline-block;">
<label for="selRepeatCommnds" style="cursor:pointer;color:#00bcd4;margin-right:4px;">Repeat Commands</label>
<select id="selRepeatCommands" data-bind="repeats" data-datatype="int" style="width:127px;">

View file

@ -19,7 +19,8 @@ var errors = [
{ code: -32, desc: "Git Update: Aborted." },
{ code: -40, desc: "Git Download: Http Error." },
{ code: -41, desc: "Git Download: Buffer Allocation Error." },
{ code: -42, desc: "Git Download: Download Connection Error." }
{ code: -42, desc: "Git Download: Download Connection Error." },
{ code: -43, desc: 'Git Download: Timeout Error.' }
]
document.oncontextmenu = (event) => {
if (event.target && event.target.tagName.toLowerCase() === 'input' && (event.target.type.toLowerCase() === 'text' || event.target.type.toLowerCase() === 'password'))
@ -1255,7 +1256,7 @@ var security = new Security();
class General {
initialized = false;
appVersion = 'v2.3.0';
appVersion = 'v2.3.1';
reloadApp = false;
init() {
if (this.initialized) return;
@ -2830,9 +2831,9 @@ class Somfy {
document.getElementById('spanShadeId').innerText = '*';
document.getElementById('divLinkedRemoteList').innerHTML = '';
document.getElementById('btnSetRollingCode').style.display = 'none';
document.getElementById('selShadeBitLength').value = 56;
document.getElementById('cbFlipCommands').value = false;
document.getElementById('cbFlipPosition').value = false;
//document.getElementById('selShadeBitLength').value = 56;
//document.getElementById('cbFlipCommands').value = false;
//document.getElementById('cbFlipPosition').value = false;
if (err) {
ui.serviceError(err);
}
@ -2842,6 +2843,7 @@ class Somfy {
shade.name = '';
shade.downTime = shade.upTime = 10000;
shade.tiltTime = 7000;
shade.bitLength = 56;
shade.flipCommands = shade.flipPosition = false;
ui.toElement(elShade, shade);
this.showEditShade(true);
@ -2910,6 +2912,7 @@ class Somfy {
else {
console.log(group);
group.name = '';
group.flipCommands = false;
ui.toElement(document.getElementById('somfyGroup'), group);
this.showEditGroup(true);
}
@ -3977,6 +3980,16 @@ class Firmware {
break;
case 3: // Updating -- this will be set by the update progress.
break;
case 4:
div.style.color = 'red';
let e = errors.find(x => x.code === rel.error) || { code: err.code, desc: 'Unspecified error' };
let inst = document.getElementById('divGitInstall');
if (inst) {
inst.remove();
ui.errorMessage(e.desc);
}
div.innerHTML = e.desc;
break;
case 5:
div.style.color = 'red';
div.innerHTML = `Cancelling firmware update`;