diff --git a/index.html b/index.html index 1885d9e4..20826661 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,8 @@ - + + REVOLT diff --git a/package.json b/package.json index c639394e..6cc36500 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "version": "0.0.0", "scripts": { "dev": "vite", - "build": "rimraf build && tsc && vite build", + "build": "rimraf build && tsc --noEmit && vite build", "preview": "vite preview", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", "fmt": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'", diff --git a/public/assets/app_icon.png b/public/assets/app_icon.png deleted file mode 100644 index 8cc3feb7..00000000 Binary files a/public/assets/app_icon.png and /dev/null differ diff --git a/public/assets/favicon.ico b/public/assets/favicon.ico deleted file mode 100644 index 89850227..00000000 Binary files a/public/assets/favicon.ico and /dev/null differ diff --git a/public/assets/logo.svg b/public/assets/logo.svg deleted file mode 100644 index 3b99f7fa..00000000 --- a/public/assets/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/inbound.mp3 b/public/assets/sounds/inbound.mp3 similarity index 100% rename from public/assets/inbound.mp3 rename to public/assets/sounds/inbound.mp3 diff --git a/public/assets/inbound.ogg b/public/assets/sounds/inbound.ogg similarity index 100% rename from public/assets/inbound.ogg rename to public/assets/sounds/inbound.ogg diff --git a/public/assets/outbound.mp3 b/public/assets/sounds/outbound.mp3 similarity index 100% rename from public/assets/outbound.mp3 rename to public/assets/sounds/outbound.mp3 diff --git a/public/assets/outbound.ogg b/public/assets/sounds/outbound.ogg similarity index 100% rename from public/assets/outbound.ogg rename to public/assets/sounds/outbound.ogg diff --git a/public/assets/emojis.ts b/src/assets/emojis.ts similarity index 100% rename from public/assets/emojis.ts rename to src/assets/emojis.ts diff --git a/src/assets/logo.svg b/src/assets/logo.svg new file mode 100644 index 00000000..336b23aa --- /dev/null +++ b/src/assets/logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/assets/logo_round.png b/src/assets/logo_round.png new file mode 100644 index 00000000..acc86aa3 Binary files /dev/null and b/src/assets/logo_round.png differ diff --git a/public/assets/wide.svg b/src/assets/wide.svg similarity index 100% rename from public/assets/wide.svg rename to src/assets/wide.svg diff --git a/src/components/common/ChannelIcon.tsx b/src/components/common/ChannelIcon.tsx index 2611edb6..db8ee884 100644 --- a/src/components/common/ChannelIcon.tsx +++ b/src/components/common/ChannelIcon.tsx @@ -8,7 +8,8 @@ interface Props extends IconBaseProps, keyof Props>) { const client = useContext(AppContext); diff --git a/src/components/common/UserIcon.tsx b/src/components/common/UserIcon.tsx index 7aa5e379..a78416d8 100644 --- a/src/components/common/UserIcon.tsx +++ b/src/components/common/UserIcon.tsx @@ -47,7 +47,8 @@ const VoiceIndicator = styled.div<{ status: VoiceStatus }>` ` } `; -const fallback = '/assets/user.png'; +import fallback from './assets/user.png'; + export default function UserIcon(props: Props & Omit, keyof Props>) { const client = useContext(AppContext); diff --git a/public/assets/group.png b/src/components/common/assets/group.png similarity index 100% rename from public/assets/group.png rename to src/components/common/assets/group.png diff --git a/public/assets/user.png b/src/components/common/assets/user.png similarity index 100% rename from public/assets/user.png rename to src/components/common/assets/user.png diff --git a/public/assets/images/placeholder.svg b/src/components/navigation/items/placeholder.svg similarity index 100% rename from public/assets/images/placeholder.svg rename to src/components/navigation/items/placeholder.svg diff --git a/src/components/navigation/left/ServerListSidebar.tsx b/src/components/navigation/left/ServerListSidebar.tsx index f64e4fef..798675c3 100644 --- a/src/components/navigation/left/ServerListSidebar.tsx +++ b/src/components/navigation/left/ServerListSidebar.tsx @@ -1,15 +1,17 @@ +import LineDivider from "../../ui/LineDivider"; +import { mapChannelWithUnread } from "./common"; +import styled, { css } from "styled-components"; +import ServerIcon from "../../common/ServerIcon"; +import { Children } from "../../../types/Preact"; +import PaintCounter from "../../../lib/PaintCounter"; +import { attachContextMenu } from 'preact-context-menu'; +import { connectState } from "../../../redux/connector"; +import { Unreads } from "../../../redux/reducers/unreads"; import { Channel, Servers } from "revolt.js/dist/api/objects"; import { Link, useLocation, useParams } from "react-router-dom"; import { useChannels, useForceUpdate, useServers } from "../../../context/revoltjs/hooks"; -import { mapChannelWithUnread } from "./common"; -import { Unreads } from "../../../redux/reducers/unreads"; -import { connectState } from "../../../redux/connector"; -import styled, { css } from "styled-components"; -import { Children } from "../../../types/Preact"; -import LineDivider from "../../ui/LineDivider"; -import ServerIcon from "../../common/ServerIcon"; -import PaintCounter from "../../../lib/PaintCounter"; -import { attachContextMenu } from 'preact-context-menu'; + +import logoSVG from '../../../assets/logo.svg'; function Icon({ children, unread, size }: { children: Children, unread?: 'mention' | 'unread', size: number }) { return ( @@ -146,7 +148,7 @@ export function ServerListSidebar({ unreads }: Props) { - + diff --git a/src/context/intermediate/modals/Onboarding.tsx b/src/context/intermediate/modals/Onboarding.tsx index 17fc0fd6..032aa5f3 100644 --- a/src/context/intermediate/modals/Onboarding.tsx +++ b/src/context/intermediate/modals/Onboarding.tsx @@ -7,6 +7,8 @@ import Button from "../../../components/ui/Button"; import FormField from "../../../pages/login/FormField"; import Preloader from "../../../components/ui/Preloader"; +import wideSVG from '../../../assets/wide.svg'; + interface Props { onClose: () => void; callback: (username: string, loginAfterSuccess?: true) => Promise; @@ -32,7 +34,7 @@ export function OnboardingModal({ onClose, callback }: Props) {

- +

diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index 01371fc7..eaa763de 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -4,12 +4,14 @@ import { Link } from "react-router-dom"; import { Text } from "preact-i18n"; import Header from "../../components/ui/Header"; +import wideSVG from '../../assets/wide.svg'; + export default function Home() { return (

- +

  • diff --git a/public/assets/images/dark.svg b/src/pages/settings/assets/dark.svg similarity index 100% rename from public/assets/images/dark.svg rename to src/pages/settings/assets/dark.svg diff --git a/public/assets/images/light.svg b/src/pages/settings/assets/light.svg similarity index 100% rename from public/assets/images/light.svg rename to src/pages/settings/assets/light.svg diff --git a/public/assets/images/mutant_emoji.svg b/src/pages/settings/assets/mutant_emoji.svg similarity index 100% rename from public/assets/images/mutant_emoji.svg rename to src/pages/settings/assets/mutant_emoji.svg diff --git a/public/assets/images/noto_emoji.svg b/src/pages/settings/assets/noto_emoji.svg similarity index 100% rename from public/assets/images/noto_emoji.svg rename to src/pages/settings/assets/noto_emoji.svg diff --git a/public/assets/images/openmoji_emoji.svg b/src/pages/settings/assets/openmoji_emoji.svg similarity index 100% rename from public/assets/images/openmoji_emoji.svg rename to src/pages/settings/assets/openmoji_emoji.svg diff --git a/public/assets/images/twemoji_emoji.svg b/src/pages/settings/assets/twemoji_emoji.svg similarity index 100% rename from public/assets/images/twemoji_emoji.svg rename to src/pages/settings/assets/twemoji_emoji.svg diff --git a/src/pages/settings/panes/Appearance.tsx b/src/pages/settings/panes/Appearance.tsx index 867d6f0e..a7466143 100644 --- a/src/pages/settings/panes/Appearance.tsx +++ b/src/pages/settings/panes/Appearance.tsx @@ -15,6 +15,14 @@ import { useIntermediate } from "../../../context/intermediate/Intermediate"; // @ts-ignore import pSBC from 'shade-blend-color'; +import lightSVG from '../assets/light.svg'; +import darkSVG from '../assets/dark.svg'; + +import mutantSVG from '../assets/mutant_emoji.svg'; +import notoSVG from '../assets/noto_emoji.svg'; +import openmojiSVG from '../assets/openmoji_emoji.svg'; +import twemojiSVG from '../assets/twemoji_emoji.svg'; + interface Props { settings: Settings; } @@ -72,7 +80,7 @@ export function Component(props: Props & WithDispatcher) {
    selected !== "light" && @@ -84,7 +92,7 @@ export function Component(props: Props & WithDispatcher) {
    selected !== "dark" && setTheme({ preset: "dark" }) @@ -131,7 +139,7 @@ export function Component(props: Props & WithDispatcher) {
    setEmojiPack('mutant')} data-active={emojiPack === 'mutant'}> - +

    Mutant Remix (by Revolt)

    @@ -139,7 +147,7 @@ export function Component(props: Props & WithDispatcher) {
    setEmojiPack('twemoji')} data-active={emojiPack === 'twemoji'}> - +

    Twemoji

    @@ -149,7 +157,7 @@ export function Component(props: Props & WithDispatcher) {
    setEmojiPack('openmoji')} data-active={emojiPack === 'openmoji'}> - +

    Openmoji

@@ -157,7 +165,7 @@ export function Component(props: Props & WithDispatcher) {
setEmojiPack('noto')} data-active={emojiPack === 'noto'}> - +

Noto Emoji