mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-19 22:20:34 +00:00
add settings
This commit is contained in:
parent
d9e8a86688
commit
f4ca72c6f6
2 changed files with 28 additions and 0 deletions
|
@ -10,6 +10,7 @@ import { Devs } from "@utils/constants";
|
|||
import { closeModal, ModalContent, ModalHeader, ModalRoot, openModalLazy } from "@utils/modal";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Button, Menu, Slider, TextInput, useState } from "@webpack/common";
|
||||
import settings from "./settings";
|
||||
const DATA_STORE_NAME = "CFI_DATA";
|
||||
interface folderIcon{
|
||||
url: string,
|
||||
|
@ -24,6 +25,7 @@ interface folderProp {
|
|||
}
|
||||
let folderData: folderStoredData;
|
||||
export default definePlugin({
|
||||
settings,
|
||||
start: async ()=>{
|
||||
folderData = await DataStore.get(DATA_STORE_NAME).catch(e => handleUpdateError(e)) || {} as folderStoredData;
|
||||
},
|
||||
|
|
26
src/plugins/customFolderIcons/settings.tsx
Normal file
26
src/plugins/customFolderIcons/settings.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2024 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { IPluginOptionComponentProps, OptionType } from "@utils/types";
|
||||
|
||||
const settings = definePluginSettings({
|
||||
folderIcons: {
|
||||
type: OptionType.COMPONENT,
|
||||
description: "guh",
|
||||
component: props => <>
|
||||
<FolderIconsSettings
|
||||
setValue={props.setValue}
|
||||
setError={props.setError}
|
||||
option={props.option}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
});
|
||||
export default settings;
|
||||
function FolderIconsSettings(props: IPluginOptionComponentProps): JSX.Element {
|
||||
return <></>;
|
||||
}
|
Loading…
Reference in a new issue