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
17 changes: 17 additions & 0 deletions hassio/src/addon-view/info/hassio-addon-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ import { showHassioMarkdownDialog } from "../../dialogs/markdown/show-dialog-has
import { hassioStyle } from "../../resources/hassio-style";

const PERMIS_DESC = {
stage: {
title: "Add-on Stage",
description:
"Add-ons can have one of three stages:\n\n**Stable**: These are add-ons ready to be used in production.\n**Experimental**: These may contain bugs, and may be unfinished.\n**Deprecated:**: These add-ons will no longer recieve any updates.",
},
rating: {
title: "Add-on Security Rating",
description:
Expand Down Expand Up @@ -205,6 +210,18 @@ class HassioAddonInfo extends LitElement {
`
: ""}
<div class="security">
<ha-label-badge

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.

I still think we should iconize it... 🤷‍♂️
As the text will never fit in the badge itself.

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.

Sure, we can do that, but I think that will be confusing.
I'll throw up some examples in a few mins.

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.

image
image
image
image

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.

If they are added to the dialog as well, that might work:
image

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.

I like that approach by including the mapping in the description!

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.

Maybe we only have to show this if it isn't stable?

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.

I think they always should show, regardless of the stage.

Comment thread
ludeeus marked this conversation as resolved.
class=${classMap({
green: this.addon.stage === "stable",
yellow: this.addon.stage === "experimental",
red: this.addon.stage === "deprecated",
})}
@click=${this._showMoreInfo}
id="stage"
.value=${this.addon.stage}
label="stage"
description=""
></ha-label-badge>
<ha-label-badge
class=${classMap({
green: [5, 6].includes(Number(this.addon.rating)),
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 @@ -46,6 +46,7 @@ export interface HassioAddonDetails extends HassioAddonInfo {
auto_uart: boolean;
icon: boolean;
logo: boolean;
stage?: string;
Comment thread
ludeeus marked this conversation as resolved.
Outdated

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.

Suggested change
stage?: string;
stage: "stable" | "experimental" | "deprecated";

changelog: boolean;
hassio_api: boolean;
hassio_role: "default" | "homeassistant" | "manager" | "admin";
Expand Down