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

@@ -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 (

View File

@@ -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> }

View File

@@ -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";

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, ' ')} />

View File

@@ -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>

View File

@@ -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>
)

View File

@@ -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))}>

View File

@@ -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>

View File

@@ -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> }

View File

@@ -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>
)}

View File

@@ -4,7 +4,7 @@ import styled, { css } from "styled-components";
import { useSelf } from "../../context/revoltjs/hooks";
import { useHistory, useLocation } from "react-router";
import ConditionalLink from "../../lib/ConditionalLink";
import { MessageCircle, Users } from "@styled-icons/feather";
import { MessageRounded, Group } from "@styled-icons/boxicons-regular";
const NavigationBase = styled.div`
z-index: 10;
@@ -50,13 +50,13 @@ export default function BottomNavigation() {
}
}
}}>
<MessageCircle size={26} />
<MessageRounded size={26} />
</IconButton>
</Button>
<Button active={friendsActive}>
<ConditionalLink active={friendsActive} to="/friends">
<IconButton>
<Users size={26} />
<Group size={26} />
</IconButton>
</ConditionalLink>
</Button>

View File

@@ -3,7 +3,7 @@ import styles from "./Item.module.scss";
import Tooltip from '../../common/Tooltip';
import IconButton from '../../ui/IconButton';
import { Localizer, Text } from "preact-i18n";
import { X, Zap } from "@styled-icons/feather";
import { X, Crown } from "@styled-icons/boxicons-regular";
import { Children } from "../../../types/Preact";
import UserIcon from '../../common/user/UserIcon';
import ChannelIcon from '../../common/ChannelIcon';
@@ -65,7 +65,7 @@ export function UserButton({ active, alert, alertCount, user, context, channel }
<Text id="app.main.groups.owner" />
}
>
<Zap size={20} />
<Crown size={20} />
</Tooltip>
</Localizer>
)}

View File

@@ -1,6 +1,6 @@
import { Localizer, Text } from "preact-i18n";
import { useContext, useEffect } from "preact/hooks";
import { Home, Users, Tool, Save } from "@styled-icons/feather";
import { Home, Group, Wrench, Save } from "@styled-icons/boxicons-regular";
import Category from '../../ui/Category';
import PaintCounter from "../../../lib/PaintCounter";
@@ -83,7 +83,7 @@ function HomeSidebar(props: Props) {
) !== "undefined" ? 'unread' : undefined
}
>
<Users size={20} />
<Group size={20} />
<span><Text id="app.navigation.tabs.friends" /></span>
</ButtonItem>
</ConditionalLink>
@@ -98,7 +98,7 @@ function HomeSidebar(props: Props) {
{import.meta.env.DEV && (
<Link to="/dev">
<ButtonItem active={pathname === "/dev"}>
<Tool size={20} />
<Wrench size={20} />
<span><Text id="app.navigation.tabs.dev" /></span>
</ButtonItem>
</Link>

View File

@@ -4,7 +4,7 @@ import { mapChannelWithUnread } from "./common";
import styled, { css } from "styled-components";
import ServerIcon from "../../common/ServerIcon";
import { Children } from "../../../types/Preact";
import { PlusCircle } from "@styled-icons/feather";
import { Plus } from "@styled-icons/boxicons-regular";
import PaintCounter from "../../../lib/PaintCounter";
import { attachContextMenu } from 'preact-context-menu';
import { connectState } from "../../../redux/connector";
@@ -51,7 +51,7 @@ function Icon({ children, unread, size }: { children: Children, unread?: 'mentio
}
const ServersBase = styled.div`
width: 52px;
width: 72px;
height: 100%;
display: flex;
flex-direction: column;
@@ -183,7 +183,7 @@ export function ServerListSidebar({ unreads, lastOpened }: Props) {
})
}
<IconButton onClick={() => openScreen({ id: 'special_input', type: 'create_server' })}>
<PlusCircle size={36} />
<Plus size={36} />
</IconButton>
<PaintCounter small />
</ServerList>

View File

@@ -1,6 +1,6 @@
import styled, { css } from "styled-components";
import { Children } from "../../types/Preact";
import { Plus } from "@styled-icons/feather";
import { Plus } from "@styled-icons/boxicons-regular";
const CategoryBase = styled.div<Pick<Props, 'variant'>>`
font-size: 12px;

View File

@@ -1,4 +1,4 @@
import { Check } from "@styled-icons/feather";
import { Check } from "@styled-icons/boxicons-regular";
import { Children } from "../../types/Preact";
import styled, { css } from "styled-components";
@@ -59,7 +59,6 @@ const Checkmark = styled.div<{ checked: boolean }>`
svg {
color: var(--secondary-background);
stroke-width: 2;
}
${(props) =>

View File

@@ -1,7 +1,6 @@
import { useRef } from "preact/hooks";
import { Check } from "@styled-icons/feather";
import { Check, Pencil } from "@styled-icons/boxicons-regular";
import styled, { css } from "styled-components";
import { Pencil } from "@styled-icons/bootstrap";
interface Props {
value: string;
@@ -68,7 +67,7 @@ const Swatch = styled.div<{ type: "small" | "large"; colour: string }>`
height: 30px;
svg {
stroke-width: 2;
/*stroke-width: 2;*/
}
`
: css`
@@ -118,7 +117,7 @@ export default function ColourSwatches({ value, onChange }: Props) {
onClick={() => onChange(swatch)}
>
{swatch === value && (
<Check size={18} strokeWidth={2} />
<Check size={18} />
)}
</Swatch>
))}

View File

@@ -15,7 +15,7 @@ export default styled.div<Props>`
fill: ${normal};
color: ${normal};
stroke: ${normal};
/*stroke: ${normal};*/
a {
color: ${normal};
@@ -24,7 +24,7 @@ export default styled.div<Props>`
&:hover {
fill: ${hover};
color: ${hover};
stroke: ${hover};
/*stroke: ${hover};*/
a {
color: ${hover};

View File

@@ -1,6 +1,6 @@
import { Children } from "../../types/Preact";
import styled, { css } from "styled-components";
import { CircleFill } from "@styled-icons/bootstrap";
import { Circle } from "@styled-icons/boxicons-regular";
interface Props {
children: Children;
@@ -48,7 +48,7 @@ const RadioBase = styled.label<BaseProps>`
svg {
color: var(--foreground);
stroke-width: 2;
/*stroke-width: 2;*/
}
}
@@ -95,7 +95,7 @@ export default function Radio(props: Props) {
}
>
<div>
<CircleFill size={12} />
<Circle size={12} />
</div>
<input type="radio" checked={props.checked} />
<span>

View File

@@ -1,5 +1,5 @@
import styled from "styled-components";
import { Info } from "@styled-icons/feather";
import { InfoCircle } from "@styled-icons/boxicons-regular";
import { Children } from "../../types/Preact";
export const TipBase = styled.div`
@@ -29,7 +29,7 @@ export const TipBase = styled.div`
export default function Tip(props: { children: Children }) {
return (
<TipBase>
<Info size={20} strokeWidth={2} />
<InfoCircle size={20} />
<span>{props.children}</span>
</TipBase>
);