Skip to content

Commit

Permalink
Security panel parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
lokonli committed Dec 28, 2020
1 parent 11821e9 commit e354ad0
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 120 deletions.
87 changes: 45 additions & 42 deletions css/creative.css
Original file line number Diff line number Diff line change
Expand Up @@ -2723,30 +2723,41 @@ td.agenda-title {
background-color: rgba(0, 0, 0, 0.2);
}

.sec-modal .sec-frame {
position: relative
}

.sec-frame {
border-radius: 5px;
position: relative;
width: 12em;
margin: 0 auto
}

.sec-frame.decorated {
background-image: url(../img/bg14.jpg);
-webkit-box-shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 10px 10px 5px 0px rgba(0, 0, 0, 0.75);
box-shadow: 0px 6px 20px 5px rgba(0, 0, 0, 0.75), inset 0px 5px 7px -2px rgba(252, 252, 252, 0.2), inset 0 -14px 8px 2px rgba(0, 0, 0, 0.7);
border-radius: 5px;
position: relative;
height: 100%;
padding: 1em;
}

.sec-frame:not(.decorated) {
background-color: rgba(0,0,0,0.2);
}

.sec-frame .keypad-header {
display: flex;
white-space: nowrap;
align-items: center;
justify-content: center;
height: 5%;
position: absolute;
width: 100%;
top: 7%;
font-size: 2vw;
height: 2em;
font-size: 100%;
}

.sec-frame .keypad-header .fas {
font-size: 100%;
font-size: 100% !important;
}

.sec-frame .keypad-header .text {
Expand Down Expand Up @@ -2782,30 +2793,20 @@ td.agenda-title {
color: #494848;
text-align: center;
font-family: monospace;
position: absolute;
bottom: 7%;
width: 100%;
height: 3%;
font-size: 0.6vw;
font-size: 50%;
line-height: 2;
}

.sec-frame .keypad-input {
text-align: left;
position: absolute;
width: 80%;
top: 15%;
height: 75%;
margin: 0 10%;
margin: 0 2%;
}

.sec-frame .keypad-input table {
border-collapse: separate;
border-spacing: 1px;
width: 100%;
position: absolute;
top: 12%;
margin: 0;
height: 82%;
}

.sec-frame .keypad-input table td {
Expand All @@ -2815,22 +2816,19 @@ td.agenda-title {

.sec-frame .keypad-input table tr {
white-space: nowrap;
height: 25%;
}

.sec-frame .keypad-input .input-container {
background-color: #161616;
position: absolute;
overflow: hidden;
height: 10%;
left: 2%;
right: 2%;
margin: 0 2%;
}

.sec-frame.decorated .keypad-input .input-container {
box-shadow: 0px 2px 9px 1px rgba(0, 0, 0, 0.8);
}

.sec-frame .keypad-input .key-input {
font-family: 'Audiowide' !important;
font-size: 2vw;
width: 100%;
border-radius: 3px;
background-color: #161616;
Expand All @@ -2840,6 +2838,7 @@ td.agenda-title {
font-family: monospace;
text-align: center;
height: 100%;
font-size: 70%;
}

.text-strobe {
Expand Down Expand Up @@ -2869,16 +2868,20 @@ td.agenda-title {
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-box-shadow: 0px 11px 22px #000000, 0px 3px 15px rgba(0, 0, 0, 0.4), inset 0px 1px 0px rgba(255, 255, 255, 0.3), inset 0px 0px 3px rgba(255, 255, 255, 0.5);
-moz-box-shadow: 0px 11px 22px #000000, 0px 3px 15px rgba(0, 0, 0, 0.4), inset 0px 1px 0px rgba(255, 255, 255, 0.3), inset 0px 0px 3px rgba(255, 255, 255, 0.5);
box-shadow: 0px 11px 22px #000000, 0px 3px 15px rgba(0, 0, 0, 0.4), inset 0px 1px 0px rgba(255, 255, 255, 0.3), inset 0px 0px 3px rgba(255, 255, 255, 0.5);
font-family: monospace;
text-transform: uppercase;
font-weight: 900;
font-size: 3.5vw;
display: flex;
justify-content: center;
align-items: center;
font-size: 100%;
line-height: 1.75;
}

.sec-frame.decorated .keypad-input .key {
-webkit-box-shadow: 0px 11px 22px #000000, 0px 3px 15px rgba(0, 0, 0, 0.4), inset 0px 1px 0px rgba(255, 255, 255, 0.3), inset 0px 0px 3px rgba(255, 255, 255, 0.5);
-moz-box-shadow: 0px 11px 22px #000000, 0px 3px 15px rgba(0, 0, 0, 0.4), inset 0px 1px 0px rgba(255, 255, 255, 0.3), inset 0px 0px 3px rgba(255, 255, 255, 0.5);
box-shadow: 0px 11px 22px #000000, 0px 3px 15px rgba(0, 0, 0, 0.4), inset 0px 1px 0px rgba(255, 255, 255, 0.3), inset 0px 0px 3px rgba(255, 255, 255, 0.5);
}

.sec-frame .keypad-input .key:not(.disabled):hover {
Expand Down Expand Up @@ -2965,8 +2968,8 @@ td.agenda-title {

.screw {
position: absolute;
width: 5%;
height: 4%;
width: 0.5em;
height: 0.5em;
border-radius: 100%;
background: -moz-linear-gradient( -45deg, #adadad 0%, #e1e1e1 51%, #dddddd 68%, #f6f6f6 100%);
background: -webkit-gradient( linear, left top, right bottom, color-stop(0%, #adadad), color-stop(51%, #e1e1e1), color-stop(68%, #dddddd), color-stop(100%, #f6f6f6));
Expand Down Expand Up @@ -2997,23 +3000,23 @@ td.agenda-title {
}

.sec-frame .screw.tl {
top: 3%;
left: 3%;
top: 0.5em;
left: 0.5em;
}

.sec-frame .screw.tr {
top: 3%;
right: 3%;
top: 0.5em;
right: 0.5em;
}

.sec-frame .screw.bl {
bottom: 3%;
left: 3%;
bottom: 0.5em;
left: 0.5em;
}

.sec-frame .screw.br {
bottom: 3%;
right: 3%;
bottom: 0.5em;
right: 0.5em;
}

.sec-frame td .status.key.disabled {
Expand Down
4 changes: 2 additions & 2 deletions dist/bundle.js

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions docs/blocks/specials/security_panel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,29 @@ This will show a Dashticz security panel, which automatically scales to the colu

.. image :: secpanel.jpg
Block parameter
^^^^^^^^^^^^^^^
.. list-table::
:header-rows: 1
:widths: 5, 30
:class: tight-table

* - Parameter
- Description
* - decorate
- | ``true``: Show security panel decorated with screws, title, background image. (=default)
| ``false`` Remove the decorations. This will result in a block with reduced height.
* - scale
- | Scale factor for the width of the clock. Should be smaller than 1. Height scales automatically.
| ``0.75``: Scales the clock down to 75% (default ``1`` = 100%).
* - headerText
- | The text to show in the header of the security panel
| ``'Dashticz'`` (=default)
* - footerText
- | The text to show in the header of the security panel
| ``'Dashticz Security Panel, 2020'`` (=default)
Additionally, if you have set your Domoticz security panel to "Armed Away", you can now configure Dashticz to secure automatically by applying the following setting in *CONFIG.js*::

config['security_panel_lock'] = 1;
Expand Down
8 changes: 5 additions & 3 deletions docs/releasenotes/releasenotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ I've removed custom/custom.css and custom/custom.js from the Dashticz repository

However, that means this update cannot be installed with ``git pull`` directly, because then git will report an error if you have modified one or both files.

To solve this, first make a backup of these two files ::
To solve this, first make a backup of these two files::

mv custom/custom.js custom/custom.js.bak
mv custom/custom.css custom/custom.css.bak

Then update to the latest version as usual ::
Then update to the latest version as usual::

git pull

And restore your backups:
And restore your backups::

mv custom/custom.js.bak custom/custom.js
mv custom/custom.css.bak custom/custom.css.bak
Expand All @@ -42,12 +42,14 @@ Enhancements
* Graph: New parameters ``axisRight`` to show the first Y axis on the right (default is ``false``), and ``axisAlternating`` to show Y axes alternating left/right (default: ``true``).
* Support for device (sub)type Managed Counter
* Flipclock: New block parameters showSeconds (true or false) and clockFace (12 or 24)
* Security panel: New block parameters ( ``decorate``, ``headerText``, ``footerText``, ``scale``). See :ref:`secpanel`

Fixes
~~~~~~

* Graph: Fix for data acquistion day graph gas device.
* Colorpicker: Some fixes in warm white/cold white color setting.
* Improved styling of modal popup windows.


3.7.1 Beta (19-12-2020)
Expand Down
3 changes: 2 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
<meta name="msapplication-square310x310logo"
content="img/favicon/largetile.png" />
<title>Dashticz</title>
<script src="dist/bundle.js?t=7"></script>
<script> var _DASHTICZ_VERSION=9;</script>
<script src="dist/bundle.js?t=9"></script>

</head>

Expand Down
68 changes: 34 additions & 34 deletions js/components/secpanel.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/templateengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
TemplateEngine.Defaults = {
templateDir: './tpl/',
templateExt: '.tpl',
templateVersion: window._DASHTICZ_VERSION || 0
};

TemplateEngine.prototype = {
Expand All @@ -35,7 +36,7 @@
return !!this._storage[name];
},
urlFor: function (name) {
return this.settings.templateDir + name + this.settings.templateExt;
return this.settings.templateDir + name + this.settings.templateExt + '?'+(window._DASHTICZ_VERSION || this.settings.templateVersion);
},
};

Expand Down
Loading

0 comments on commit e354ad0

Please sign in to comment.