Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
6f2c139b89 |
File diff suppressed because one or more lines are too long
@ -14,5 +14,4 @@ class BrowserModConfigFlow(config_entries.ConfigFlow):
|
|||||||
async def async_step_user(self, user_input=None):
|
async def async_step_user(self, user_input=None):
|
||||||
if self._async_current_entries():
|
if self._async_current_entries():
|
||||||
return self.async_abort(reason="single_instance_allowed")
|
return self.async_abort(reason="single_instance_allowed")
|
||||||
_LOGGER.error("Running async_create_entry")
|
|
||||||
return self.async_create_entry(title="Browser Mod", data={})
|
return self.async_create_entry(title="Browser Mod", data={})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"name": "browser_mod",
|
"name": "browser_mod",
|
||||||
"homeassistant": "2022.3.0"
|
"homeassistant": "2022.8.0"
|
||||||
}
|
}
|
||||||
|
@ -143,9 +143,12 @@ class BrowserModRegisteredBrowsersCard extends LitElement {
|
|||||||
Mod. <br /><br />
|
Mod. <br /><br />
|
||||||
|
|
||||||
If you ever see a
|
If you ever see a
|
||||||
<ha-icon icon="mdi:gesture-tap"></ha-icon> symbol at the bottom right
|
<ha-icon
|
||||||
corner of the screen, please tap or click anywhere on the page. This
|
icon="mdi:gesture-tap"
|
||||||
should allow Browser Mod to work again.
|
style="color: var(--warning-color);"
|
||||||
|
></ha-icon>
|
||||||
|
symbol at the bottom right corner of the screen, please tap or click
|
||||||
|
anywhere on the page. This should allow Browser Mod to work again.
|
||||||
</ha-alert>
|
</ha-alert>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
@ -82,111 +82,103 @@ class BrowserModFrontendSettingsCard extends LitElement {
|
|||||||
DEFAULT.
|
DEFAULT.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="separator"></div>
|
<ha-expansion-panel
|
||||||
|
.header=${"Title template"}
|
||||||
|
.secondary=${"Jinja template for the browser window/tab title"}
|
||||||
|
leftChevron
|
||||||
|
>
|
||||||
|
<browser-mod-settings-table
|
||||||
|
.hass=${this.hass}
|
||||||
|
.settingKey=${"titleTemplate"}
|
||||||
|
></browser-mod-settings-table>
|
||||||
|
</ha-expansion-panel>
|
||||||
|
|
||||||
<ha-settings-row>
|
<ha-expansion-panel
|
||||||
<span slot="heading">Title template</span>
|
.header=${"Favicon template"}
|
||||||
<span slot="description">
|
.secondary=${"Jinja template for the browser favicon"}
|
||||||
Jinja template for the browser window/tab title
|
leftChevron
|
||||||
</span>
|
>
|
||||||
</ha-settings-row>
|
<browser-mod-settings-table
|
||||||
<browser-mod-settings-table
|
.hass=${this.hass}
|
||||||
.hass=${this.hass}
|
.settingKey=${"faviconTemplate"}
|
||||||
.settingKey=${"titleTemplate"}
|
></browser-mod-settings-table>
|
||||||
></browser-mod-settings-table>
|
</ha-expansion-panel>
|
||||||
|
|
||||||
<div class="separator"></div>
|
<ha-expansion-panel
|
||||||
|
.header=${"Hide sidebar"}
|
||||||
|
.secondary=${"Completely remove the sidebar from all panels"}
|
||||||
|
leftChevron
|
||||||
|
>
|
||||||
|
<browser-mod-settings-table
|
||||||
|
.hass=${this.hass}
|
||||||
|
.settingKey=${"hideSidebar"}
|
||||||
|
.settingSelector=${{ boolean: {}, label: "Hide sidebar" }}
|
||||||
|
></browser-mod-settings-table>
|
||||||
|
</ha-expansion-panel>
|
||||||
|
|
||||||
<ha-settings-row>
|
<ha-expansion-panel
|
||||||
<span slot="heading">Favicon template</span>
|
.header=${"Hide header"}
|
||||||
<span slot="description">
|
.secondary=${"Completely remove the header from all panels"}
|
||||||
Jinja template for the browser favicon
|
leftChevron
|
||||||
</span>
|
>
|
||||||
</ha-settings-row>
|
<browser-mod-settings-table
|
||||||
<browser-mod-settings-table
|
.hass=${this.hass}
|
||||||
.hass=${this.hass}
|
.settingKey=${"hideHeader"}
|
||||||
.settingKey=${"faviconTemplate"}
|
.settingSelector=${{ boolean: {}, label: "Hide header" }}
|
||||||
></browser-mod-settings-table>
|
></browser-mod-settings-table>
|
||||||
|
</ha-expansion-panel>
|
||||||
|
|
||||||
<div class="separator"></div>
|
<ha-expansion-panel
|
||||||
|
.header=${"Default dashboard"}
|
||||||
|
.secondary=${`The dashboard that is showed when navigating to ${location.origin}`}
|
||||||
|
leftChevron
|
||||||
|
>
|
||||||
|
<browser-mod-settings-table
|
||||||
|
.hass=${this.hass}
|
||||||
|
.settingKey=${"defaultPanel"}
|
||||||
|
.settingSelector=${dashboardSelector}
|
||||||
|
.default=${"lovelace"}
|
||||||
|
></browser-mod-settings-table>
|
||||||
|
</ha-expansion-panel>
|
||||||
|
|
||||||
<ha-settings-row>
|
<ha-expansion-panel
|
||||||
<span slot="heading">Hide sidebar</span>
|
.header=${"Sidebar order"}
|
||||||
<span slot="description">
|
.secondary=${"Order and visibility of sidebar items."}
|
||||||
Completely remove the sidebar from all panels
|
leftChevron
|
||||||
</span>
|
>
|
||||||
</ha-settings-row>
|
<ha-settings-row>
|
||||||
<browser-mod-settings-table
|
<ol slot="heading">
|
||||||
.hass=${this.hass}
|
<li>Click EDIT</li>
|
||||||
.settingKey=${"hideSidebar"}
|
<li>Set up the sidebar as you want it</li>
|
||||||
.settingSelector=${{ boolean: {}, label: "Hide sidebar" }}
|
<li>Do NOT click DONE</li>
|
||||||
></browser-mod-settings-table>
|
<li>Add a new setting or edit an old one</li>
|
||||||
|
<li>Click RESTORE</li>
|
||||||
|
</ol>
|
||||||
|
<mwc-button @click=${() => this.toggleEditSidebar()}>
|
||||||
|
${this._editSidebar ? "Restore" : "Edit"}
|
||||||
|
</mwc-button>
|
||||||
|
</ha-settings-row>
|
||||||
|
<browser-mod-settings-table
|
||||||
|
.hass=${this.hass}
|
||||||
|
.settingKey=${"sidebarPanelOrder"}
|
||||||
|
.settingSelector=${{
|
||||||
|
plaintext: "Press OK to store the current sidebar order",
|
||||||
|
}}
|
||||||
|
.default=${"lovelace"}
|
||||||
|
></browser-mod-settings-table>
|
||||||
|
</ha-expansion-panel>
|
||||||
|
|
||||||
<div class="separator"></div>
|
<ha-expansion-panel
|
||||||
|
.header=${"Sidebar title"}
|
||||||
<ha-settings-row>
|
.secondary=${"The title at the top of the sidebar"}
|
||||||
<span slot="heading">Hide header</span>
|
leftChevron
|
||||||
<span slot="description">
|
>
|
||||||
Completely remove the header from all panels
|
<browser-mod-settings-table
|
||||||
</span>
|
.hass=${this.hass}
|
||||||
</ha-settings-row>
|
.settingKey=${"sidebarTitle"}
|
||||||
<browser-mod-settings-table
|
.settingSelector=${{ text: {} }}
|
||||||
.hass=${this.hass}
|
></browser-mod-settings-table>
|
||||||
.settingKey=${"hideHeader"}
|
</ha-expansion-panel>
|
||||||
.settingSelector=${{ boolean: {}, label: "Hide header" }}
|
|
||||||
></browser-mod-settings-table>
|
|
||||||
|
|
||||||
<div class="separator"></div>
|
|
||||||
|
|
||||||
<ha-settings-row>
|
|
||||||
<span slot="heading">Default dashboard</span>
|
|
||||||
<span slot="description">
|
|
||||||
The dashboard that is showed when navigating to
|
|
||||||
${location.origin}/
|
|
||||||
</span>
|
|
||||||
</ha-settings-row>
|
|
||||||
<browser-mod-settings-table
|
|
||||||
.hass=${this.hass}
|
|
||||||
.settingKey=${"defaultPanel"}
|
|
||||||
.settingSelector=${dashboardSelector}
|
|
||||||
.default=${"lovelace"}
|
|
||||||
></browser-mod-settings-table>
|
|
||||||
|
|
||||||
<div class="separator"></div>
|
|
||||||
|
|
||||||
<ha-settings-row>
|
|
||||||
<span slot="heading">Sidebar order</span>
|
|
||||||
<span slot="description">
|
|
||||||
Order and visibility of sidebar items. <br />Click EDIT and set
|
|
||||||
the sidebar up as you want. Then save the settings and finally
|
|
||||||
click RESTORE.
|
|
||||||
</span>
|
|
||||||
<mwc-button @click=${() => this.toggleEditSidebar()}>
|
|
||||||
${this._editSidebar ? "Restore" : "Edit"}
|
|
||||||
</mwc-button>
|
|
||||||
</ha-settings-row>
|
|
||||||
<browser-mod-settings-table
|
|
||||||
.hass=${this.hass}
|
|
||||||
.settingKey=${"sidebarPanelOrder"}
|
|
||||||
.settingSelector=${{
|
|
||||||
plaintext: "Press OK to store the current sidebar order",
|
|
||||||
}}
|
|
||||||
.default=${"lovelace"}
|
|
||||||
></browser-mod-settings-table>
|
|
||||||
|
|
||||||
<div class="separator"></div>
|
|
||||||
|
|
||||||
<ha-settings-row>
|
|
||||||
<span slot="heading">Sidebar title</span>
|
|
||||||
<span slot="description">
|
|
||||||
The title at the top of the sidebar
|
|
||||||
</span>
|
|
||||||
</ha-settings-row>
|
|
||||||
<browser-mod-settings-table
|
|
||||||
.hass=${this.hass}
|
|
||||||
.settingKey=${"sidebarTitle"}
|
|
||||||
.settingSelector=${{ text: {} }}
|
|
||||||
></browser-mod-settings-table>
|
|
||||||
</div>
|
</div>
|
||||||
</ha-card>
|
</ha-card>
|
||||||
`;
|
`;
|
||||||
|
@ -31,6 +31,12 @@ loadConfigDashboard().then(() => {
|
|||||||
.narrow=${this.narrow}
|
.narrow=${this.narrow}
|
||||||
></ha-menu-button>
|
></ha-menu-button>
|
||||||
<div main-title>Browser Mod Settings</div>
|
<div main-title>Browser Mod Settings</div>
|
||||||
|
<a
|
||||||
|
href="https://github.com/thomasloven/hass-browser_mod/blob/master/README.md"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<ha-icon class="icon" .icon=${"mdi:help"}></ha-icon>
|
||||||
|
</a>
|
||||||
</app-toolbar>
|
</app-toolbar>
|
||||||
</app-header>
|
</app-header>
|
||||||
|
|
||||||
@ -64,6 +70,10 @@ loadConfigDashboard().then(() => {
|
|||||||
ha-config-section {
|
ha-config-section {
|
||||||
padding: 16px 0;
|
padding: 16px 0;
|
||||||
}
|
}
|
||||||
|
a {
|
||||||
|
color: var(--primary-text-color);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "browser_mod",
|
"name": "browser_mod",
|
||||||
"version": "2.0.0b4",
|
"version": "2.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user