added following account notification infos #55
This commit is contained in:
parent
e6237ca0d3
commit
4541b7b092
|
@ -23,16 +23,21 @@
|
||||||
<fa-icon class="followed" [icon]="faUserPlus"></fa-icon>
|
<fa-icon class="followed" [icon]="faUserPlus"></fa-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="stream__notification--label">
|
<div class="stream__notification--label">
|
||||||
<a href class="stream__link">{{ notification.account.display_name }}</a> followed you!
|
<a href class="stream__link"
|
||||||
|
(click)="openAccount(notification.account)">{{ notification.account.display_name }}</a> followed
|
||||||
|
you!
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<a href (click)="openAccount(notification.account)" class="follow-account" title="{{notification.account.acct}}">
|
||||||
|
<img class="follow-account__avatar" src="{{ notification.account.avatar }}" />
|
||||||
|
<span class="follow-account__display-name" >{{ notification.account.display_name }}</span>
|
||||||
|
<span class="follow-account__acct">@{{ notification.account.acct }}</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<app-status *ngIf="notification.status" class="stream__status"
|
<app-status *ngIf="notification.status" class="stream__status" [statusWrapper]="notification.status"
|
||||||
[statusWrapper]="notification.status"
|
[notificationAccount]="notification.account" [notificationType]="notification.type"
|
||||||
[notificationAccount]="notification.account"
|
(browseAccountEvent)="browseAccount($event)" (browseHashtagEvent)="browseHashtag($event)"
|
||||||
[notificationType]="notification.type"
|
|
||||||
(browseAccountEvent)="browseAccount($event)"
|
|
||||||
(browseHashtagEvent)="browseHashtag($event)"
|
|
||||||
(browseThreadEvent)="browseThread($event)"></app-status>
|
(browseThreadEvent)="browseThread($event)"></app-status>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -50,3 +50,41 @@
|
||||||
.followed {
|
.followed {
|
||||||
color: $boost-color;
|
color: $boost-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.follow-account {
|
||||||
|
padding: 5px;
|
||||||
|
height: 60px;
|
||||||
|
width: calc(100%);
|
||||||
|
overflow: hidden;
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
text-decoration: none;
|
||||||
|
|
||||||
|
&__avatar {
|
||||||
|
float: left;
|
||||||
|
margin: 0 0 0 10px;
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
$acccount-info-left: 70px;
|
||||||
|
&__display-name {
|
||||||
|
position: absolute;
|
||||||
|
top: 7px;
|
||||||
|
left: $acccount-info-left;
|
||||||
|
color: whitesmoke;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover &__display-name {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__acct {
|
||||||
|
position: absolute;
|
||||||
|
top: 27px;
|
||||||
|
left: $acccount-info-left;
|
||||||
|
font-size: 13px;
|
||||||
|
color: $status-links-color;
|
||||||
|
}
|
||||||
|
}
|
|
@ -118,6 +118,14 @@ export class NotificationsComponent implements OnInit, OnDestroy {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
openAccount(account: Account): boolean {
|
||||||
|
let accountName = account.acct;
|
||||||
|
if (!accountName.includes('@'))
|
||||||
|
accountName += `@${account.url.replace('https://', '').split('/')[0]}`;
|
||||||
|
|
||||||
|
this.browseAccountEvent.next(accountName);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
browseAccount(accountName: string): void {
|
browseAccount(accountName: string): void {
|
||||||
this.browseAccountEvent.next(accountName);
|
this.browseAccountEvent.next(accountName);
|
||||||
|
|
Loading…
Reference in New Issue