Skip to content

Commit

Permalink
fixes #175 and #178
Browse files Browse the repository at this point in the history
  • Loading branch information
oznu committed Nov 16, 2018
1 parent e0212c9 commit 65e1aee
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).

## NEXT

### Notable Changes

* **i18n:** Improvements to German language translation ([#174](https://github.com/oznu/homebridge-config-ui-x/pull/174))
* **Auth:** Fixed bug preventing login when credentials were autofilled in Chrome ([#175](https://github.com/oznu/homebridge-config-ui-x/issues/175))
* **Plugins:** Prevent invalid link to plugin homepage being displayed if the URL is not known ([#178](https://github.com/oznu/homebridge-config-ui-x/issues/178))

## 3.9.0 (2018-11-03)

### Notable Changes
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<div class="text-center">
<p class="red-text" *ngIf="invalidCredentials"><small [translate]="'login.message_invalid_username_or_password'">Invalid Username and Password</small></p>
<button tabindex="3" class="btn btn-amber" type="submit" [disabled]="!form.valid" [translate]="'login.button_login'">Login</button>
<button tabindex="3" class="btn btn-amber" type="submit" [translate]="'login.button_login'">Login</button>
</div>

</form>
Expand Down
5 changes: 5 additions & 0 deletions ui/src/app/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ class LoginComponent implements OnInit {
}

onSubmit({ value, valid }) {
if (!valid) {
this.invalidCredentials = true;
return;
}

this.$auth.login(value.username, value.password)
.then((user) => {
this.$state.go(this.returnTo.name(), this.returnTo.params());
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/plugins/plugins.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h4 class="card-title mb-0" [innerHtml]="plugin.description"></h4>
<a class="card-link" *ngIf="plugin.settingsSchema && plugin.name === 'homebridge-config-ui-x' && !$auth.env.ableToConfigureSelf" uiSref="docker.settings">
{{ 'plugins.button_settings' | translate | uppercase }}
</a>
<a class="card-link ml-auto grey-text" target="_blank" rel="noopener noreferrer" [href]="plugin.links.homepage || plugin.links.npm" [ngbTooltip]="plugin.links.homepage || plugin.links.npm" container="body" placement="left">
<a class="card-link ml-auto grey-text" target="_blank" rel="noopener noreferrer" *ngIf="plugin.links.homepage || plugin.links.npm" [href]="plugin.links.homepage || plugin.links.npm" [ngbTooltip]="plugin.links.homepage || plugin.links.npm" container="body" placement="left">
<i class="fas fa-external-link-alt"></i>
</a>
</div>
Expand Down

0 comments on commit 65e1aee

Please sign in to comment.