Skip to content

Commit 2b2e079

Browse files
committed
Add a few custom icons, tweak colors for contrast/uniformity
1 parent f20f832 commit 2b2e079

16 files changed

Lines changed: 10804 additions & 6117 deletions

package-lock.json

Lines changed: 10531 additions & 6105 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"react-devtools": "npx react-devtools"
1616
},
1717
"devDependencies": {
18+
"@svgr/webpack": "^8.1.0",
1819
"@tauri-apps/cli": "^1.4.0",
1920
"@types/lodash-es": "^4.17.8",
2021
"@types/luxon": "^3.3.1",

src-svg/active.svg

Lines changed: 47 additions & 0 deletions
Loading

src-svg/fontsize.svg

Lines changed: 75 additions & 0 deletions
Loading

src-svg/paused.svg

Lines changed: 57 additions & 0 deletions
Loading

src-svg/priority.svg

Lines changed: 57 additions & 0 deletions
Loading

src/components/miscbuttons.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import type { MantineNumberSize } from "@mantine/core";
2020
import { ActionIcon, useMantineColorScheme } from "@mantine/core";
2121
import * as Icon from "react-bootstrap-icons";
22+
import FontSizeIcon from "svg/icons/fontsize.svg";
2223
import React from "react";
2324
import { VersionModal } from "components/modals/version";
2425
import { useDisclosure, useHotkeys } from "@mantine/hooks";
@@ -81,7 +82,7 @@ export function FontSizeToggle() {
8182
title={`Toggle font size (${modKeyString()} + =)`}
8283
my="auto"
8384
>
84-
<Icon.Fonts size="1.1rem" />
85+
<FontSizeIcon width="1.1rem" height="1.1rem" fill="currentColor" />
8586
</ActionIcon>
8687
);
8788
}

src/components/modals/version.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function VersionModal({ opened, close }: ModalState) {
6262
</Text>
6363
<Divider px="sm" my="xl" />
6464
<Flex gap="md" align="center">
65-
<img src={AppLogo} />
65+
<AppLogo style={{ flexShrink: 0 }} />
6666
<Grid>
6767
<Grid.Col span={4}>Version</Grid.Col>
6868
<Grid.Col span={8}>{appVersion.gitVersion}</Grid.Col>
@@ -80,8 +80,8 @@ export function VersionModal({ opened, close }: ModalState) {
8080
powered by
8181
</Text>
8282
<Flex justify="center">
83-
<Anchor href="https://react.dev/" target="_blank" rel="noreferrer"><img src={ReactLogo} /></Anchor>
84-
<Anchor href="https://tauri.app/" target="_blank" rel="noreferrer"><img src={TauriLogo} /></Anchor>
83+
<Anchor href="https://react.dev/" target="_blank" rel="noreferrer"><ReactLogo /></Anchor>
84+
<Anchor href="https://tauri.app/" target="_blank" rel="noreferrer"><TauriLogo /></Anchor>
8585
</Flex>
8686
</HkModal>
8787
);

src/components/statusicons.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import { useMantineTheme } from "@mantine/core";
2020
import React from "react";
2121
import * as Icon from "react-bootstrap-icons";
2222
import { Status } from "rpc/transmission";
23+
import ActiveIcon from "svg/icons/active.svg";
24+
import PausedIcon from "svg/icons/paused.svg";
2325

2426
export function All() {
2527
const theme = useMantineTheme();
@@ -38,7 +40,7 @@ export function Completed() {
3840

3941
export function Active() {
4042
const theme = useMantineTheme();
41-
return <Icon.Activity size="1rem" fill={theme.colors.red[6]} />;
43+
return <ActiveIcon width="1rem" height="1rem" fill={theme.colors.red[6]} />;
4244
}
4345

4446
export function Inactive() {
@@ -48,12 +50,12 @@ export function Inactive() {
4850

4951
export function Stopped() {
5052
const theme = useMantineTheme();
51-
return <Icon.PauseBtnFill size="1rem" fill={theme.colors.yellow[6]} />;
53+
return <PausedIcon width="1rem" height="1rem" fill={theme.colors.yellow[6]} />;
5254
}
5355

5456
export function Error() {
5557
const theme = useMantineTheme();
56-
return <Icon.XSquareFill size="1rem" fill={theme.colors.red[9]} />;
58+
return <Icon.XSquareFill size="1rem" fill={theme.colors.red[6]} />;
5759
}
5860

5961
export function Waiting() {

src/components/toolbar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { ActionIcon, Button, Flex, Kbd, Menu, TextInput, useMantineTheme } from
2121
import debounce from "lodash-es/debounce";
2222
import React, { forwardRef, memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
2323
import * as Icon from "react-bootstrap-icons";
24+
import PriorityIcon from "svg/icons/priority.svg";
2425
import type { PriorityNumberType } from "rpc/transmission";
2526
import { BandwidthPriority } from "rpc/transmission";
2627
import { useTorrentAction, useMutateSession, useMutateTorrent } from "queries";
@@ -268,7 +269,8 @@ function Toolbar(props: ToolbarProps) {
268269
<Menu shadow="md" width="10rem" withinPortal middlewares={{ shift: true, flip: false }}>
269270
<Menu.Target>
270271
<ToolbarButton title="Set priority">
271-
<Icon.ExclamationCircleFill size="1.5rem" color={theme.colors.yellow[4]} />
272+
<PriorityIcon width="1.5rem" height="1.5rem"
273+
fill={theme.colors.yellow[theme.colorScheme === "dark" ? 4 : 6]} />
272274
</ToolbarButton>
273275
</Menu.Target>
274276

0 commit comments

Comments
 (0)