mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-10 09:56:24 +00:00
fixes
This commit is contained in:
parent
716b75995b
commit
c302b3cb7d
4 changed files with 8 additions and 18 deletions
|
@ -224,6 +224,7 @@ export function migrateSettingsToArrays(pluginName: string, settings: string[],
|
|||
for (const setting of settings) {
|
||||
if (SettingsStore.plain.plugins[pluginName] === undefined || typeof SettingsStore.plain.plugins[pluginName][setting] !== "string") continue;
|
||||
logger.info(`Migrating setting ${setting} from ${pluginName} to list`);
|
||||
// @ts-ignore
|
||||
if (SettingsStore.plain.plugins[pluginName][setting] === "") SettingsStore.plain.plugins[pluginName][setting] = SettingsStore.plain.plugins[pluginName][setting].default ?? [];
|
||||
else SettingsStore.plain.plugins[pluginName][setting] = SettingsStore.plain.plugins[pluginName][setting].split(stringSeparator);
|
||||
}
|
||||
|
|
|
@ -1,19 +1,7 @@
|
|||
/*
|
||||
* Vencord, a modification for Discord's desktop app
|
||||
* Copyright (c) 2022 Vendicated and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2025 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
|
|
|
@ -57,7 +57,7 @@ function renderRegisteredPlugins(name: string, value: any) {
|
|||
{plugins[plugin].map(setting => (
|
||||
<Menu.MenuCheckboxItem
|
||||
id={`vc-plugin-settings-${plugin}-${setting}`}
|
||||
// @ts-ignore popoutText exists due to this being a list option type FIXMe look at this again
|
||||
// @ts-ignore popoutText exists due to this being a list option type
|
||||
label={Vencord.Plugins.plugins[plugin].settings?.def[setting].popoutText ?? setting}
|
||||
action={() => handleCheckboxClick(plugin, setting)}
|
||||
checked={checkedItems[`${plugin}-${setting}-${value.id}`]}
|
||||
|
|
|
@ -268,6 +268,7 @@ export interface PluginSettingListDef{
|
|||
type: OptionType.ARRAY | OptionType.CHANNELS | OptionType.GUILDS | OptionType.USERS;
|
||||
popoutText?: string;
|
||||
hidePopout?: boolean;
|
||||
default?: any[];
|
||||
}
|
||||
|
||||
export interface IPluginOptionComponentProps {
|
||||
|
|
Loading…
Reference in a new issue