Update: Changed icon pack to Boxicons

This commit is contained in:
nizune
2021-06-27 12:17:59 +02:00
parent a6ba6d5c5b
commit 4102b69ca4
40 changed files with 113 additions and 116 deletions

View File

@@ -4,7 +4,7 @@ import IconButton from '../../../ui/IconButton';
import { Attachment } from "revolt.js/dist/api/objects";
import { determineFileSize } from '../../../../lib/fileSize';
import { AppContext } from '../../../../context/revoltjs/RevoltClient';
import { Download, ExternalLink, File, Headphones, Video } from '@styled-icons/feather';
import { Download, LinkExternal, File, Headphone, Video } from '@styled-icons/boxicons-regular';
interface Props {
attachment: Attachment;
@@ -30,7 +30,7 @@ export default function AttachmentActions({ attachment }: Props) {
</div>
<a href={open_url} target="_blank">
<IconButton>
<ExternalLink size={24} />
<LinkExternal size={24} />
</IconButton>
</a>
<a href={download_url} download target="_blank">
@@ -43,14 +43,14 @@ export default function AttachmentActions({ attachment }: Props) {
case 'Audio':
return (
<div className={styles.actions}>
<Headphones size={24} strokeWidth={1.5} />
<Headphone size={24} />
<div className={styles.info}>
<span className={styles.filename}>{filename}</span>
<span className={styles.filesize}>{filesize}</span>
</div>
<a href={download_url} download target="_blank">
<IconButton>
<Download size={24} strokeWidth={1.5} />
<Download size={24} />
</IconButton>
</a>
</div>
@@ -58,14 +58,14 @@ export default function AttachmentActions({ attachment }: Props) {
case 'Video':
return (
<div className={styles.actions}>
<Video size={24} strokeWidth={1.5} />
<Video size={24} />
<div className={styles.info}>
<span className={styles.filename}>{filename}</span>
<span className={styles.filesize}>{metadata.width + 'x' + metadata.height} ({filesize})</span>
</div>
<a href={download_url} download target="_blank">
<IconButton>
<Download size={24} strokeWidth={1.5}/>
<Download size={24} />
</IconButton>
</a>
</div>
@@ -73,14 +73,14 @@ export default function AttachmentActions({ attachment }: Props) {
default:
return (
<div className={styles.actions}>
<File size={24} strokeWidth={1.5} />
<File size={24} />
<div className={styles.info}>
<span className={styles.filename}>{filename}</span>
<span className={styles.filesize}>{filesize}</span>
</div>
<a href={download_url} download target="_blank">
<IconButton>
<Download size={24} strokeWidth={1.5} />
<Download size={24} />
</IconButton>
</a>
</div>

View File

@@ -2,7 +2,7 @@ import { Text } from "preact-i18n";
import UserShort from "../../user/UserShort";
import styled, { css } from "styled-components";
import Markdown from "../../../markdown/Markdown";
import { CornerUpRight, File } from "@styled-icons/feather";
import { Reply, File } from "@styled-icons/boxicons-regular";
import { useUser } from "../../../../context/revoltjs/hooks";
import { useRenderState } from "../../../../lib/renderer/Singleton";
@@ -52,7 +52,7 @@ export function MessageReply({ index, channel, id }: Props) {
if (!message) {
return (
<ReplyBase head={index === 0} fail>
<CornerUpRight size={16} />
<Reply size={16} />
<span><Text id="app.main.channel.misc.failed_load" /></span>
</ReplyBase>
)
@@ -62,7 +62,7 @@ export function MessageReply({ index, channel, id }: Props) {
return (
<ReplyBase head={index === 0}>
<CornerUpRight size={16} />
<Reply size={16} />
<UserShort user={user} size={16} />
{ message.attachments && message.attachments.length > 0 && <File size={16} /> }
<Markdown disallowBigEmoji content={(message.content as string).replace(/\n/g, ' ')} />