New plugin: BetterRoleContext ~ edit/copy colour shortcuts in profile

This commit is contained in:
Vendicated 2024-03-07 19:53:26 +01:00
parent 1c1d82f9a8
commit 2e90d4c03d
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
5 changed files with 104 additions and 3 deletions

View file

@ -6,7 +6,10 @@
import { findByPropsLazy } from "@webpack";
export const TextAndImagesSettingsStores = findByPropsLazy("MessageDisplayCompact");
export const StatusSettingsStores = findByPropsLazy("ShowCurrentGame");
import * as t from "./types/settingsStores";
export const TextAndImagesSettingsStores = findByPropsLazy("MessageDisplayCompact") as Record<string, t.SettingsStore>;
export const StatusSettingsStores = findByPropsLazy("ShowCurrentGame") as Record<string, t.SettingsStore>;
export const UserSettingsActionCreators = findByPropsLazy("PreloadedUserSettingsActionCreators");

View file

@ -16,9 +16,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
export * from "./classes";
export * from "./components";
export * from "./fluxEvents";
export * from "./i18nMessages";
export * from "./menu";
export * from "./settingsStores";
export * from "./stores";
export * from "./utils";

View file

@ -0,0 +1,11 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
export interface SettingsStore<T = any> {
getSetting(): T;
updateSetting(value: T): void;
useSetting(): T;
}