Skip to content

Commit

Permalink
Hide days whn collection is today or tomorrow
Browse files Browse the repository at this point in the history
  • Loading branch information
amaximus committed Oct 12, 2020
1 parent a242659 commit 2d08148
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Configuration parameters:<br />
| icon_color | **Y** | `black` | icon color. Accepts both color names and RGB values.|
| icon_size | **Y** | `25px` | size of the icon.|
| hide_date | **Y** | `false` | hide date.|
| hide_days | **Y** | `false`| hide number of days.|
| hide_days | **Y** | `false`| hide number of days. Automatically set to true when collection is due today or tomorrow.|
| hide_before | **Y** | `false` | hide entire card until x days before event.|
| title_size | **Y** | `17px` | font size for the sensor's friendly name.|
| details_size | **Y** | `14px `| font size for date and number of days.|
Expand Down
1 change: 1 addition & 0 deletions dist/garbage-collection-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ class GarbageCollectionCard extends HTMLElement {
attributes[0].next_date = this._stateObj.state;
} else {
if ( attributes[0].days < 2 ) {
hide_days = true;
if ( typeof this.translationJSONobj != "undefined" ) {
var dday = this._stateObj.state == 0 ? "today":"tomorrow";
if ( due_txt === true ) {
Expand Down
2 changes: 1 addition & 1 deletion info.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Configuration parameters:<br />
| icon_color | **Y** | `black` | icon color. Accepts both color names and RGB values.|
| icon_size | **Y** | `25px` | size of the icon.|
| hide_date | **Y** | `false` | hide date.|
| hide_days | **Y** | `false`| hide number of days.|
| hide_days | **Y** | `false`| hide number of days. Automatically set to true when collection is due today or tomorrow.|
| hide_before | **Y** | `false` | hide entire card until x days before event.|
| title_size | **Y** | `17px` | font size for the sensor's friendly name.|
| details_size | **Y** | `14px `| font size for date and number of days.|
Expand Down
6 changes: 3 additions & 3 deletions tracker.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"garbage-collection-card": {
"version": "1.12.0",
"updated_at": "2020-10-12",
"version": "1.13.0",
"updated_at": "2020-10-13",
"visit_repo": "https://github.com/amaximus/garbage-collection-card",
"changelog": "https://github.com/amaximus/garbage-collection0card/releases/1.12.0"
"changelog": "https://github.com/amaximus/garbage-collection0card/releases/1.13.0"
}
}

0 comments on commit 2d08148

Please sign in to comment.