mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Use manifest.issue_tracker for issues URL if not built_in (#5818)
This commit is contained in:
parent
2d627819d9
commit
60be14dc77
@ -18,7 +18,11 @@ export interface IntegrationManifest {
|
||||
quality_scale?: string;
|
||||
}
|
||||
|
||||
export const integrationIssuesUrl = (domain: string) =>
|
||||
export const integrationIssuesUrl = (
|
||||
domain: string,
|
||||
manifest: IntegrationManifest
|
||||
) =>
|
||||
manifest.issue_tracker ||
|
||||
`https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+${domain}%22`;
|
||||
|
||||
export const domainToName = (localize: LocalizeFunc, domain: string) =>
|
||||
|
@ -71,12 +71,14 @@ class IntegrationsCard extends LitElement {
|
||||
)}
|
||||
</a>
|
||||
</td>
|
||||
${!manifest.is_built_in
|
||||
? ""
|
||||
: html`
|
||||
${manifest.is_built_in || manifest.issue_tracker
|
||||
? html`
|
||||
<td>
|
||||
<a
|
||||
href=${integrationIssuesUrl(domain)}
|
||||
href=${integrationIssuesUrl(
|
||||
domain,
|
||||
manifest
|
||||
)}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
@ -85,7 +87,8 @@ class IntegrationsCard extends LitElement {
|
||||
)}
|
||||
</a>
|
||||
</td>
|
||||
`}
|
||||
`
|
||||
: ""}
|
||||
`}
|
||||
</tr>
|
||||
`;
|
||||
|
@ -84,15 +84,19 @@ class DialogSystemLogDetail extends LitElement {
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>documentation</a
|
||||
>${!this._manifest.is_built_in
|
||||
? ""
|
||||
: html`,
|
||||
>${this._manifest.is_built_in ||
|
||||
this._manifest.issue_tracker
|
||||
? html`,
|
||||
<a
|
||||
href=${integrationIssuesUrl(integration)}
|
||||
href=${integrationIssuesUrl(
|
||||
integration,
|
||||
this._manifest
|
||||
)}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>issues</a
|
||||
>`})
|
||||
>`
|
||||
: ""})
|
||||
`}
|
||||
`
|
||||
: ""}
|
||||
|
Loading…
x
Reference in New Issue
Block a user