mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Corrects add-on link (#4634)
* Fixes the addon url * quote it * Don't link the extra space * puerly for testing * Don't link the extra space
This commit is contained in:
parent
1cb10694e7
commit
6e624b394b
@ -97,52 +97,48 @@ class HassioAddonInfo extends LitElement {
|
|||||||
|
|
||||||
protected render(): TemplateResult {
|
protected render(): TemplateResult {
|
||||||
return html`
|
return html`
|
||||||
${
|
${this._computeUpdateAvailable
|
||||||
this._computeUpdateAvailable
|
? html`
|
||||||
? html`
|
<paper-card heading="Update available! 🎉">
|
||||||
<paper-card heading="Update available! 🎉">
|
<div class="card-content">
|
||||||
<div class="card-content">
|
<hassio-card-content
|
||||||
<hassio-card-content
|
.hass=${this.hass}
|
||||||
.hass=${this.hass}
|
.title="${this.addon.name} ${this.addon
|
||||||
.title="${this.addon.name} ${this.addon
|
.last_version} is available"
|
||||||
.last_version} is available"
|
.description="You are currently running version ${this.addon
|
||||||
.description="You are currently running version ${this.addon
|
.version}"
|
||||||
.version}"
|
icon="hassio:arrow-up-bold-circle"
|
||||||
icon="hassio:arrow-up-bold-circle"
|
iconClass="update"
|
||||||
iconClass="update"
|
></hassio-card-content>
|
||||||
></hassio-card-content>
|
${!this.addon.available
|
||||||
${!this.addon.available
|
? html`
|
||||||
? html`
|
<p>
|
||||||
<p>
|
This update is no longer compatible with your system.
|
||||||
This update is no longer compatible with your system.
|
</p>
|
||||||
</p>
|
`
|
||||||
`
|
: ""}
|
||||||
: ""}
|
</div>
|
||||||
</div>
|
<div class="card-actions">
|
||||||
<div class="card-actions">
|
<ha-call-api-button
|
||||||
<ha-call-api-button
|
.hass=${this.hass}
|
||||||
.hass=${this.hass}
|
.disabled=${!this.addon.available}
|
||||||
.disabled=${!this.addon.available}
|
path="hassio/addons/${this.addon.slug}/update"
|
||||||
path="hassio/addons/${this.addon.slug}/update"
|
>
|
||||||
>
|
Update
|
||||||
Update
|
</ha-call-api-button>
|
||||||
</ha-call-api-button>
|
${this.addon.changelog
|
||||||
${this.addon.changelog
|
? html`
|
||||||
? html`
|
<mwc-button @click=${this._openChangelog}>
|
||||||
<mwc-button @click=${this._openChangelog}>
|
Changelog
|
||||||
Changelog
|
</mwc-button>
|
||||||
</mwc-button>
|
`
|
||||||
`
|
: ""}
|
||||||
: ""}
|
</div>
|
||||||
</div>
|
</paper-card>
|
||||||
</paper-card>
|
`
|
||||||
`
|
: ""}
|
||||||
: ""
|
${!this.addon.protected
|
||||||
}
|
? html`
|
||||||
|
|
||||||
${
|
|
||||||
!this.addon.protected
|
|
||||||
? html`
|
|
||||||
<paper-card heading="Warning: Protection mode is disabled!" class="warning">
|
<paper-card heading="Warning: Protection mode is disabled!" class="warning">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
Protection mode on this add-on is disabled! This gives the add-on full access to the entire system, which adds security risks, and could damage your system when used incorrectly. Only disable the protection mode if you know, need AND trust the source of this add-on.
|
Protection mode on this add-on is disabled! This gives the add-on full access to the entire system, which adds security risks, and could damage your system when used incorrectly. Only disable the protection mode if you know, need AND trust the source of this add-on.
|
||||||
@ -153,16 +149,14 @@ class HassioAddonInfo extends LitElement {
|
|||||||
</div>
|
</div>
|
||||||
</paper-card>
|
</paper-card>
|
||||||
`
|
`
|
||||||
: ""
|
: ""}
|
||||||
}
|
|
||||||
|
|
||||||
<paper-card>
|
<paper-card>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="addon-header">
|
<div class="addon-header">
|
||||||
${this.addon.name}
|
${this.addon.name}
|
||||||
<div class="addon-version light-color">
|
<div class="addon-version light-color">
|
||||||
${
|
${this.addon.version
|
||||||
this.addon.version
|
|
||||||
? html`
|
? html`
|
||||||
${this.addon.version}
|
${this.addon.version}
|
||||||
${this._computeIsRunning
|
${this._computeIsRunning
|
||||||
@ -183,25 +177,24 @@ class HassioAddonInfo extends LitElement {
|
|||||||
`
|
`
|
||||||
: html`
|
: html`
|
||||||
${this.addon.last_version}
|
${this.addon.last_version}
|
||||||
`
|
`}
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="description light-color">
|
<div class="description light-color">
|
||||||
${this.addon.description}.<br />
|
${this.addon.description}.<br />
|
||||||
Visit <a href=${this.addon.url}" target="_blank">
|
Visit
|
||||||
${this.addon.name} page
|
<a href="${this.addon.url}" target="_blank">
|
||||||
</a> for details.
|
${this.addon.name} page</a
|
||||||
|
>
|
||||||
|
for details.
|
||||||
</div>
|
</div>
|
||||||
${
|
${this.addon.logo
|
||||||
this.addon.logo
|
? html`
|
||||||
? html`
|
<a href="${this.addon.url}" target="_blank" class="logo">
|
||||||
<a href="${this.addon.url}" target="_blank" class="logo">
|
<img src="/api/hassio/addons/${this.addon.slug}/logo" />
|
||||||
<img src="/api/hassio/addons/${this.addon.slug}/logo" />
|
</a>
|
||||||
</a>
|
`
|
||||||
`
|
: ""}
|
||||||
: ""
|
|
||||||
}
|
|
||||||
<div class="security">
|
<div class="security">
|
||||||
<ha-label-badge
|
<ha-label-badge
|
||||||
class=${classMap({
|
class=${classMap({
|
||||||
@ -215,204 +208,173 @@ class HassioAddonInfo extends LitElement {
|
|||||||
label="rating"
|
label="rating"
|
||||||
description=""
|
description=""
|
||||||
></ha-label-badge>
|
></ha-label-badge>
|
||||||
${
|
${this.addon.host_network
|
||||||
this.addon.host_network
|
? html`
|
||||||
? html`
|
<ha-label-badge
|
||||||
<ha-label-badge
|
@click=${this._showMoreInfo}
|
||||||
@click=${this._showMoreInfo}
|
id="host_network"
|
||||||
id="host_network"
|
icon="hassio:network"
|
||||||
icon="hassio:network"
|
label="host"
|
||||||
label="host"
|
description=""
|
||||||
description=""
|
></ha-label-badge>
|
||||||
></ha-label-badge>
|
`
|
||||||
`
|
: ""}
|
||||||
: ""
|
${this.addon.full_access
|
||||||
}
|
? html`
|
||||||
|
<ha-label-badge
|
||||||
${
|
@click=${this._showMoreInfo}
|
||||||
this.addon.full_access
|
id="full_access"
|
||||||
? html`
|
icon="hassio:chip"
|
||||||
<ha-label-badge
|
label="hardware"
|
||||||
@click=${this._showMoreInfo}
|
description=""
|
||||||
id="full_access"
|
></ha-label-badge>
|
||||||
icon="hassio:chip"
|
`
|
||||||
label="hardware"
|
: ""}
|
||||||
description=""
|
${this.addon.homeassistant_api
|
||||||
></ha-label-badge>
|
? html`
|
||||||
`
|
<ha-label-badge
|
||||||
: ""
|
@click=${this._showMoreInfo}
|
||||||
}
|
id="homeassistant_api"
|
||||||
|
icon="hassio:home-assistant"
|
||||||
${
|
label="hass"
|
||||||
this.addon.homeassistant_api
|
description=""
|
||||||
? html`
|
></ha-label-badge>
|
||||||
<ha-label-badge
|
`
|
||||||
@click=${this._showMoreInfo}
|
: ""}
|
||||||
id="homeassistant_api"
|
${this._computeHassioApi
|
||||||
icon="hassio:home-assistant"
|
? html`
|
||||||
label="hass"
|
<ha-label-badge
|
||||||
description=""
|
@click=${this._showMoreInfo}
|
||||||
></ha-label-badge>
|
id="hassio_api"
|
||||||
`
|
icon="hassio:home-assistant"
|
||||||
: ""
|
label="hassio"
|
||||||
}
|
.description=${this.addon.hassio_role}
|
||||||
|
></ha-label-badge>
|
||||||
${
|
`
|
||||||
this._computeHassioApi
|
: ""}
|
||||||
? html`
|
${this.addon.docker_api
|
||||||
<ha-label-badge
|
? html`
|
||||||
@click=${this._showMoreInfo}
|
<ha-label-badge
|
||||||
id="hassio_api"
|
@click=${this._showMoreInfo}
|
||||||
icon="hassio:home-assistant"
|
id="docker_api"
|
||||||
label="hassio"
|
icon="hassio:docker"
|
||||||
.description=${this.addon.hassio_role}
|
label="docker"
|
||||||
></ha-label-badge>
|
description=""
|
||||||
`
|
></ha-label-badge>
|
||||||
: ""
|
`
|
||||||
}
|
: ""}
|
||||||
|
${this.addon.host_pid
|
||||||
${
|
? html`
|
||||||
this.addon.docker_api
|
<ha-label-badge
|
||||||
? html`
|
@click=${this._showMoreInfo}
|
||||||
<ha-label-badge
|
id="host_pid"
|
||||||
@click=${this._showMoreInfo}
|
icon="hassio:pound"
|
||||||
id="docker_api"
|
label="host pid"
|
||||||
icon="hassio:docker"
|
description=""
|
||||||
label="docker"
|
></ha-label-badge>
|
||||||
description=""
|
`
|
||||||
></ha-label-badge>
|
: ""}
|
||||||
`
|
${this.addon.apparmor
|
||||||
: ""
|
? html`
|
||||||
}
|
<ha-label-badge
|
||||||
|
@click=${this._showMoreInfo}
|
||||||
${
|
class=${this._computeApparmorClassName}
|
||||||
this.addon.host_pid
|
id="apparmor"
|
||||||
? html`
|
icon="hassio:shield"
|
||||||
<ha-label-badge
|
label="apparmor"
|
||||||
@click=${this._showMoreInfo}
|
description=""
|
||||||
id="host_pid"
|
></ha-label-badge>
|
||||||
icon="hassio:pound"
|
`
|
||||||
label="host pid"
|
: ""}
|
||||||
description=""
|
${this.addon.auth_api
|
||||||
></ha-label-badge>
|
? html`
|
||||||
`
|
<ha-label-badge
|
||||||
: ""
|
@click=${this._showMoreInfo}
|
||||||
}
|
id="auth_api"
|
||||||
|
icon="hassio:key"
|
||||||
${
|
label="auth"
|
||||||
this.addon.apparmor
|
description=""
|
||||||
? html`
|
></ha-label-badge>
|
||||||
<ha-label-badge
|
`
|
||||||
@click=${this._showMoreInfo}
|
: ""}
|
||||||
class=${this._computeApparmorClassName}
|
${this.addon.ingress
|
||||||
id="apparmor"
|
? html`
|
||||||
icon="hassio:shield"
|
<ha-label-badge
|
||||||
label="apparmor"
|
@click=${this._showMoreInfo}
|
||||||
description=""
|
id="ingress"
|
||||||
></ha-label-badge>
|
icon="hassio:cursor-default-click-outline"
|
||||||
`
|
label="ingress"
|
||||||
: ""
|
description=""
|
||||||
}
|
></ha-label-badge>
|
||||||
|
`
|
||||||
${
|
: ""}
|
||||||
this.addon.auth_api
|
|
||||||
? html`
|
|
||||||
<ha-label-badge
|
|
||||||
@click=${this._showMoreInfo}
|
|
||||||
id="auth_api"
|
|
||||||
icon="hassio:key"
|
|
||||||
label="auth"
|
|
||||||
description=""
|
|
||||||
></ha-label-badge>
|
|
||||||
`
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
|
|
||||||
${
|
|
||||||
this.addon.ingress
|
|
||||||
? html`
|
|
||||||
<ha-label-badge
|
|
||||||
@click=${this._showMoreInfo}
|
|
||||||
id="ingress"
|
|
||||||
icon="hassio:cursor-default-click-outline"
|
|
||||||
label="ingress"
|
|
||||||
description=""
|
|
||||||
></ha-label-badge>
|
|
||||||
`
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
${
|
${this.addon.version
|
||||||
this.addon.version
|
? html`
|
||||||
? html`
|
<div class="state">
|
||||||
<div class="state">
|
<div>Start on boot</div>
|
||||||
<div>Start on boot</div>
|
<ha-switch
|
||||||
<ha-switch
|
@change=${this._startOnBootToggled}
|
||||||
@change=${this._startOnBootToggled}
|
.checked=${this.addon.boot === "auto"}
|
||||||
.checked=${this.addon.boot === "auto"}
|
></ha-switch>
|
||||||
></ha-switch>
|
</div>
|
||||||
</div>
|
<div class="state">
|
||||||
<div class="state">
|
<div>Auto update</div>
|
||||||
<div>Auto update</div>
|
<ha-switch
|
||||||
<ha-switch
|
@change=${this._autoUpdateToggled}
|
||||||
@change=${this._autoUpdateToggled}
|
.checked=${this.addon.auto_update}
|
||||||
.checked=${this.addon.auto_update}
|
></ha-switch>
|
||||||
></ha-switch>
|
</div>
|
||||||
</div>
|
${this.addon.ingress
|
||||||
${this.addon.ingress
|
? html`
|
||||||
? html`
|
<div class="state">
|
||||||
<div class="state">
|
<div>Show in sidebar</div>
|
||||||
<div>Show in sidebar</div>
|
<ha-switch
|
||||||
<ha-switch
|
@change=${this._panelToggled}
|
||||||
@change=${this._panelToggled}
|
.checked=${this.addon.ingress_panel}
|
||||||
.checked=${this.addon.ingress_panel}
|
.disabled=${this._computeCannotIngressSidebar}
|
||||||
.disabled=${this._computeCannotIngressSidebar}
|
></ha-switch>
|
||||||
></ha-switch>
|
${this._computeCannotIngressSidebar
|
||||||
${this._computeCannotIngressSidebar
|
? html`
|
||||||
? html`
|
<span>
|
||||||
<span>
|
This option requires Home Assistant 0.92 or
|
||||||
This option requires Home Assistant 0.92 or
|
later.
|
||||||
later.
|
</span>
|
||||||
</span>
|
`
|
||||||
`
|
: ""}
|
||||||
: ""}
|
</div>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
|
${this._computeUsesProtectedOptions
|
||||||
|
? html`
|
||||||
|
<div class="state">
|
||||||
|
<div>
|
||||||
|
Protection mode
|
||||||
|
<span>
|
||||||
|
<iron-icon icon="hassio:information"></iron-icon>
|
||||||
|
<paper-tooltip>
|
||||||
|
Grant the add-on elevated system access.
|
||||||
|
</paper-tooltip>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
`
|
<ha-switch
|
||||||
: ""}
|
@change=${this._protectionToggled}
|
||||||
${this._computeUsesProtectedOptions
|
.checked=${this.addon.protected}
|
||||||
? html`
|
></ha-switch>
|
||||||
<div class="state">
|
</div>
|
||||||
<div>
|
`
|
||||||
Protection mode
|
: ""}
|
||||||
<span>
|
`
|
||||||
<iron-icon icon="hassio:information"></iron-icon>
|
: ""}
|
||||||
<paper-tooltip>
|
${this._error
|
||||||
Grant the add-on elevated system access.
|
? html`
|
||||||
</paper-tooltip>
|
<div class="errors">${this._error}</div>
|
||||||
</span>
|
`
|
||||||
</div>
|
: ""}
|
||||||
<ha-switch
|
|
||||||
@change=${this._protectionToggled}
|
|
||||||
.checked=${this.addon.protected}
|
|
||||||
></ha-switch>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
: ""}
|
|
||||||
`
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
${
|
|
||||||
this._error
|
|
||||||
? html`
|
|
||||||
<div class="errors">${this._error}</div>
|
|
||||||
`
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-actions">
|
<div class="card-actions">
|
||||||
${
|
${this.addon.version
|
||||||
this.addon.version
|
|
||||||
? html`
|
? html`
|
||||||
<mwc-button class="warning" @click=${this._uninstallClicked}>
|
<mwc-button class="warning" @click=${this._uninstallClicked}>
|
||||||
Uninstall
|
Uninstall
|
||||||
@ -490,24 +452,21 @@ class HassioAddonInfo extends LitElement {
|
|||||||
>
|
>
|
||||||
Install
|
Install
|
||||||
</mwc-button>
|
</mwc-button>
|
||||||
`
|
`}
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</paper-card>
|
</paper-card>
|
||||||
|
|
||||||
${
|
${this.addon.long_description
|
||||||
this.addon.long_description
|
? html`
|
||||||
? html`
|
<paper-card>
|
||||||
<paper-card>
|
<div class="card-content">
|
||||||
<div class="card-content">
|
<ha-markdown
|
||||||
<ha-markdown
|
.content=${this.addon.long_description}
|
||||||
.content=${this.addon.long_description}
|
></ha-markdown>
|
||||||
></ha-markdown>
|
</div>
|
||||||
</div>
|
</paper-card>
|
||||||
</paper-card>
|
`
|
||||||
`
|
: ""}
|
||||||
: ""
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user