Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
19 changes: 17 additions & 2 deletions hassio/src/addon-view/info/hassio-addon-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ import {
mdiNumeric4,
mdiNumeric5,
mdiNumeric6,
mdiNumeric7,
mdiNumeric8,
mdiPound,
mdiShield,
mdiLinkLock,
} from "@mdi/js";
import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit";
import { customElement, property, state } from "lit/decorators";
Expand Down Expand Up @@ -84,6 +87,8 @@ const RATING_ICON = {
4: mdiNumeric4,
5: mdiNumeric5,
6: mdiNumeric6,
7: mdiNumeric7,
8: mdiNumeric8,
};

@customElement("hassio-addon-info")
Expand Down Expand Up @@ -234,8 +239,8 @@ 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)),
green: [6, 7, 8].includes(Number(this.addon.rating)),
Comment thread
ludeeus marked this conversation as resolved.
Outdated
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: [1, 2].includes(Number(this.addon.rating)),
Comment thread
ludeeus marked this conversation as resolved.
Outdated
})}
@click=${this._showMoreInfo}
Expand Down Expand Up @@ -364,6 +369,16 @@ class HassioAddonInfo extends LitElement {
</ha-chip>
`
: ""}
${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>
`
: ""}
</div>
Comment thread
ludeeus marked this conversation as resolved.
Outdated

<div class="description light-color">
Expand Down
1 change: 1 addition & 0 deletions src/data/hassio/addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export interface HassioAddonDetails extends HassioAddonInfo {
rating: "1-6";
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