some fixes

This commit is contained in:
thororen1234 2026-05-18 10:17:50 -04:00
parent e3a1beaf44
commit b7ed0728c8
No known key found for this signature in database
5 changed files with 13 additions and 25 deletions

View file

@ -9,7 +9,8 @@ import { BaseText } from "@components/BaseText";
import { Flex } from "@components/Flex";
import { CopyIcon, PasteIcon, ResetIcon } from "@components/Icons";
import { copyWithToast } from "@utils/discord";
import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot } from "@utils/modal";
import { ModalCloseButton, ModalContent, ModalHeader, ModalRoot } from "@utils/modal";
import { RenderModalProps } from "@vencord/discord-types";
import { showToast, Toasts, Tooltip } from "@webpack/common";
import { type ReactNode } from "react";
import { UserstyleHeader } from "usercss-meta";
@ -17,7 +18,7 @@ import { UserstyleHeader } from "usercss-meta";
import { SettingBooleanComponent, SettingColorComponent, SettingNumberComponent, SettingRangeComponent, SettingSelectComponent, SettingTextComponent } from "./components";
interface UserCSSSettingsModalProps {
modalProps: ModalProps;
modalProps: RenderModalProps;
theme: UserstyleHeader;
onSettingsReset: () => void;
}

View file

@ -25,6 +25,7 @@ import { BaseText } from "@components/BaseText";
import { Button } from "@components/Button";
import ErrorBoundary from "@components/ErrorBoundary";
import { Flex } from "@components/Flex";
import { Heading } from "@components/Heading";
import { Paragraph } from "@components/Paragraph";
import { debounce } from "@shared/debounce";
import { gitRemote } from "@shared/vencordUserAgent";
@ -35,7 +36,7 @@ import { classes, isObjectEmpty } from "@utils/misc";
import { OptionType, Plugin, PluginTag } from "@utils/types";
import { RenderModalProps, User } from "@vencord/discord-types";
import { findComponentByCodeLazy, findCssClassesLazy } from "@webpack";
import { Clickable, FluxDispatcher, Forms, Modal, openModal, React, Text, Toasts, Tooltip, useEffect, useMemo, UserStore, UserSummaryItem, UserUtils, useState } from "@webpack/common";
import { Clickable, FluxDispatcher, Modal, openModal, React, Text, Toasts, Tooltip, useEffect, useMemo, UserStore, UserSummaryItem, UserUtils, useState } from "@webpack/common";
import { Constructor } from "type-fest";
import { PluginMeta } from "~plugins";
@ -188,7 +189,7 @@ export default function PluginModal({ plugin, onRestartNeeded, onClose, transiti
subtitle={
<div className={cl("info")}>
<div>
<Forms.FormText>{plugin.description}</Forms.FormText>
<Heading tag="h5">{plugin.description}</Heading>
{!!plugin.tags?.length && <PluginTags tags={plugin.tags} />}
</div>
</div>

View file

@ -8,10 +8,10 @@ import "./styles.css";
import { BaseText } from "@components/BaseText";
import { Flex } from "@components/Flex";
import { HeadingTertiary } from "@components/Heading";
import { Heading, HeadingTertiary } from "@components/Heading";
import { copyToClipboard } from "@utils/clipboard";
import { findByPropsLazy, findCssClassesLazy } from "@webpack";
import { Button, Forms, Parser, useEffect, useState } from "@webpack/common";
import { Button, Parser, useEffect, useState } from "@webpack/common";
import { FriendInvite } from "./types";
@ -77,12 +77,12 @@ export default function FriendCodesPanel() {
return (
<>
<header className={FormStyles.header}>
<Forms.FormTitle
<Heading
tag="h2"
className={FormStyles.title}
>
Your Friend Codes
</Forms.FormTitle>
</Heading>
<Flex
style={{ marginBottom: "16px" }}

View file

@ -26,7 +26,6 @@ const DeveloperMode = getUserSettingLazy("appearance", "developerMode")!;
async function openRoleIconModal(roleId: string, roleIcon: string, roleName: string) {
const format = settings.store.roleIconFileFormat;
const contentType = format === "jpg" ? "image/jpeg" : `image/${format}`;
const original = `${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/role-icons/${roleId}/${roleIcon}.${format}`;
const url = original.replace(`//${window.GLOBAL_ENV.CDN_HOST}/`, "//media.discordapp.net/");
@ -34,18 +33,7 @@ async function openRoleIconModal(roleId: string, roleIcon: string, roleName: str
url,
original,
height: 128,
width: 128,
contentType,
originalContentType: contentType,
sourceMetadata: {
identifier: {
type: "attachment",
attachmentId: roleId,
filename: `role-icon-${roleId}.${format}`,
title: roleName,
size: 1,
}
}
width: 128
});
}

View file

@ -21,7 +21,6 @@ import "./styles.css";
import { NavContextMenuPatchCallback } from "@api/ContextMenu";
import { definePluginSettings } from "@api/Settings";
import { Card } from "@components/Card";
import { Heading } from "@components/Heading";
import { Microphone } from "@components/Icons";
import { Link } from "@components/Link";
import { Paragraph } from "@components/Paragraph";
@ -32,10 +31,9 @@ import { Margins } from "@utils/margins";
import { useAwaiter } from "@utils/react";
import definePlugin, { OptionType } from "@utils/types";
import { chooseFile } from "@utils/web";
import { CloudUpload as TCloudUpload, RenderModalProps } from "@vencord/discord-types";
import { RenderModalProps } from "@vencord/discord-types";
import { CloudUploadPlatform } from "@vencord/discord-types/enums";
import { findLazy } from "@webpack";
import { Button, Constants, FluxDispatcher, Forms, lodash, Menu, MessageActions, Modal, openModal, PendingReplyStore, PermissionsBits, PermissionStore, RestAPI, SelectedChannelStore, showToast, SnowflakeUtils, Toasts, useEffect, useState } from "@webpack/common";
import { Button, CloudUploader, Constants, FluxDispatcher, Forms, lodash, Menu, MessageActions, Modal, openModal, PendingReplyStore, PermissionsBits, PermissionStore, RestAPI, SelectedChannelStore, showToast, SnowflakeUtils, Toasts, useEffect, useState } from "@webpack/common";
import { ComponentType } from "react";
import { VoiceRecorderDesktop } from "./components/DesktopRecorder";