forked from abner/for-legacy-web
Update: Changed icon pack to Boxicons
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useContext } from "preact/hooks";
|
||||
import { Channels } from "revolt.js/dist/api/objects";
|
||||
import { Hash, Volume2 } from "@styled-icons/feather";
|
||||
import { Hash, VolumeFull } from "@styled-icons/boxicons-regular";
|
||||
import { ImageIconBase, IconBaseProps } from "./IconBase";
|
||||
import { AppContext } from "../../context/revoltjs/RevoltClient";
|
||||
|
||||
@@ -21,7 +21,7 @@ export default function ChannelIcon(props: Props & Omit<JSX.HTMLAttributes<HTMLI
|
||||
if (isServerChannel) {
|
||||
if (target?.channel_type === 'VoiceChannel') {
|
||||
return (
|
||||
<Volume2 size={size} />
|
||||
<VolumeFull size={size} />
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
|
||||
@@ -2,7 +2,7 @@ import Header from "../ui/Header";
|
||||
import styled from "styled-components";
|
||||
import { Link } from "react-router-dom";
|
||||
import IconButton from "../ui/IconButton";
|
||||
import { Settings } from "@styled-icons/feather";
|
||||
import { Cog } from "@styled-icons/boxicons-solid";
|
||||
import { Server } from "revolt.js/dist/api/objects";
|
||||
import { ServerPermission } from "revolt.js/dist/api/permissions";
|
||||
import { HookContext, useServerPermission } from "../../context/revoltjs/hooks";
|
||||
@@ -30,7 +30,7 @@ export default function ServerHeader({ server, ctx }: Props) {
|
||||
{ (permissions & ServerPermission.ManageServer) > 0 && <div className="actions">
|
||||
<Link to={`/server/${server._id}/settings`}>
|
||||
<IconButton>
|
||||
<Settings size={24} />
|
||||
<Cog size={24} />
|
||||
</IconButton>
|
||||
</Link>
|
||||
</div> }
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Channel } from "revolt.js";
|
||||
import styled from "styled-components";
|
||||
import { defer } from "../../../lib/defer";
|
||||
import IconButton from "../../ui/IconButton";
|
||||
import { Send, X } from '@styled-icons/feather';
|
||||
import { Send, X } from '@styled-icons/boxicons-regular';
|
||||
import { debounce } from "../../../lib/debounce";
|
||||
import Axios, { CancelTokenSource } from "axios";
|
||||
import { useTranslation } from "../../../lib/i18n";
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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, ' ')} />
|
||||
|
||||
@@ -3,7 +3,7 @@ import styled from "styled-components";
|
||||
import { CAN_UPLOAD_AT_ONCE, UploadState } from "../MessageBox";
|
||||
import { useEffect, useState } from 'preact/hooks';
|
||||
import { determineFileSize } from '../../../../lib/fileSize';
|
||||
import { XCircle, Plus, Share, X, FileText } from "@styled-icons/feather";
|
||||
import { XCircle, Plus, Share, X, File } from "@styled-icons/boxicons-regular";
|
||||
|
||||
interface Props {
|
||||
state: UploadState,
|
||||
@@ -133,7 +133,7 @@ function FileEntry({ file, remove, index }: { file: File, remove?: () => void, i
|
||||
<Entry className={index >= CAN_UPLOAD_AT_ONCE ? 'fade' : ''}>
|
||||
<PreviewBox onClick={remove}>
|
||||
<EmptyEntry className="icon">
|
||||
<FileText size={36} />
|
||||
<File size={36} />
|
||||
</EmptyEntry>
|
||||
<div class="overlay"><XCircle size={36} /></div>
|
||||
</PreviewBox>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Text } from "preact-i18n";
|
||||
import styled from "styled-components";
|
||||
import { ArrowDown } from "@styled-icons/feather";
|
||||
import { DownArrow } from "@styled-icons/boxicons-regular";
|
||||
import { SingletonMessageRenderer, useRenderState } from "../../../../lib/renderer/Singleton";
|
||||
|
||||
const Bar = styled.div`
|
||||
@@ -46,7 +46,7 @@ export default function JumpToBottom({ id }: { id: string }) {
|
||||
<Bar>
|
||||
<div onClick={() => SingletonMessageRenderer.jumpToBottom(id, true)}>
|
||||
<div><Text id="app.main.channel.misc.viewing_old" /></div>
|
||||
<div><Text id="app.main.channel.misc.jump_present" /> <ArrowDown size={18} strokeWidth={2}/></div>
|
||||
<div><Text id="app.main.channel.misc.jump_present" /> <DownArrow size={18}/></div>
|
||||
</div>
|
||||
</Bar>
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Reply } from "../../../../redux/reducers/queue";
|
||||
import { useUsers } from "../../../../context/revoltjs/hooks";
|
||||
import { internalSubscribe } from "../../../../lib/eventEmitter";
|
||||
import { useRenderState } from "../../../../lib/renderer/Singleton";
|
||||
import { AtSign, CornerUpRight, File, XCircle } from "@styled-icons/feather";
|
||||
import { At, Reply as ReplyIcon, File, XCircle } from "@styled-icons/boxicons-regular";
|
||||
|
||||
interface Props {
|
||||
channel: string,
|
||||
@@ -71,7 +71,7 @@ export default function ReplyBar({ channel, replies, setReplies }: Props) {
|
||||
return (
|
||||
<Base key={reply.id}>
|
||||
<ReplyBase preview>
|
||||
<CornerUpRight size={22} />
|
||||
<ReplyIcon size={22} />
|
||||
<UserShort user={user} size={16} />
|
||||
{ message.attachments && message.attachments.length > 0 && <File size={16} /> }
|
||||
<Markdown disallowBigEmoji content={(message.content as string).replace(/\n/g, ' ')} />
|
||||
@@ -79,7 +79,7 @@ export default function ReplyBar({ channel, replies, setReplies }: Props) {
|
||||
<span class="actions">
|
||||
<IconButton onClick={() => setReplies(replies.map((_, i) => i === index ? { ..._, mention: !_.mention } : _))}>
|
||||
<span class="toggle">
|
||||
<AtSign size={16} /> { reply.mention ? 'ON' : 'OFF' }
|
||||
<At size={16} /> { reply.mention ? 'ON' : 'OFF' }
|
||||
</span>
|
||||
</IconButton>
|
||||
<IconButton onClick={() => setReplies(replies.filter((_, i) => i !== index))}>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import styles from './Embed.module.scss';
|
||||
import IconButton from '../../../ui/IconButton';
|
||||
import { ExternalLink } from '@styled-icons/feather';
|
||||
import { LinkExternal } from '@styled-icons/boxicons-regular';
|
||||
import { EmbedImage } from "revolt.js/dist/api/objects";
|
||||
|
||||
interface Props {
|
||||
@@ -18,7 +18,7 @@ export default function EmbedMediaActions({ embed }: Props) {
|
||||
</div>
|
||||
<a href={embed.url} target="_blank">
|
||||
<IconButton>
|
||||
<ExternalLink size={24} />
|
||||
<LinkExternal size={24} />
|
||||
</IconButton>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@ import styled from "styled-components";
|
||||
import { Localizer } from 'preact-i18n';
|
||||
import { Link } from "react-router-dom";
|
||||
import IconButton from "../../ui/IconButton";
|
||||
import { Settings } from "@styled-icons/feather";
|
||||
import { Cog } from "@styled-icons/boxicons-solid";
|
||||
import { openContextMenu } from "preact-context-menu";
|
||||
import { isTouchscreenDevice } from "../../../lib/isTouchscreenDevice";
|
||||
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
||||
@@ -76,7 +76,7 @@ export default function UserHeader({ user }: Props) {
|
||||
{ !isTouchscreenDevice && <div className="actions">
|
||||
<Link to="/settings">
|
||||
<IconButton>
|
||||
<Settings size={24} />
|
||||
<Cog size={24} />
|
||||
</IconButton>
|
||||
</Link>
|
||||
</div> }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { User } from "revolt.js";
|
||||
import { useContext } from "preact/hooks";
|
||||
import { MicOff } from "@styled-icons/feather";
|
||||
import { MicrophoneOff } from "@styled-icons/boxicons-regular";
|
||||
import styled, { css } from "styled-components";
|
||||
import { Users } from "revolt.js/dist/api/objects";
|
||||
import { ThemeContext } from "../../../context/Theme";
|
||||
@@ -83,7 +83,7 @@ export default function UserIcon(props: Props & Omit<JSX.SVGAttributes<SVGSVGEle
|
||||
width="10"
|
||||
height="10">
|
||||
<VoiceIndicator status={props.voice}>
|
||||
{props.voice === "muted" && <MicOff size={6} />}
|
||||
{props.voice === "muted" && <MicrophoneOff size={6} />}
|
||||
</VoiceIndicator>
|
||||
</foreignObject>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user