mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 00:06:35 +00:00
Add signed add-on capability and adjust max rating (#11703)
This commit is contained in:
parent
f923228078
commit
cbd0ef6b65
@ -9,6 +9,7 @@ import {
|
|||||||
mdiFlask,
|
mdiFlask,
|
||||||
mdiHomeAssistant,
|
mdiHomeAssistant,
|
||||||
mdiKey,
|
mdiKey,
|
||||||
|
mdiLinkLock,
|
||||||
mdiNetwork,
|
mdiNetwork,
|
||||||
mdiNumeric1,
|
mdiNumeric1,
|
||||||
mdiNumeric2,
|
mdiNumeric2,
|
||||||
@ -16,6 +17,8 @@ import {
|
|||||||
mdiNumeric4,
|
mdiNumeric4,
|
||||||
mdiNumeric5,
|
mdiNumeric5,
|
||||||
mdiNumeric6,
|
mdiNumeric6,
|
||||||
|
mdiNumeric7,
|
||||||
|
mdiNumeric8,
|
||||||
mdiPound,
|
mdiPound,
|
||||||
mdiShield,
|
mdiShield,
|
||||||
} from "@mdi/js";
|
} from "@mdi/js";
|
||||||
@ -31,6 +34,7 @@ import "../../../../src/components/buttons/ha-progress-button";
|
|||||||
import "../../../../src/components/ha-alert";
|
import "../../../../src/components/ha-alert";
|
||||||
import "../../../../src/components/ha-card";
|
import "../../../../src/components/ha-card";
|
||||||
import "../../../../src/components/ha-chip";
|
import "../../../../src/components/ha-chip";
|
||||||
|
import "../../../../src/components/ha-chip-set";
|
||||||
import "../../../../src/components/ha-markdown";
|
import "../../../../src/components/ha-markdown";
|
||||||
import "../../../../src/components/ha-settings-row";
|
import "../../../../src/components/ha-settings-row";
|
||||||
import "../../../../src/components/ha-svg-icon";
|
import "../../../../src/components/ha-svg-icon";
|
||||||
@ -84,6 +88,8 @@ const RATING_ICON = {
|
|||||||
4: mdiNumeric4,
|
4: mdiNumeric4,
|
||||||
5: mdiNumeric5,
|
5: mdiNumeric5,
|
||||||
6: mdiNumeric6,
|
6: mdiNumeric6,
|
||||||
|
7: mdiNumeric7,
|
||||||
|
8: mdiNumeric8,
|
||||||
};
|
};
|
||||||
|
|
||||||
@customElement("hassio-addon-info")
|
@customElement("hassio-addon-info")
|
||||||
@ -209,7 +215,7 @@ class HassioAddonInfo extends LitElement {
|
|||||||
>`}
|
>`}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="capabilities">
|
<ha-chip-set class="capabilities">
|
||||||
${this.addon.stage !== "stable"
|
${this.addon.stage !== "stable"
|
||||||
? html` <ha-chip
|
? html` <ha-chip
|
||||||
hasIcon
|
hasIcon
|
||||||
@ -234,9 +240,9 @@ class HassioAddonInfo extends LitElement {
|
|||||||
<ha-chip
|
<ha-chip
|
||||||
hasIcon
|
hasIcon
|
||||||
class=${classMap({
|
class=${classMap({
|
||||||
green: [5, 6].includes(Number(this.addon.rating)),
|
green: Number(this.addon.rating) >= 6,
|
||||||
yellow: [3, 4].includes(Number(this.addon.rating)),
|
yellow: [3, 4, 5].includes(Number(this.addon.rating)),
|
||||||
red: [1, 2].includes(Number(this.addon.rating)),
|
red: Number(this.addon.rating) >= 2,
|
||||||
})}
|
})}
|
||||||
@click=${this._showMoreInfo}
|
@click=${this._showMoreInfo}
|
||||||
id="rating"
|
id="rating"
|
||||||
@ -364,7 +370,17 @@ class HassioAddonInfo extends LitElement {
|
|||||||
</ha-chip>
|
</ha-chip>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
</div>
|
${this.addon.signed
|
||||||
|
? html`
|
||||||
|
<ha-chip hasIcon @click=${this._showMoreInfo} id="signed">
|
||||||
|
<ha-svg-icon slot="icon" .path=${mdiLinkLock}></ha-svg-icon>
|
||||||
|
${this.supervisor.localize(
|
||||||
|
"addon.dashboard.capability.label.signed"
|
||||||
|
)}
|
||||||
|
</ha-chip>
|
||||||
|
`
|
||||||
|
: ""}
|
||||||
|
</ha-chip-set>
|
||||||
|
|
||||||
<div class="description light-color">
|
<div class="description light-color">
|
||||||
${this.addon.description}.<br />
|
${this.addon.description}.<br />
|
||||||
|
@ -84,9 +84,10 @@ export interface HassioAddonDetails extends HassioAddonInfo {
|
|||||||
options: Record<string, unknown>;
|
options: Record<string, unknown>;
|
||||||
privileged: any;
|
privileged: any;
|
||||||
protected: boolean;
|
protected: boolean;
|
||||||
rating: "1-6";
|
rating: "1-8";
|
||||||
schema: HaFormSchema[] | null;
|
schema: HaFormSchema[] | null;
|
||||||
services_role: string[];
|
services_role: string[];
|
||||||
|
signed: boolean;
|
||||||
slug: string;
|
slug: string;
|
||||||
startup: AddonStartup;
|
startup: AddonStartup;
|
||||||
stdin: boolean;
|
stdin: boolean;
|
||||||
|
@ -4287,6 +4287,10 @@
|
|||||||
"title": "Ingress",
|
"title": "Ingress",
|
||||||
"description": "This add-on is using Ingress to embed its interface securely into Home Assistant."
|
"description": "This add-on is using Ingress to embed its interface securely into Home Assistant."
|
||||||
},
|
},
|
||||||
|
"signed": {
|
||||||
|
"title": "Signed",
|
||||||
|
"description": "This add-on signed and verified with Codenotary Community Attestation Service (CAS)."
|
||||||
|
},
|
||||||
"label": {
|
"label": {
|
||||||
"core": "Core",
|
"core": "Core",
|
||||||
"rating": "rating",
|
"rating": "rating",
|
||||||
@ -4297,7 +4301,8 @@
|
|||||||
"host_pid": "host pid",
|
"host_pid": "host pid",
|
||||||
"apparmor": "apparmor",
|
"apparmor": "apparmor",
|
||||||
"auth": "auth",
|
"auth": "auth",
|
||||||
"ingress": "ingress"
|
"ingress": "ingress",
|
||||||
|
"signed": "Signed"
|
||||||
},
|
},
|
||||||
"stages": {
|
"stages": {
|
||||||
"experimental": "Experimental",
|
"experimental": "Experimental",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user