Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
flatsiedatsie authored Jul 18, 2022
1 parent 56270c1 commit 8a28d44
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
20 changes: 15 additions & 5 deletions js/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
*/

const nice_name = this.get_thing_and_property_string(dataline['thing'],dataline['property']);
console.log("nice name: " + nice_name);
//console.log("nice name: " + nice_name);
var textnode = document.createTextNode( nice_name ); // Create a text node


Expand All @@ -72,14 +72,14 @@
display_thing_data(property_id, data_type, raw_data) { // Uses json to generate dataviz

try{
console.log("in display_thing_data. property_id: " + property_id);
//console.log("in display_thing_data. property_id: " + property_id);
const dataviz = document.getElementById('extension-privacy-manager-thing-dataviz');
//console.log("dataviz:",dataviz);
//dataviz.innerHTML = "";


if(raw_data.length == 0){
console.log("no data to visualize");
//console.log("no data to visualize");
document.getElementById('extension-privacy-manager-no-data-available').style.display = 'block';
document.getElementById("extension-privacy-manager-thing-dataviz-svg").style.display = 'none';
}
Expand Down Expand Up @@ -553,7 +553,7 @@
`/extensions/${this.id}/api/print_test` //,{'printer_log':printer_log, 'printer_interval':printer_interval}

).then((body) => {
console.log(body);
//console.log(body);
if(body.printer_connected == false){
alert("Could not connect to printer. Try turning it on and off again.");
}
Expand Down Expand Up @@ -758,7 +758,17 @@
hide(){
//console.log("in hide");
//clearInterval(window.zigbee2mqtt_interval);
this.view.innerHTML = "";
//this.view.innerHTML = "";

try{
if(document.getElementById('extension-privacy-manager-menu-item').classList.contains('selected') == false){
this.view.innerHTML = "";
}
}
catch(e){
console.log("Privacy manager addon: error in hide(): ", e);
}

}


Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
},
"short_name": "Privacy",
"version": "0.2.7",
"version": "0.2.8",
"web_accessible_resources": [
"css/*.css",
"images/*.svg",
Expand Down
16 changes: 12 additions & 4 deletions views/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,19 @@ <h4>Selected point</h4>


<div id="extension-privacy-manager-tab-internal-logs" class="extension-privacy-manager-tab extension-privacy-manager-centered-page">

<h3>Internal logs</h3>
<div id="extension-privacy-manager-logs-list"></div>
<p>The internal logs can be automatically deleted every hour.</p>
<input type="checkbox" id="extension-privacy-manager-delete-internal-logs-checkbox" name="extension-privacy-manager-delete-internal-logs-checkbox"/><label for="extension-privacy-manager-delete-internal-logs-checkbox">Automatically delete</label><br/>
<button type="button" id="extension-privacy-manager-button-delete-all-logs" class="text-button">Delete all internal logs</button>

<div class="extension-privacy-manager-vlak">
<div id="extension-privacy-manager-logs-list"></div>
<button type="button" id="extension-privacy-manager-button-delete-all-logs" class="text-button">Delete all internal logs</button>
</div>

<div class="extension-privacy-manager-vlak">
<p>The internal logs can be automatically deleted every hour.</p>
<input type="checkbox" id="extension-privacy-manager-delete-internal-logs-checkbox" name="extension-privacy-manager-delete-internal-logs-checkbox"/><label for="extension-privacy-manager-delete-internal-logs-checkbox">Automatically delete</label><br/>
</div>

</div>


Expand Down

0 comments on commit 8a28d44

Please sign in to comment.