commit
c804fbce68
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "sengi",
|
||||
"version": "0.20.0",
|
||||
"version": "0.20.1",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"main": "main-electron.js",
|
||||
"description": "A multi-account desktop client for Mastodon and Pleroma",
|
||||
|
|
|
@ -22,7 +22,7 @@ export class AddNewAccountComponent implements OnInit {
|
|||
private instance: string;
|
||||
@Input()
|
||||
set setInstance(value: string) {
|
||||
this.instance = value;
|
||||
this.instance = value.trim();
|
||||
this.checkComrad();
|
||||
}
|
||||
get setInstance(): string {
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<a href class="status__content-warning" *ngIf="isContentWarned" title="show content"
|
||||
(click)="removeContentWarning()">
|
||||
<span class="status__content-warning--title">sensitive content</span>
|
||||
{{ contentWarningText }}
|
||||
<span innerHTML="{{ contentWarningText }}"></span>
|
||||
</a>
|
||||
<app-databinded-text class="status__content" *ngIf="!isContentWarned" [text]="statusContent"
|
||||
(accountSelected)="accountSelected($event)" (hashtagSelected)="hashtagSelected($event)"
|
||||
|
|
|
@ -97,7 +97,7 @@ export class StatusComponent implements OnInit {
|
|||
private checkContentWarning(status: Status) {
|
||||
if (status.sensitive || status.spoiler_text) {
|
||||
this.isContentWarned = true;
|
||||
this.contentWarningText = status.spoiler_text;
|
||||
this.contentWarningText = this.emojiConverter.applyEmojis(this.displayedStatus.emojis, status.spoiler_text, EmojiTypeEnum.medium);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ export class UserProfileComponent implements OnInit {
|
|||
this.isLoading = false;
|
||||
this.statusLoading = true;
|
||||
|
||||
this.displayedAccount = account;
|
||||
this.displayedAccount = this.fixPleromaFieldsUrl(account);
|
||||
this.hasNote = account && account.note && account.note !== '<p></p>';
|
||||
if (this.hasNote) {
|
||||
this.note = this.emojiConverter.applyEmojis(account.emojis, account.note, EmojiTypeEnum.medium);
|
||||
|
@ -178,6 +178,18 @@ export class UserProfileComponent implements OnInit {
|
|||
});
|
||||
}
|
||||
|
||||
private fixPleromaFieldsUrl(acc: Account): Account {
|
||||
if(acc.fields){
|
||||
acc.fields.forEach(f => {
|
||||
if(f.value.includes('<a href="') && !f.value.includes('target="_blank"')){
|
||||
f.value = f.value.replace('<a href="', '<a target="_blank" href="');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
private getPinnedStatuses(userAccount: AccountInfo, account: Account): Promise<void> {
|
||||
return this.mastodonService.getAccountStatuses(userAccount, account.id, false, true, false, null, null, 20)
|
||||
.then((statuses: Status[]) => {
|
||||
|
|
Loading…
Reference in New Issue