Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions hassio/src/addon-view/info/hassio-addon-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ import {
mdiFlask,
mdiHomeAssistant,
mdiKey,
mdiLinkLock,
mdiNetwork,
mdiNumeric1,
mdiNumeric2,
mdiNumeric3,
mdiNumeric4,
mdiNumeric5,
mdiNumeric6,
mdiNumeric7,
mdiNumeric8,
mdiPound,
mdiShield,
} from "@mdi/js";
Expand All @@ -31,6 +34,7 @@ import "../../../../src/components/buttons/ha-progress-button";
import "../../../../src/components/ha-alert";
import "../../../../src/components/ha-card";
import "../../../../src/components/ha-chip";
import "../../../../src/components/ha-chip-set";
import "../../../../src/components/ha-markdown";
import "../../../../src/components/ha-settings-row";
import "../../../../src/components/ha-svg-icon";
Expand Down Expand Up @@ -84,6 +88,8 @@ const RATING_ICON = {
4: mdiNumeric4,
5: mdiNumeric5,
6: mdiNumeric6,
7: mdiNumeric7,
8: mdiNumeric8,
};

@customElement("hassio-addon-info")
Expand Down Expand Up @@ -209,7 +215,7 @@ class HassioAddonInfo extends LitElement {
>`}
</div>

<div class="capabilities">
<ha-chip-set class="capabilities">
${this.addon.stage !== "stable"
? html` <ha-chip
hasIcon
Expand All @@ -234,9 +240,9 @@ class HassioAddonInfo extends LitElement {
<ha-chip
hasIcon
class=${classMap({
green: [5, 6].includes(Number(this.addon.rating)),
yellow: [3, 4].includes(Number(this.addon.rating)),
red: [1, 2].includes(Number(this.addon.rating)),
green: Number(this.addon.rating) >= 6,
yellow: [3, 4, 5].includes(Number(this.addon.rating)),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This yellow could be a bit darker. It's hard to read with white text.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's using this

/* for label-badge */
--label-badge-red: #DF4C1E;
--label-badge-blue: #039be5;
--label-badge-green: #0DA035;
--label-badge-yellow: #f4b400;
--label-badge-grey: #9e9e9e;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright let's keep it for now.

red: Number(this.addon.rating) >= 2,
})}
@click=${this._showMoreInfo}
id="rating"
Expand Down Expand Up @@ -364,7 +370,17 @@ class HassioAddonInfo extends LitElement {
</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">
${this.addon.description}.<br />
Expand Down
3 changes: 2 additions & 1 deletion src/data/hassio/addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ export interface HassioAddonDetails extends HassioAddonInfo {
options: Record<string, unknown>;
privileged: any;
protected: boolean;
rating: "1-6";
rating: "1-8";
schema: HaFormSchema[] | null;
services_role: string[];
signed: boolean;
slug: string;
startup: AddonStartup;
stdin: boolean;
Expand Down
7 changes: 6 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4285,6 +4285,10 @@
"title": "Ingress",
"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": {
"core": "Core",
"rating": "rating",
Expand All @@ -4295,7 +4299,8 @@
"host_pid": "host pid",
"apparmor": "apparmor",
"auth": "auth",
"ingress": "ingress"
"ingress": "ingress",
"signed": "Signed"
},
"stages": {
"experimental": "Experimental",
Expand Down