|
|
|
@ -21,12 +21,13 @@ import { classNameFactory } from "@api/Styles";
|
|
|
|
|
import { Flex } from "@components/Flex";
|
|
|
|
|
import { DeleteIcon } from "@components/Icons";
|
|
|
|
|
import { Link } from "@components/Link";
|
|
|
|
|
import { openInviteModal } from "@utils/discord";
|
|
|
|
|
import { Margins } from "@utils/margins";
|
|
|
|
|
import { classes } from "@utils/misc";
|
|
|
|
|
import { showItemInFolder } from "@utils/native";
|
|
|
|
|
import { useAwaiter } from "@utils/react";
|
|
|
|
|
import { findByPropsLazy, findLazy } from "@webpack";
|
|
|
|
|
import { Button, Card, FluxDispatcher, Forms, React, showToast, TabBar, TextArea, useEffect, useRef, useState } from "@webpack/common";
|
|
|
|
|
import { Button, Card, Forms, React, showToast, TabBar, TextArea, useEffect, useRef, useState } from "@webpack/common";
|
|
|
|
|
import { UserThemeHeader } from "main/themes";
|
|
|
|
|
import type { ComponentType, Ref, SyntheticEvent } from "react";
|
|
|
|
|
|
|
|
|
@ -125,15 +126,7 @@ function ThemeCard({ theme, enabled, onChange, onDelete }: ThemeCardProps) {
|
|
|
|
|
href={`https://discord.gg/${theme.invite}`}
|
|
|
|
|
onClick={async e => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
const { invite } = await InviteActions.resolveInvite(theme.invite, "Desktop Modal");
|
|
|
|
|
if (!invite) return showToast("Invalid or expired invite");
|
|
|
|
|
|
|
|
|
|
FluxDispatcher.dispatch({
|
|
|
|
|
type: "INVITE_MODAL_OPEN",
|
|
|
|
|
invite,
|
|
|
|
|
code: theme.invite,
|
|
|
|
|
context: "APP"
|
|
|
|
|
});
|
|
|
|
|
theme.invite != null && openInviteModal(theme.invite).catch(() => showToast("Invalid or expired invite"));
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
Discord Server
|
|
|
|
|