Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

Commit

Permalink
Merge pull request #81 from maykar/dev
Browse files Browse the repository at this point in the history
Dev to Master
  • Loading branch information
Ryan Meek committed Mar 16, 2019
2 parents a072a61 + 094682d commit 4be5689
Show file tree
Hide file tree
Showing 3 changed files with 271 additions and 81 deletions.
56 changes: 45 additions & 11 deletions compact-custom-header-editor.js
Expand Up @@ -27,6 +27,8 @@ const defaultConfig = {
clock_date: false,
disable: false,
main_config: false,
chevrons: false,
redirect: true,
hide_tabs: [],
show_tabs: []
};
Expand Down Expand Up @@ -293,6 +295,18 @@ export class CchConfigEditor extends LitElement {
: this.defaultConfig.header;
}

get _chevrons() {
return this.config.chevrons !== undefined
? this.config.chevrons
: this.defaultConfig.chevrons;
}

get _redirect() {
return this.config.redirect !== undefined
? this.config.redirect
: this.defaultConfig.redirect;
}

get _menu() {
return this.config.menu || this.defaultConfig.menu;
}
Expand Down Expand Up @@ -339,6 +353,17 @@ export class CchConfigEditor extends LitElement {
: ""}
${this.renderStyle()}
<div class="side-by-side">
${!this.exception
? html`
<paper-toggle-button
?checked="${this._main_config !== false}"
.configValue="${"main_config"}"
@change="${this._valueChanged}"
>
Main Config
</paper-toggle-button>
`
: ""}
<paper-toggle-button
class="${this.exception && this.config.disable === undefined
? "inherited"
Expand All @@ -359,17 +384,26 @@ export class CchConfigEditor extends LitElement {
>
Display Header
</paper-toggle-button>
${!this.exception
? html`
<paper-toggle-button
?checked="${this._main_config !== false}"
.configValue="${"main_config"}"
@change="${this._valueChanged}"
>
Main Config
</paper-toggle-button>
`
: ""}
<paper-toggle-button
class="${this.exception && this.config.chevrons === undefined
? "inherited"
: ""}"
?checked="${this._chevrons !== false}"
.configValue="${"chevrons"}"
@change="${this._valueChanged}"
>
Display Tab Chevrons
</paper-toggle-button>
<paper-toggle-button
class="${this.exception && this.config.redirect === undefined
? "inherited"
: ""}"
?checked="${this._redirect !== false}"
.configValue="${"redirect"}"
@change="${this._valueChanged}"
>
Hidden Tab Redirect
</paper-toggle-button>
</div>
<h4>Button Visibility:</h4>
Expand Down

0 comments on commit 4be5689

Please sign in to comment.