refactor discord types into separate npm package (#3520)
Co-authored-by: V <vendicated@riseup.net> Co-authored-by: sadan <117494111+sadan4@users.noreply.github.com> Co-authored-by: ezzud <contact@ezzud.fr>
This commit is contained in:
parent
c55833d95f
commit
dc9064326b
149 changed files with 1561 additions and 751 deletions
|
|
@ -25,16 +25,12 @@ import { Devs } from "@utils/constants";
|
|||
import { Margins } from "@utils/margins";
|
||||
import { classes, copyWithToast } from "@utils/misc";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { Button, ColorPicker, Flex, Forms, React, Text, UserProfileStore, UserStore, useState } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
import { ReactElement } from "react";
|
||||
import virtualMerge from "virtual-merge";
|
||||
|
||||
interface UserProfile extends User {
|
||||
themeColors?: Array<number>;
|
||||
}
|
||||
|
||||
interface Colors {
|
||||
primary: number;
|
||||
accent: number;
|
||||
|
|
@ -220,7 +216,7 @@ export default definePlugin({
|
|||
</Forms.FormSection>);
|
||||
},
|
||||
settings,
|
||||
colorDecodeHook(user: UserProfile) {
|
||||
colorDecodeHook(user: User) {
|
||||
if (user) {
|
||||
// don't replace colors if already set with nitro
|
||||
if (settings.store.nitroFirst && user.themeColors) return user;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue