better account handling in account management

This commit is contained in:
Nicolas Constant 2019-06-23 15:33:45 -04:00
parent 1327860c07
commit da7ddc7f3d
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
2 changed files with 13 additions and 2 deletions

View File

@ -2,8 +2,8 @@
<h3 class="panel__title">Manage Account</h3> <h3 class="panel__title">Manage Account</h3>
<div class="account__header"> <div class="account__header">
<a href="{{userAccount.url}}" target="_blank" > <a href (click)="browseLocalAccount()" (auxclick)="openLocalAccount()" title="open {{ account.info.id }}">
<img class="account__avatar" src="{{account.avatar}}" title="{{ account.info.id }} " /> <img class="account__avatar" src="{{account.avatar}}"/>
</a> </a>
<!-- <a href class="account__header--button"><fa-icon [icon]="faUserPlus"></fa-icon></a> --> <!-- <a href class="account__header--button"><fa-icon [icon]="faUserPlus"></fa-icon></a> -->

View File

@ -94,6 +94,17 @@ export class ManageAccountComponent implements OnInit, OnDestroy {
this.browseAccountEvent.next(accountName); this.browseAccountEvent.next(accountName);
} }
browseLocalAccount(): boolean {
var accountName = `@${this.account.info.username}@${this.account.info.instance}`;
this.browseAccountEvent.next(accountName);
return false;
}
openLocalAccount(): boolean {
window.open(this.userAccount.url, '_blank');
return false;
}
browseHashtag(hashtag: string): void { browseHashtag(hashtag: string): void {
this.browseHashtagEvent.next(hashtag); this.browseHashtagEvent.next(hashtag);
} }