Skip to content

Commit

Permalink
Remove hacs-link component (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jun 4, 2023
1 parent a3b5403 commit f00b18f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 63 deletions.
1 change: 0 additions & 1 deletion src/components/dialogs/hacs-download-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { getRepositories, repositoryBeta, websocketSubscription } from "../../da
import { HacsStyles } from "../../styles/hacs-common-style";
import { generateLovelaceURL } from "../../tools/added-to-lovelace";
import { updateLovelaceResources } from "../../tools/update-lovelace-resources";
import "../hacs-link";
import "./hacs-dialog";
import { HacsDialogBase } from "./hacs-dialog-base";

Expand Down
1 change: 0 additions & 1 deletion src/components/dialogs/hacs-generic-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { html, TemplateResult } from "lit";
import { customElement, property } from "lit/decorators";
import memoizeOne from "memoize-one";
import "./hacs-dialog";
import "../hacs-link";
import { HacsDialogBase } from "./hacs-dialog-base";
import { RepositoryBase } from "../../data/repository";
import { markdownWithRepositoryContext } from "../../tools/markdown";
Expand Down
53 changes: 0 additions & 53 deletions src/components/hacs-link.ts

This file was deleted.

17 changes: 12 additions & 5 deletions src/panels/hacs-repository-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import "../../homeassistant-frontend/src/layouts/hass-error-screen";
import "../../homeassistant-frontend/src/layouts/hass-loading-screen";
import "../../homeassistant-frontend/src/layouts/hass-subpage";
import { HomeAssistant, Route } from "../../homeassistant-frontend/src/types";
import "../components/hacs-link";
import { repositoryMenuItems } from "../components/hacs-repository-owerflow-menu";
import { Hacs } from "../data/hacs";
import { fetchRepositoryInformation, RepositoryBase, RepositoryInfo } from "../data/repository";
Expand Down Expand Up @@ -203,12 +202,16 @@ export class HacsRepositoryPanel extends LitElement {
: ""}
${authors
? authors.map(
(author) => html`<hacs-link .url="https://github.com/${author}">
(author) => html`<a
href="https://github.com/${author}"
target="_blank"
rel="noreferrer noopener"
>
<ha-chip title="${this.hacs.localize("dialog_info.author")}" hasIcon>
<ha-svg-icon slot="icon" .path=${mdiAccount}></ha-svg-icon>
@${author}
</ha-chip>
</hacs-link>`
</a>`
)
: ""}
${this._repository.downloads
Expand All @@ -221,12 +224,16 @@ export class HacsRepositoryPanel extends LitElement {
<ha-svg-icon slot="icon" .path=${mdiStar}></ha-svg-icon>
${this._repository.stars}
</ha-chip>
<hacs-link .url="https://github.com/${this._repository.full_name}/issues">
<a
href="https://github.com/${this._repository.full_name}/issues"
target="_blank"
rel="noreferrer noopener"
>
<ha-chip title="${this.hacs.localize("dialog_info.open_issues")}" hasIcon>
<ha-svg-icon slot="icon" .path=${mdiExclamationThick}></ha-svg-icon>
${this._repository.issues}
</ha-chip>
</hacs-link>
</a>
</div>
<ha-markdown
.content=${markdownWithRepositoryContext(
Expand Down
3 changes: 0 additions & 3 deletions src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@ export const hacsStyleVariables = css`
--mdc-dialog-heading-ink-color: var(--hcv-text-color-primary);
--mdc-dialog-content-ink-color: var(--hcv-text-color-primary);
/*hacs-link*/
--hcv-text-decoration-link: var(--hacs-link-text-decoration, none);
}
`;

0 comments on commit f00b18f

Please sign in to comment.