Skip to content

Commit

Permalink
v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dwain committed Apr 7, 2020
1 parent ce51149 commit 61250ec
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion custom_components/dwains_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def mark_read_service(call):
dwains_theme_global.update(config.get("dwains_theme")["global"]);

#Load styles
dwains_theme_styles.update(config.get("dwains_theme")["global"]);
dwains_theme_styles.update(config.get("dwains_theme")["styles"]);

#Load icons
if ("icons" in config.get("dwains_theme")["configuration"]):
Expand Down
4 changes: 2 additions & 2 deletions dwains-theme/plugins/custom_header/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exceptions:
all_tabs_css: "width: calc(20vw - 3.6px) !important; padding: 0px !important;"
header_css: 'padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important;'
view_css: 'padding-top: 96px !important;'
tab_container_css: "width: auto !important; margin: 0 !important;"
tab_container_css: "width: auto !important; margin: 0 !important; padding: 0 !important;"
options_hide: true
- conditions:
user_agent: Mobile
Expand All @@ -33,5 +33,5 @@ exceptions:
all_tabs_css: "width: calc(20vw - 3.6px) !important; padding: 0px !important;"
header_css: 'padding-bottom: 20px !important; padding-left: 0px !important; padding-right: 0px !important;'
view_css: 'padding-top: 96px !important;'
tab_container_css: "width: auto !important; margin: 0 !important;"
tab_container_css: "width: auto !important; margin: 0 !important; padding: 0 !important;"
options_hide: true
2 changes: 1 addition & 1 deletion dwains-theme/resources/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- type: module
url: /local/dwains-theme/plugins/dwains-cover-card/dwains-cover-card.js?v=0.0.1
- type: module
url: /local/dwains-theme/plugins/dwains-flexbox-card/dwains-flexbox-card.js?v=0.1.0
url: /local/dwains-theme/plugins/dwains-flexbox-card/dwains-flexbox-card.js?v=0.1.2

# Plugins resources (required for dwains theme)
- type: module
Expand Down
12 changes: 7 additions & 5 deletions dwains-theme/views/main/01.homepage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
border-radius: 0;
overflow: hidden;
}
@media only screen and (min-width: 600px) {
@media only screen and (min-width: 1025px) {
ha-card {
margin-top: 25px;
padding-top: 15px;
Expand Down Expand Up @@ -102,6 +102,7 @@
]]]
max_notifications: 2
navigation_path: more_page_notifications
{% if _d_t_config.global["weather"] %}
- type: custom:dwains-weather-card
item_classes: 'd-none d-sm-block col-sm-6 col-md-3 col-lg-3'
entity: {{ _d_t_config.global["weather"] }}
Expand All @@ -112,6 +113,7 @@
.variations, .variations ha-icon, #main {
color: var(--dwains-theme-header-button-text) !important;
}
{% endif %}
#Start header states
- type: custom:mod-card
item_classes: 'col-12 col-sm-12 col-md-4 col-lg-5'
Expand Down Expand Up @@ -186,9 +188,9 @@
- button_template: partials_heading_switch
active: Rooms
headings:
- name: Rooms
- name: {{ _d_t_trans.rooms.title }}
navigation_path: "#rooms"
- name: Devices
- name: {{ _d_t_trans.device.title_plural }}
navigation_path: "#devices"
{% for room in _d_t_config.rooms %}
# Since we are looping in the rooms do some stuff for the all devices view
Expand Down Expand Up @@ -387,9 +389,9 @@
- button_template: partials_heading_switch
active: Devices
headings:
- name: Rooms
- name: {{ _d_t_trans.rooms.title }}
navigation_path: "#rooms"
- name: Devices
- name: {{ _d_t_trans.device.title_plural }}
navigation_path: "#devices"
{%
set devices = namespace (hasLock=false, hasLight=false, hasClimate=false, hasCover=false, hasDevice=false,
Expand Down
2 changes: 1 addition & 1 deletion dwains-theme/views/partials/header.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ style: |
font-size: 14px;
margin-bottom: 1px;
}
@media only screen and (min-width: 600px) {
@media only screen and (min-width: 1025px) {
ha-card {
margin-top: 25px;
padding-top: 15px;
Expand Down
2 changes: 1 addition & 1 deletion dwains-theme/views/partials/header_grid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ style: |
overflow: hidden;
margin-bottom: 1px;
}
@media only screen and (min-width: 600px) {
@media only screen and (min-width: 1025px) {
ha-card {
margin-top: 25px;
padding-top: 15px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ import {
css
} from "https://unpkg.com/[email protected]/lit-element.js?module";

const VERSION = '0.1.0';
const VERSION = '0.1.2';

class DwainsFlexboxCard extends LitElement {
constructor() {
super();
}

static get properties() {
return {
_config: {},
Expand Down Expand Up @@ -38,12 +42,14 @@ class DwainsFlexboxCard extends LitElement {
const promises = config.entities.map(config => this.createCardElement(config));
Promise.all(promises).then((cards) => {
this._refCards = cards;
this.requestUpdate();
//Removed some code here
})
} else {
const promises = config.cards.map(config => this.createCardElement(config));
Promise.all(promises).then((cards) => {
this._refCards = cards;
this.requestUpdate();
//Removed some code here
})
}
Expand Down Expand Up @@ -84,6 +90,8 @@ class DwainsFlexboxCard extends LitElement {
}

const element = createThing(tag, cardConfig);

//console.log(element);

if(cardConfig.item_classes){
//console.log(cardConfig.grid);
Expand Down Expand Up @@ -123,6 +131,9 @@ class DwainsFlexboxCard extends LitElement {
if (!this._config || !this._hass || !this._refCards) {
return html``;
}

//console.log(this._refCards);

var padding;
if(this._config.padding){
padding = 'padding';
Expand Down

0 comments on commit 61250ec

Please sign in to comment.