chore: lint
This commit is contained in:
parent
54578f6965
commit
099b86ff3c
4 changed files with 7 additions and 14 deletions
|
@ -339,13 +339,6 @@ export class MfmService {
|
||||||
mention: (node) => {
|
mention: (node) => {
|
||||||
const a = doc.createElement('a');
|
const a = doc.createElement('a');
|
||||||
const { username, host, acct } = node.props;
|
const { username, host, acct } = node.props;
|
||||||
/* if (mastodon) {
|
|
||||||
const splitacct = acct.split("@");
|
|
||||||
a.setAttribute('href', splitacct[2] !== this.config.host && splitacct[2] !== undefined ? `https://${splitacct[2]}/@${splitacct[1]}` : `https://${this.config.host}/${acct}`);
|
|
||||||
a.className = 'u-url mention';
|
|
||||||
a.textContent = acct;
|
|
||||||
return a;
|
|
||||||
} */
|
|
||||||
const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username === username && remoteUser.host === host);
|
const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username === username && remoteUser.host === host);
|
||||||
a.setAttribute('href', remoteUserInfo ? (remoteUserInfo.url ? remoteUserInfo.url : remoteUserInfo.uri) : `${this.config.url}/${acct}`);
|
a.setAttribute('href', remoteUserInfo ? (remoteUserInfo.url ? remoteUserInfo.url : remoteUserInfo.uri) : `${this.config.url}/${acct}`);
|
||||||
a.className = 'u-url mention';
|
a.className = 'u-url mention';
|
||||||
|
|
|
@ -67,7 +67,7 @@ export class MastoConverters {
|
||||||
public async getUser(id: string): Promise<MiUser> {
|
public async getUser(id: string): Promise<MiUser> {
|
||||||
return this.GetterService.getUser(id).then(p => {
|
return this.GetterService.getUser(id).then(p => {
|
||||||
return p;
|
return p;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async convertStatus(status: Entity.Status) {
|
public async convertStatus(status: Entity.Status) {
|
||||||
|
@ -94,7 +94,7 @@ export class MastoConverters {
|
||||||
id: convertId(mention.id, IdConvertType.MastodonId),
|
id: convertId(mention.id, IdConvertType.MastodonId),
|
||||||
}));
|
}));
|
||||||
const convertedMFM = this.MfmService.toHtml(parse(status.content), JSON.parse(note.mentionedRemoteUsers));
|
const convertedMFM = this.MfmService.toHtml(parse(status.content), JSON.parse(note.mentionedRemoteUsers));
|
||||||
status.content = status.content ? convertedMFM?.replace(/&/g , "&").replaceAll(`<span>&</span><a href="${this.config.url}/tags/39;" rel="tag">#39;</a>` , "<span>\'</span>")! : status.content;
|
status.content = status.content ? convertedMFM?.replace(/&/g, "&").replaceAll(`<span>&</span><a href="${this.config.url}/tags/39;" rel="tag">#39;</a>`, "<span>\'</span>") as string : status.content;
|
||||||
if (status.poll) status.poll = convertPoll(status.poll);
|
if (status.poll) status.poll = convertPoll(status.poll);
|
||||||
if (status.reblog) status.reblog = convertStatus(status.reblog);
|
if (status.reblog) status.reblog = convertStatus(status.reblog);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div ref="el" v-if="!muted" :class="[$style.root, { [$style.children]: depth > 1 }]">
|
<div v-if="!muted" ref="el" :class="[$style.root, { [$style.children]: depth > 1 }]">
|
||||||
<div :class="$style.main">
|
<div :class="$style.main">
|
||||||
<div v-if="note.channel" :class="$style.colorBar" :style="{ background: note.channel.color }"></div>
|
<div v-if="note.channel" :class="$style.colorBar" :style="{ background: note.channel.color }"></div>
|
||||||
<MkAvatar :class="$style.avatar" :user="note.user" link preview/>
|
<MkAvatar :class="$style.avatar" :user="note.user" link preview/>
|
||||||
|
|
Loading…
Reference in a new issue