added emojis in user profile's name and note
This commit is contained in:
parent
74e1a31031
commit
6a238f265b
|
@ -5,7 +5,7 @@
|
|||
<div *ngIf="displayedAccount" class="profile-header" [ngStyle]="{'background-image':'url('+displayedAccount.header+')'}">
|
||||
<div class="profile-header__inner">
|
||||
<img class="profile-header__avatar" src="{{displayedAccount.avatar}}" alt="header" />
|
||||
<h2 class="profile-header__display-name">{{displayedAccount.display_name}}</h2>
|
||||
<h2 class="profile-header__display-name" innerHTML="{{displayedAccount | accountEmoji }}"></h2>
|
||||
<h2 class="profile-header__fullhandle"><a href="{{displayedAccount.url}}" target="_blank">@{{displayedAccount.acct}}</a></h2>
|
||||
|
||||
<div class="profile-header__follow" *ngIf="relationship">
|
||||
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
<div class="profile-sub-header ">
|
||||
<div *ngIf="displayedAccount && hasNote" class="profile-description">
|
||||
<app-databinded-text class="profile-description__content" [textIsSelectable]="false" [text]="displayedAccount.note"
|
||||
<app-databinded-text class="profile-description__content" [textIsSelectable]="false" [text]="note"
|
||||
(accountSelected)="browseAccount($event)" (hashtagSelected)="browseHashtag($event)">
|
||||
</app-databinded-text>
|
||||
</div>
|
||||
|
|
|
@ -11,8 +11,7 @@ import { ToolsService, OpenThreadEvent } from '../../../services/tools.service';
|
|||
import { NotificationService } from '../../../services/notification.service';
|
||||
import { AccountInfo } from '../../../states/accounts.state';
|
||||
import { StatusWrapper } from '../../../models/common.model';
|
||||
|
||||
|
||||
import { EmojiConverter, EmojiTypeEnum } from '../../../tools/emoji.tools';
|
||||
|
||||
@Component({
|
||||
selector: 'app-user-profile',
|
||||
|
@ -20,6 +19,8 @@ import { StatusWrapper } from '../../../models/common.model';
|
|||
styleUrls: ['./user-profile.component.scss']
|
||||
})
|
||||
export class UserProfileComponent implements OnInit {
|
||||
private emojiConverter = new EmojiConverter();
|
||||
|
||||
faUser = faUser;
|
||||
faUserRegular = faUserRegular;
|
||||
faHourglassHalf = faHourglassHalf;
|
||||
|
@ -28,6 +29,8 @@ export class UserProfileComponent implements OnInit {
|
|||
displayedAccount: Account;
|
||||
hasNote: boolean;
|
||||
|
||||
note: string;
|
||||
|
||||
isLoading: boolean;
|
||||
|
||||
private maxReached = false;
|
||||
|
@ -100,6 +103,9 @@ export class UserProfileComponent implements OnInit {
|
|||
|
||||
this.displayedAccount = account;
|
||||
this.hasNote = account && account.note && account.note !== '<p></p>';
|
||||
if(this.hasNote){
|
||||
this.note = this.emojiConverter.applyEmojis(account.emojis, account.note, EmojiTypeEnum.medium);
|
||||
}
|
||||
|
||||
const getFollowStatusPromise = this.getFollowStatus(this.currentlyUsedAccount, this.displayedAccount);
|
||||
const getStatusesPromise = this.getStatuses(this.currentlyUsedAccount, this.displayedAccount);
|
||||
|
|
Loading…
Reference in New Issue