Skip to content

Commit

Permalink
Disable upgrade if can not be installed
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Apr 26, 2020
1 parent 14ea885 commit ee8c3ab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/buttons/HacsButtonMainAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ export class HacsButtonMainAction extends HacsRepositoryButton {
</mwc-button>
`;
}
if (!this.repository.can_install && this.repository.installed) {
return html`
<mwc-button class="disabled-button" @click=${this.RepositoryInstall}>
${localize(`repository.upgrade`)}
</mwc-button>
`;
}
return html`
<mwc-button @click=${this.RepositoryInstall}>
${this.repository.state == "installing"
Expand Down

0 comments on commit ee8c3ab

Please sign in to comment.