mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Format code.
This commit is contained in:
@@ -100,14 +100,16 @@ export default function AttachmentActions({ attachment }: Props) {
|
||||
<File size={24} className={styles.iconType} />
|
||||
<span className={styles.filename}>{filename}</span>
|
||||
<span className={styles.filesize}>{filesize}</span>
|
||||
{ metadata.type === 'Text' && <a
|
||||
href={open_url}
|
||||
target="_blank"
|
||||
className={styles.externalType}>
|
||||
<IconButton>
|
||||
<LinkExternal size={24} />
|
||||
</IconButton>
|
||||
</a> }
|
||||
{metadata.type === "Text" && (
|
||||
<a
|
||||
href={open_url}
|
||||
target="_blank"
|
||||
className={styles.externalType}>
|
||||
<IconButton>
|
||||
<LinkExternal size={24} />
|
||||
</IconButton>
|
||||
</a>
|
||||
)}
|
||||
<a
|
||||
href={download_url}
|
||||
className={styles.downloadIcon}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Reply, File } from "@styled-icons/boxicons-regular";
|
||||
import { SYSTEM_USER_ID } from "revolt.js";
|
||||
import styled, { css } from "styled-components";
|
||||
|
||||
import { Text } from "preact-i18n";
|
||||
@@ -9,7 +10,6 @@ import { useUser } from "../../../../context/revoltjs/hooks";
|
||||
|
||||
import Markdown from "../../../markdown/Markdown";
|
||||
import UserShort from "../../user/UserShort";
|
||||
import { SYSTEM_USER_ID } from "revolt.js";
|
||||
import { SystemMessage } from "../SystemMessage";
|
||||
|
||||
interface Props {
|
||||
@@ -86,13 +86,14 @@ export function MessageReply({ index, channel, id }: Props) {
|
||||
{message.attachments && message.attachments.length > 0 && (
|
||||
<File size={16} />
|
||||
)}
|
||||
{ message.author === SYSTEM_USER_ID ?
|
||||
<SystemMessage message={message} /> :
|
||||
{message.author === SYSTEM_USER_ID ? (
|
||||
<SystemMessage message={message} />
|
||||
) : (
|
||||
<Markdown
|
||||
disallowBigEmoji
|
||||
content={(message.content as string).replace(/\n/g, " ")}
|
||||
/>
|
||||
}
|
||||
)}
|
||||
</ReplyBase>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,9 @@ export default function TextFile({ attachment }: Props) {
|
||||
if (loading) return;
|
||||
|
||||
if (attachment.size > 20_000) {
|
||||
setContent('This file is > 20 KB, for your sake I did not load it.\nSee tracking issue here for previews: https://gitlab.insrt.uk/revolt/revite/-/issues/2');
|
||||
setContent(
|
||||
"This file is > 20 KB, for your sake I did not load it.\nSee tracking issue here for previews: https://gitlab.insrt.uk/revolt/revite/-/issues/2",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user