add action to navigate to device add

pull/3/head
Chris Veilleux 2019-03-22 16:10:38 -05:00
parent aeae76ba60
commit 21f48983c1
2 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,7 @@
<span class="menu-item-text">Profile</span>
</button>
<mat-divider *ngIf="isAuthenticated" class="menu-divider"></mat-divider>
<button *ngIf="isAuthenticated" mat-menu-item>
<button *ngIf="isAuthenticated" mat-menu-item (click)="navigateToAddDevice()">
<fa-icon [icon]="addDeviceIcon" class="menu-item-icon"></fa-icon>
<span class="menu-item-text">Add Device</span>
</button>

View File

@ -52,4 +52,8 @@ export class AccountMenuComponent implements OnInit {
navigateToSkills() {
window.location.href = this.mycroftUrls.account + '/skills';
}
navigateToAddDevice() {
window.location.href = this.mycroftUrls.account + '/devices/add';
}
}