diff --git a/src/components/common/AgeGate.tsx b/src/components/common/AgeGate.tsx index fc0fbdfa..a7bea21e 100644 --- a/src/components/common/AgeGate.tsx +++ b/src/components/common/AgeGate.tsx @@ -11,8 +11,6 @@ import { Button, Checkbox } from "@revoltchat/ui"; import { useApplicationState } from "../../mobx/State"; import { SECTION_NSFW } from "../../mobx/stores/Layout"; -import { Children } from "../../types/Preact"; - const Base = styled.div` display: flex; flex-grow: 1; diff --git a/src/components/common/CollapsibleSection.tsx b/src/components/common/CollapsibleSection.tsx index 21b9c12c..4b031da7 100644 --- a/src/components/common/CollapsibleSection.tsx +++ b/src/components/common/CollapsibleSection.tsx @@ -4,8 +4,6 @@ import { Details } from "@revoltchat/ui"; import { useApplicationState } from "../../mobx/State"; -import { Children } from "../../types/Preact"; - interface Props { id: string; defaultValue: boolean; @@ -34,7 +32,7 @@ export default function CollapsibleSection({ } {...detailsProps}> -
+
{summary}
diff --git a/src/components/common/Emoji.tsx b/src/components/common/Emoji.tsx index 9be2e8fd..efd06b65 100644 --- a/src/components/common/Emoji.tsx +++ b/src/components/common/Emoji.tsx @@ -73,7 +73,7 @@ export default function Emoji({ } export function generateEmoji(emoji: string) { - return `${emoji}`; } diff --git a/src/components/common/Tooltip.tsx b/src/components/common/Tooltip.tsx index dae983c4..08860a02 100644 --- a/src/components/common/Tooltip.tsx +++ b/src/components/common/Tooltip.tsx @@ -3,8 +3,6 @@ import styled from "styled-components/macro"; import { Text } from "preact-i18n"; -import { Children } from "../../types/Preact"; - type Props = Omit & { children: Children; content: Children; diff --git a/src/components/common/UpdateIndicator.tsx b/src/components/common/UpdateIndicator.tsx index 6151897a..52ef1ebe 100644 --- a/src/components/common/UpdateIndicator.tsx +++ b/src/components/common/UpdateIndicator.tsx @@ -31,7 +31,7 @@ export default function UpdateIndicator({ style }: Props) { if (style === "titlebar") { return ( -
+
diff --git a/src/components/common/messaging/Message.tsx b/src/components/common/messaging/Message.tsx index 5962fce7..a29238a0 100644 --- a/src/components/common/messaging/Message.tsx +++ b/src/components/common/messaging/Message.tsx @@ -16,7 +16,6 @@ import { I18nError } from "../../../context/Locale"; import { useIntermediate } from "../../../context/intermediate/Intermediate"; import { useClient } from "../../../context/revoltjs/RevoltClient"; -import { Children } from "../../../types/Preact"; import Markdown from "../../markdown/Markdown"; import UserIcon from "../user/UserIcon"; import { Username } from "../user/UserShort"; diff --git a/src/components/common/messaging/attachments/Grid.tsx b/src/components/common/messaging/attachments/Grid.tsx index dfb252cd..e9ff4e88 100644 --- a/src/components/common/messaging/attachments/Grid.tsx +++ b/src/components/common/messaging/attachments/Grid.tsx @@ -2,8 +2,6 @@ import styled from "styled-components/macro"; import { Ref } from "preact"; -import { Children } from "../../../../types/Preact"; - const Grid = styled.div<{ width: number; height: number }>` --width: ${(props) => props.width}px; --height: ${(props) => props.height}px; diff --git a/src/components/common/messaging/bars/FilePreview.tsx b/src/components/common/messaging/bars/FilePreview.tsx index 5a6a4f46..0cfe4700 100644 --- a/src/components/common/messaging/bars/FilePreview.tsx +++ b/src/components/common/messaging/bars/FilePreview.tsx @@ -149,12 +149,12 @@ function FileEntry({ -
+
- {file.name} - {determineFileSize(file.size)} + {file.name} + {determineFileSize(file.size)} ); @@ -169,13 +169,18 @@ function FileEntry({ return ( = CAN_UPLOAD_AT_ONCE ? "fade" : ""}> - {file.name} -
+ {file.name} +
- {file.name} - {determineFileSize(file.size)} + {file.name} + {determineFileSize(file.size)} ); } diff --git a/src/components/common/messaging/bars/ReplyBar.tsx b/src/components/common/messaging/bars/ReplyBar.tsx index 05eefa1c..c2d08e20 100644 --- a/src/components/common/messaging/bars/ReplyBar.tsx +++ b/src/components/common/messaging/bars/ReplyBar.tsx @@ -152,11 +152,11 @@ export default observer(({ channel, replies, setReplies }: Props) => { return ( -
+
-
-
+
+
{ masquerade={message.masquerade!} />
-
+
{message.attachments && ( <> @@ -196,7 +196,7 @@ export default observer(({ channel, replies, setReplies }: Props) => {
- + {message.author_id !== client.user!._id && ( { @@ -225,7 +225,7 @@ export default observer(({ channel, replies, setReplies }: Props) => { content={ }> - + diff --git a/src/components/common/user/UserHover.tsx b/src/components/common/user/UserHover.tsx index d04536a3..37909054 100644 --- a/src/components/common/user/UserHover.tsx +++ b/src/components/common/user/UserHover.tsx @@ -1,7 +1,6 @@ import { User } from "revolt.js"; import styled from "styled-components/macro"; -import { Children } from "../../../types/Preact"; import Tooltip from "../Tooltip"; import { Username } from "./UserShort"; import UserStatus from "./UserStatus"; diff --git a/src/components/common/user/UserIcon.tsx b/src/components/common/user/UserIcon.tsx index 46fe1bc3..27c8cdb1 100644 --- a/src/components/common/user/UserIcon.tsx +++ b/src/components/common/user/UserIcon.tsx @@ -114,7 +114,7 @@ export default observer( y="0" width="32" height="32" - class="icon" + className="icon" mask={mask ?? (status ? "url(#user)" : undefined)}> {} diff --git a/src/components/markdown/Renderer.tsx b/src/components/markdown/Renderer.tsx index 0c9f75f7..735a5ff5 100644 --- a/src/components/markdown/Renderer.tsx +++ b/src/components/markdown/Renderer.tsx @@ -17,9 +17,8 @@ import { dayjs } from "../../context/Locale"; import { useIntermediate } from "../../context/intermediate/Intermediate"; import { AppContext } from "../../context/revoltjs/RevoltClient"; -import { generateEmoji } from "../common/Emoji"; - import { emojiDictionary } from "../../assets/emojis"; +import { generateEmoji } from "../common/Emoji"; import { MarkdownProps } from "./Markdown"; import Prism from "./prism"; @@ -49,10 +48,10 @@ export const md: MarkdownIt = MarkdownIt({ const v = Prism.languages[lang]; if (v) { const out = Prism.highlight(str, v, lang); - return `
${lang}
${out}
`; + return `
${lang}
${out}
`; } - return `
${md.utils.escapeHtml(
+        return `
${md.utils.escapeHtml(
             str,
         )}
`; }, diff --git a/src/components/native/Titlebar.tsx b/src/components/native/Titlebar.tsx index 665e074d..5b7102e3 100644 --- a/src/components/native/Titlebar.tsx +++ b/src/components/native/Titlebar.tsx @@ -98,7 +98,7 @@ const TitlebarBase = styled.div` export function Titlebar(props: Props) { return ( -
+
@@ -114,7 +114,7 @@ export function Titlebar(props: Props) { )}
- {/*
+ {/*
@@ -130,9 +130,9 @@ export function Titlebar(props: Props) {
*/} -
+
-
+
-
+
e.key === "Enter" && search()} onChange={(e) => setQuery(e.currentTarget.value)} /> -
+
{["Latest", "Oldest", "Relevance"].map((key) => (
writeClipboard(JSON.stringify(theme))}> }> {" "} diff --git a/src/components/settings/roles/PermissionSelect.tsx b/src/components/settings/roles/PermissionSelect.tsx index 5f921132..0a8b9742 100644 --- a/src/components/settings/roles/PermissionSelect.tsx +++ b/src/components/settings/roles/PermissionSelect.tsx @@ -117,12 +117,12 @@ export function PermissionSelect({ return ( - + {id} {disabled && } - + diff --git a/src/components/ui/Header.tsx b/src/components/ui/Header.tsx index 860a294d..f91b63a1 100644 --- a/src/components/ui/Header.tsx +++ b/src/components/ui/Header.tsx @@ -14,8 +14,6 @@ import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice"; import { useApplicationState } from "../../mobx/State"; import { SIDEBAR_CHANNELS } from "../../mobx/stores/Layout"; -import { Children } from "../../types/Preact"; - interface Props { topBorder?: boolean; bottomBorder?: boolean; diff --git a/src/context/index.tsx b/src/context/index.tsx index 277f0126..8d4595cd 100644 --- a/src/context/index.tsx +++ b/src/context/index.tsx @@ -13,7 +13,6 @@ import { import { hydrateState } from "../mobx/State"; -import { Children } from "../types/Preact"; import Locale from "./Locale"; import Theme from "./Theme"; import Intermediate from "./intermediate/Intermediate"; diff --git a/src/context/intermediate/Intermediate.tsx b/src/context/intermediate/Intermediate.tsx index 94d86408..9a1ac4d1 100644 --- a/src/context/intermediate/Intermediate.tsx +++ b/src/context/intermediate/Intermediate.tsx @@ -12,7 +12,6 @@ import { determineLink } from "../../lib/links"; import { useApplicationState } from "../../mobx/State"; -import { Children } from "../../types/Preact"; import Modals from "./Modals"; export type Screen = diff --git a/src/context/intermediate/modals/Input.tsx b/src/context/intermediate/modals/Input.tsx index f84bd03d..1e70b2ac 100644 --- a/src/context/intermediate/modals/Input.tsx +++ b/src/context/intermediate/modals/Input.tsx @@ -6,7 +6,6 @@ import { useContext, useState } from "preact/hooks"; import { Category, InputBox, Modal } from "@revoltchat/ui"; -import { Children } from "../../../types/Preact"; import { I18nError } from "../../Locale"; import { AppContext } from "../../revoltjs/RevoltClient"; import { takeError } from "../../revoltjs/util"; diff --git a/src/context/intermediate/modals/Prompt.tsx b/src/context/intermediate/modals/Prompt.tsx index a01a9f8a..b3d15395 100644 --- a/src/context/intermediate/modals/Prompt.tsx +++ b/src/context/intermediate/modals/Prompt.tsx @@ -14,7 +14,6 @@ import { TextReact } from "../../../lib/i18n"; import Message from "../../../components/common/messaging/Message"; import UserIcon from "../../../components/common/user/UserIcon"; -import { Children } from "../../../types/Preact"; import { I18nError } from "../../Locale"; import { AppContext } from "../../revoltjs/RevoltClient"; import { takeError } from "../../revoltjs/util"; diff --git a/src/context/revoltjs/CheckAuth.tsx b/src/context/revoltjs/CheckAuth.tsx index 3d76ae92..be5c8eb8 100644 --- a/src/context/revoltjs/CheckAuth.tsx +++ b/src/context/revoltjs/CheckAuth.tsx @@ -2,7 +2,6 @@ import { Redirect } from "react-router-dom"; import { useApplicationState } from "../../mobx/State"; -import { Children } from "../../types/Preact"; import { useClient } from "./RevoltClient"; interface Props { diff --git a/src/context/revoltjs/RequiresOnline.tsx b/src/context/revoltjs/RequiresOnline.tsx index 4400bcc6..4835bd42 100644 --- a/src/context/revoltjs/RequiresOnline.tsx +++ b/src/context/revoltjs/RequiresOnline.tsx @@ -6,7 +6,6 @@ import { useContext } from "preact/hooks"; import { Preloader } from "@revoltchat/ui"; -import { Children } from "../../types/Preact"; import { ClientStatus, StatusContext } from "./RevoltClient"; interface Props { diff --git a/src/context/revoltjs/RevoltClient.tsx b/src/context/revoltjs/RevoltClient.tsx index 37c29428..57b0a091 100644 --- a/src/context/revoltjs/RevoltClient.tsx +++ b/src/context/revoltjs/RevoltClient.tsx @@ -9,7 +9,6 @@ import { Preloader } from "@revoltchat/ui"; import { useApplicationState } from "../../mobx/State"; -import { Children } from "../../types/Preact"; import { useIntermediate } from "../intermediate/Intermediate"; import { registerEvents } from "./events"; import { takeError } from "./util"; diff --git a/src/context/revoltjs/util.tsx b/src/context/revoltjs/util.tsx index 878cc50e..e82713a4 100644 --- a/src/context/revoltjs/util.tsx +++ b/src/context/revoltjs/util.tsx @@ -2,8 +2,6 @@ import { Channel } from "revolt.js"; import { Text } from "preact-i18n"; -import { Children } from "../../types/Preact"; - // eslint-disable-next-line @typescript-eslint/no-explicit-any export function takeError(error: any): string { if (error.response) { diff --git a/src/lib/ContextMenus.tsx b/src/lib/ContextMenus.tsx index 43645bda..9f8dabf3 100644 --- a/src/lib/ContextMenus.tsx +++ b/src/lib/ContextMenus.tsx @@ -30,7 +30,6 @@ import CMNotifications from "./contextmenu/CMNotifications"; import Tooltip from "../components/common/Tooltip"; import UserStatus from "../components/common/user/UserStatus"; -import { Children } from "../types/Preact"; import { internalEmit } from "./eventEmitter"; import { getRenderer } from "./renderer/Singleton"; diff --git a/src/lib/ErrorBoundary.tsx b/src/lib/ErrorBoundary.tsx index 10942d54..f755b788 100644 --- a/src/lib/ErrorBoundary.tsx +++ b/src/lib/ErrorBoundary.tsx @@ -6,7 +6,6 @@ import styled from "styled-components/macro"; import { useEffect, useErrorBoundary, useState } from "preact/hooks"; import { GIT_REVISION } from "../revision"; -import { Children } from "../types/Preact"; const CrashContainer = styled.div` height: 100%; diff --git a/src/lib/FakeClient.tsx b/src/lib/FakeClient.tsx index d2523ef5..861ecec3 100644 --- a/src/lib/FakeClient.tsx +++ b/src/lib/FakeClient.tsx @@ -6,8 +6,6 @@ import { useApplicationState } from "../mobx/State"; import { AppContext } from "../context/revoltjs/RevoltClient"; -import { Children } from "../types/Preact"; - export default observer(({ children }: { children: Children }) => { const config = useApplicationState().config; const client = useMemo(() => config.createClient(), [config.get()]); diff --git a/src/lib/contextmenu/CMNotifications.tsx b/src/lib/contextmenu/CMNotifications.tsx index ec65b54d..72c4197d 100644 --- a/src/lib/contextmenu/CMNotifications.tsx +++ b/src/lib/contextmenu/CMNotifications.tsx @@ -20,8 +20,6 @@ import { LineDivider } from "@revoltchat/ui"; import { useApplicationState } from "../../mobx/State"; import { NotificationState } from "../../mobx/stores/NotificationOptions"; -import { Children } from "../../types/Preact"; - interface Action { key: string; type: "channel" | "server"; diff --git a/src/lib/i18n.tsx b/src/lib/i18n.tsx index 047e2bb7..41826d94 100644 --- a/src/lib/i18n.tsx +++ b/src/lib/i18n.tsx @@ -3,8 +3,6 @@ import { useContext } from "preact/hooks"; import { Dictionary } from "../context/Locale"; -import { Children } from "../types/Preact"; - interface Fields { [key: string]: Children; } diff --git a/src/pages/RevoltApp.tsx b/src/pages/RevoltApp.tsx index e88fe208..82711ef6 100644 --- a/src/pages/RevoltApp.tsx +++ b/src/pages/RevoltApp.tsx @@ -119,7 +119,7 @@ export default function App() { {statusBar && (
Partial outage: CDN
-
+
Updates
diff --git a/src/pages/channels/messaging/MessageRenderer.tsx b/src/pages/channels/messaging/MessageRenderer.tsx index 6195e29b..fd7aa7b9 100644 --- a/src/pages/channels/messaging/MessageRenderer.tsx +++ b/src/pages/channels/messaging/MessageRenderer.tsx @@ -24,7 +24,6 @@ import { useClient } from "../../../context/revoltjs/RevoltClient"; import Message from "../../../components/common/messaging/Message"; import { SystemMessage } from "../../../components/common/messaging/SystemMessage"; -import { Children } from "../../../types/Preact"; import ConversationStart from "./ConversationStart"; import MessageEditor from "./MessageEditor"; diff --git a/src/pages/friends/Friend.tsx b/src/pages/friends/Friend.tsx index fed35293..182ffdea 100644 --- a/src/pages/friends/Friend.tsx +++ b/src/pages/friends/Friend.tsx @@ -18,7 +18,6 @@ import { useIntermediate } from "../../context/intermediate/Intermediate"; import UserIcon from "../../components/common/user/UserIcon"; import UserStatus from "../../components/common/user/UserStatus"; -import { Children } from "../../types/Preact"; interface Props { user: User; diff --git a/src/pages/friends/Friends.tsx b/src/pages/friends/Friends.tsx index df5fa24c..335462f6 100644 --- a/src/pages/friends/Friends.tsx +++ b/src/pages/friends/Friends.tsx @@ -19,7 +19,6 @@ import CollapsibleSection from "../../components/common/CollapsibleSection"; import Tooltip from "../../components/common/Tooltip"; import UserIcon from "../../components/common/user/UserIcon"; import { PageHeader } from "../../components/ui/Header"; -import { Children } from "../../types/Preact"; import { Friend } from "./Friend"; export default observer(() => { @@ -201,7 +200,7 @@ export default observer(() => { sticky large summary={ -
+
— {list.length}
}> diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index 2a5e0da6..858161c8 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -77,9 +77,9 @@ export default observer(() => {
{seasonalTheme && ( -
+
{snowflakes.map((emoji, index) => ( -
+
{emoji}
))} diff --git a/src/pages/settings/GenericSettings.tsx b/src/pages/settings/GenericSettings.tsx index 1a56d159..f4f4fc34 100644 --- a/src/pages/settings/GenericSettings.tsx +++ b/src/pages/settings/GenericSettings.tsx @@ -14,7 +14,6 @@ import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice"; import { useApplicationState } from "../../mobx/State"; import ButtonItem from "../../components/navigation/items/ButtonItem"; -import { Children } from "../../types/Preact"; interface Props { pages: { diff --git a/src/pages/settings/panes/Audio.tsx b/src/pages/settings/panes/Audio.tsx index e0226cbb..093d83cd 100644 --- a/src/pages/settings/panes/Audio.tsx +++ b/src/pages/settings/panes/Audio.tsx @@ -93,7 +93,7 @@ export function Audio() { return ( <> -
+
{!permission && ( @@ -115,7 +115,7 @@ export function Audio() {

-
+
diff --git a/src/pages/settings/server/Bans.tsx b/src/pages/settings/server/Bans.tsx index ed458946..3896f6f6 100644 --- a/src/pages/settings/server/Bans.tsx +++ b/src/pages/settings/server/Bans.tsx @@ -38,8 +38,7 @@ const Inner = observer(({ ban, users, server, removeSelf }: InnerProps) => { onClick={() => { setDelete(true); server.unbanUser(ban._id.user).then(removeSelf); - }} - disabled={deleting}> + }}>
@@ -100,7 +99,7 @@ export const Bans = observer(({ server }: Props) => { - + diff --git a/src/pages/settings/server/Categories.tsx b/src/pages/settings/server/Categories.tsx index 9d73dd26..9af11841 100644 --- a/src/pages/settings/server/Categories.tsx +++ b/src/pages/settings/server/Categories.tsx @@ -292,7 +292,7 @@ export const Categories = observer(({ server }: Props) => { /> ))} -
+
setCategories([ @@ -369,7 +369,7 @@ function ListElement({ {(provided) => (
-
+
{editing ? ( @@ -422,7 +422,7 @@ function ListElement({ provided.innerRef }> -
+
{ onClick={() => { setDelete(true); server.client.deleteInvite(invite._id).then(removeSelf); - }} - disabled={deleting}> + }}>
diff --git a/src/pages/settings/server/Members.tsx b/src/pages/settings/server/Members.tsx index ff2f08b2..8b155b4c 100644 --- a/src/pages/settings/server/Members.tsx +++ b/src/pages/settings/server/Members.tsx @@ -61,7 +61,7 @@ const Inner = observer(({ member }: InnerProps) => { title={ {role.name} diff --git a/src/pages/settings/server/Overview.tsx b/src/pages/settings/server/Overview.tsx index 4a333bab..c04f1c06 100644 --- a/src/pages/settings/server/Overview.tsx +++ b/src/pages/settings/server/Overview.tsx @@ -138,7 +138,7 @@ export const Overview = observer(({ server }: Props) => { gap: "8px", alignItems: "center", }}> - {i18n} + {i18n}