/*
* 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 .
*/
import cssText from "~fileContent/settingsStyles.css";
import { lazyWebpack } from "../../utils/misc";
import { filters } from "../../webpack";
import { Forms, React, Router, Text } from "../../webpack/common";
import ErrorBoundary from "../ErrorBoundary";
import BackupRestoreTab from "./BackupRestoreTab";
import PluginsTab from "./PluginsTab";
import Updater from "./Updater";
import VencordSettings from "./VencordTab";
const style = document.createElement("style");
style.textContent = cssText;
document.head.appendChild(style);
const st = (style: string) => `vcSettings${style}`;
const TabBar = lazyWebpack(filters.byCode('[role="tab"][aria-disabled="false"]'));
interface SettingsProps {
tab: string;
}
const SettingsTabs = {
VencordSettings: { name: "Vencord", component: () => },
VencordPlugins: { name: "Plugins", component: () => },
VencordThemes: { name: "Themes", component: () => Coming soon to a Vencord near you! },
VencordUpdater: { name: "Updater", component: () => Updater ? : null },
VencordSettingsSync: { name: "Backup & Restore", component: () => },
};
function Settings(props: SettingsProps) {
const { tab = "VencordSettings" } = props;
const CurrentTab = SettingsTabs[tab]?.component ?? null;
return
Vencord Settings
{Object.entries(SettingsTabs).map(([key, { name }]) => {
return
{name}
;
})}
;
}
export default function (props: SettingsProps) {
return
;
}