2022-10-22 01:17:06 +02:00
|
|
|
/*
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
* Vencord, a Discord client mod
|
|
|
|
|
* Copyright (c) 2025 Vendicated and contributors
|
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
*/
|
2022-10-22 01:17:06 +02:00
|
|
|
|
2025-12-06 11:32:51 +11:00
|
|
|
import { definePluginSettings } from "@api/Settings";
|
2025-12-06 20:34:59 -05:00
|
|
|
import { BackupRestoreIcon, CloudIcon, LogIcon, MainSettingsIcon, PaintbrushIcon, PatchHelperIcon, PluginsIcon, UpdaterIcon, VesktopSettingsIcon } from "@components/Icons";
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
import {
|
|
|
|
|
BackupAndRestoreTab,
|
|
|
|
|
ChangelogTab,
|
|
|
|
|
CloudTab,
|
|
|
|
|
PatchHelperTab,
|
|
|
|
|
PluginsTab,
|
2025-12-05 23:07:13 -05:00
|
|
|
ThemesTab,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
UpdaterTab,
|
|
|
|
|
VencordTab,
|
|
|
|
|
} from "@components/settings";
|
2025-10-28 20:18:21 -04:00
|
|
|
import { gitHashShort } from "@shared/vencordUserAgent";
|
2022-11-28 13:37:55 +01:00
|
|
|
import { Devs } from "@utils/constants";
|
2024-11-05 16:49:27 -03:00
|
|
|
import { getIntlMessage } from "@utils/discord";
|
2025-12-06 11:32:51 +11:00
|
|
|
import { isTruthy } from "@utils/guards";
|
|
|
|
|
import definePlugin, { IconProps, OptionType } from "@utils/types";
|
|
|
|
|
import { waitFor } from "@webpack";
|
2024-11-05 16:49:27 -03:00
|
|
|
import { React } from "@webpack/common";
|
2025-12-06 11:32:51 +11:00
|
|
|
import type { ComponentType, PropsWithChildren, ReactNode } from "react";
|
2022-10-17 20:18:25 +01:00
|
|
|
|
2025-12-06 11:32:51 +11:00
|
|
|
let LayoutTypes = {
|
|
|
|
|
SECTION: 1,
|
|
|
|
|
SIDEBAR_ITEM: 2,
|
|
|
|
|
PANEL: 3,
|
|
|
|
|
PANE: 4
|
|
|
|
|
};
|
2025-12-11 00:45:45 +01:00
|
|
|
waitFor(["SECTION", "SIDEBAR_ITEM", "PANEL"], v => LayoutTypes = v);
|
2025-12-06 11:32:51 +11:00
|
|
|
|
|
|
|
|
const FallbackSectionTypes = {
|
|
|
|
|
HEADER: "HEADER",
|
|
|
|
|
DIVIDER: "DIVIDER",
|
|
|
|
|
CUSTOM: "CUSTOM"
|
|
|
|
|
};
|
|
|
|
|
type SectionTypes = typeof FallbackSectionTypes;
|
|
|
|
|
|
|
|
|
|
type SettingsLocation =
|
|
|
|
|
| "top"
|
|
|
|
|
| "aboveNitro"
|
|
|
|
|
| "belowNitro"
|
|
|
|
|
| "aboveActivity"
|
|
|
|
|
| "belowActivity"
|
|
|
|
|
| "bottom";
|
|
|
|
|
|
|
|
|
|
interface SettingsLayoutNode {
|
|
|
|
|
type: number;
|
|
|
|
|
key?: string;
|
|
|
|
|
legacySearchKey?: string;
|
2025-12-10 17:03:27 +01:00
|
|
|
getLegacySearchKey?(): string;
|
2025-12-06 11:32:51 +11:00
|
|
|
useLabel?(): string;
|
|
|
|
|
useTitle?(): string;
|
|
|
|
|
buildLayout?(): SettingsLayoutNode[];
|
|
|
|
|
icon?(): ReactNode;
|
|
|
|
|
render?(): ReactNode;
|
2025-12-10 17:03:27 +01:00
|
|
|
StronglyDiscouragedCustomComponent?(): ReactNode;
|
2025-12-06 11:32:51 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface EntryOptions {
|
|
|
|
|
key: string,
|
|
|
|
|
title: string,
|
|
|
|
|
panelTitle?: string,
|
|
|
|
|
Component: ComponentType<{}>,
|
|
|
|
|
Icon: ComponentType<IconProps>;
|
|
|
|
|
}
|
|
|
|
|
interface SettingsLayoutBuilder {
|
|
|
|
|
key?: string;
|
|
|
|
|
buildLayout(): SettingsLayoutNode[];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const settings = definePluginSettings({
|
|
|
|
|
settingsLocation: {
|
|
|
|
|
type: OptionType.SELECT,
|
2025-12-05 23:07:13 -05:00
|
|
|
description: "Where to put the Equicord settings section",
|
2025-12-06 11:32:51 +11:00
|
|
|
options: [
|
|
|
|
|
{ label: "At the very top", value: "top" },
|
|
|
|
|
{ label: "Above the Nitro section", value: "aboveNitro", default: true },
|
|
|
|
|
{ label: "Below the Nitro section", value: "belowNitro" },
|
|
|
|
|
{ label: "Above Activity Settings", value: "aboveActivity" },
|
|
|
|
|
{ label: "Below Activity Settings", value: "belowActivity" },
|
|
|
|
|
{ label: "At the very bottom", value: "bottom" },
|
|
|
|
|
] as { label: string; value: SettingsLocation; default?: boolean; }[]
|
|
|
|
|
}
|
|
|
|
|
});
|
2024-05-15 03:14:02 +02:00
|
|
|
|
2022-08-30 01:42:47 +02:00
|
|
|
export default definePlugin({
|
|
|
|
|
name: "Settings",
|
|
|
|
|
description: "Adds Settings UI and debug info",
|
2022-10-17 20:18:25 +01:00
|
|
|
authors: [Devs.Ven, Devs.Megu],
|
2022-08-31 04:07:16 +02:00
|
|
|
required: true,
|
2023-04-15 02:27:11 +02:00
|
|
|
|
2025-12-06 11:32:51 +11:00
|
|
|
settings,
|
|
|
|
|
|
2024-05-14 18:52:35 +02:00
|
|
|
patches: [
|
|
|
|
|
{
|
|
|
|
|
find: ".versionHash",
|
|
|
|
|
replacement: [
|
2025-12-06 00:01:38 -05:00
|
|
|
// for whatever reason the first letter of RELEASE_CHANNEL is now lowercase, so we fix that here because it looks better imo
|
|
|
|
|
{
|
|
|
|
|
match: /\.RELEASE_CHANNEL/,
|
|
|
|
|
replace: "$&.replace(/^./, c => c.toUpperCase())"
|
|
|
|
|
},
|
2025-12-06 11:32:51 +11:00
|
|
|
{
|
|
|
|
|
match: /\.compactInfo.+?(?=null!=(\i)&&(.{0,20}\i\.Text.{0,200}?,children:).{0,15}?("span"),({className:\i\.versionHash,children:\["Build Override: ",\1\.id\]\})\)\}\))/,
|
|
|
|
|
replace: (m, _buildOverride, makeRow, component, props) => {
|
|
|
|
|
props = props.replace(/children:\[.+\]/, "");
|
|
|
|
|
return `${m},$self.makeInfoElements(${component},${props}).map(e=>${makeRow}e})),`;
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-14 18:52:35 +02:00
|
|
|
{
|
2025-09-18 11:32:47 -04:00
|
|
|
match: /\.info.+?\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,
|
2024-05-14 18:52:35 +02:00
|
|
|
replace: (m, component, props) => {
|
|
|
|
|
props = props.replace(/children:\[.+\]/, "");
|
2025-12-06 11:32:51 +11:00
|
|
|
return `${m},$self.makeInfoElements(${component},${props})`;
|
2024-05-14 18:52:35 +02:00
|
|
|
}
|
2024-05-15 03:14:02 +02:00
|
|
|
},
|
|
|
|
|
{
|
2025-12-06 11:32:51 +11:00
|
|
|
match: /copyValue:\i\.join\(" "\)/g,
|
2024-05-15 03:14:02 +02:00
|
|
|
replace: "$& + $self.getInfoString()"
|
2022-08-30 01:42:47 +02:00
|
|
|
}
|
2024-05-14 18:52:35 +02:00
|
|
|
]
|
|
|
|
|
},
|
2024-05-24 01:05:17 +02:00
|
|
|
{
|
2024-11-03 15:47:19 -03:00
|
|
|
find: ".SEARCH_NO_RESULTS&&0===",
|
2024-06-19 16:16:48 -03:00
|
|
|
replacement: [
|
|
|
|
|
{
|
|
|
|
|
match: /(?<=section:(.{0,50})\.DIVIDER\}\))([,;])(?=.{0,200}(\i)\.push.{0,100}label:(\i)\.header)/,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
replace: (
|
|
|
|
|
_,
|
|
|
|
|
sectionTypes,
|
|
|
|
|
commaOrSemi,
|
|
|
|
|
elements,
|
|
|
|
|
element,
|
|
|
|
|
) =>
|
|
|
|
|
`${commaOrSemi} $self.addSettings(${elements}, ${element}, ${sectionTypes}) ${commaOrSemi}`,
|
2024-05-24 01:05:17 +02:00
|
|
|
},
|
2024-06-19 16:16:48 -03:00
|
|
|
{
|
2025-08-05 23:57:51 +02:00
|
|
|
match: /({(?=.+?function (\i).{0,160}(\i)=\i\.useMemo.{0,140}return \i\.useMemo\(\(\)=>\i\(\3).+?\(\)=>)\2/,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
replace: (_, rest, settingsHook) =>
|
|
|
|
|
`${rest}$self.wrapSettingsHook(${settingsHook})`,
|
|
|
|
|
},
|
|
|
|
|
],
|
2024-05-14 18:52:35 +02:00
|
|
|
},
|
2025-09-25 18:42:23 -04:00
|
|
|
// Fix the settings cog context menu to work properly
|
2024-05-14 18:52:35 +02:00
|
|
|
{
|
2024-11-05 16:49:27 -03:00
|
|
|
find: "#{intl::USER_SETTINGS_ACTIONS_MENU_LABEL}",
|
2024-05-14 18:52:35 +02:00
|
|
|
replacement: {
|
2025-09-27 15:59:18 -04:00
|
|
|
// Skip the check Discord performs to make sure the section being selected in the user settings context menu is valid
|
|
|
|
|
match: /(?<=function\((\i),(\i),\i\)\{)(?=let \i=Object.values\(\i\.\i\).+?(\(0,\i\.openUserSettings\))\()/,
|
|
|
|
|
replace: (_, settingsPanel, section, openUserSettings) => `${openUserSettings}(${settingsPanel},{section:${section}});return;`
|
2022-08-30 01:42:47 +02:00
|
|
|
}
|
2025-10-22 00:13:31 +02:00
|
|
|
},
|
|
|
|
|
{
|
2025-12-06 11:32:51 +11:00
|
|
|
find: ".buildLayout().map",
|
2025-10-22 00:13:31 +02:00
|
|
|
replacement: {
|
2025-12-06 11:32:51 +11:00
|
|
|
match: /(\i)\.buildLayout\(\)(?=\.map)/,
|
|
|
|
|
replace: "$self.buildLayout($1)"
|
2025-10-22 00:13:31 +02:00
|
|
|
}
|
2025-12-06 23:43:30 +01:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
find: "getWebUserSettingFromSection",
|
|
|
|
|
replacement: {
|
|
|
|
|
match: /new Map\(\[(?=\[.{0,10}\.ACCOUNT,.{0,10}\.ACCOUNT_PANEL)/,
|
|
|
|
|
replace: "new Map([...$self.getSettingsSectionMappings(),"
|
|
|
|
|
}
|
2024-03-16 02:19:26 +01:00
|
|
|
}
|
2024-05-14 18:52:35 +02:00
|
|
|
],
|
2022-11-11 00:11:44 +01:00
|
|
|
|
2025-12-06 00:01:38 -05:00
|
|
|
buildEntry(options: EntryOptions): SettingsLayoutNode {
|
|
|
|
|
const { key, title, panelTitle = title, Component, Icon } = options;
|
|
|
|
|
|
2025-12-11 00:45:45 +01:00
|
|
|
const panel: SettingsLayoutNode = {
|
|
|
|
|
key: key + "_panel",
|
|
|
|
|
type: LayoutTypes.PANEL,
|
|
|
|
|
useTitle: () => panelTitle,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const render = {
|
|
|
|
|
// FIXME
|
|
|
|
|
StronglyDiscouragedCustomComponent: () => <Component />,
|
|
|
|
|
render: () => <Component />,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// FIXME
|
|
|
|
|
if (LayoutTypes.PANE) {
|
|
|
|
|
panel.buildLayout = () => [
|
|
|
|
|
{
|
|
|
|
|
key: key + "_pane",
|
|
|
|
|
type: LayoutTypes.PANE,
|
|
|
|
|
useTitle: () => panelTitle,
|
|
|
|
|
buildLayout: () => [],
|
|
|
|
|
...render
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
} else {
|
|
|
|
|
Object.assign(panel, render);
|
|
|
|
|
panel.buildLayout = () => [];
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-06 00:01:38 -05:00
|
|
|
return ({
|
|
|
|
|
key,
|
|
|
|
|
type: LayoutTypes.SIDEBAR_ITEM,
|
2025-12-10 17:03:27 +01:00
|
|
|
// FIXME
|
2025-12-06 00:01:38 -05:00
|
|
|
legacySearchKey: title.toUpperCase(),
|
2025-12-10 17:03:27 +01:00
|
|
|
getLegacySearchKey: () => title.toUpperCase(),
|
2025-12-06 00:01:38 -05:00
|
|
|
useTitle: () => title,
|
|
|
|
|
icon: () => <Icon width={20} height={20} />,
|
2025-12-11 00:45:45 +01:00
|
|
|
buildLayout: () => [panel]
|
2025-12-06 00:01:38 -05:00
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
2025-12-06 23:43:30 +01:00
|
|
|
getSettingsSectionMappings() {
|
|
|
|
|
return [
|
2025-12-06 19:34:15 -05:00
|
|
|
["EquicordSettings", "equicord_main_panel"],
|
|
|
|
|
["EquicordPlugins", "equicord_plugins_panel"],
|
|
|
|
|
["EquicordThemes", "equicord_themes_panel"],
|
|
|
|
|
["EquicordUpdater", "equicord_updater_panel"],
|
|
|
|
|
["EquicordChangelog", "equicord_changelog_panel"],
|
|
|
|
|
["EquicordCloud", "equicord_cloud_panel"],
|
|
|
|
|
["EquicordBackupAndRestore", "equicord_backup_restore_panel"],
|
|
|
|
|
["EquicordPatchHelper", "equicord_patch_helper_panel"],
|
2025-12-09 11:43:26 -05:00
|
|
|
["EquibopSettings", "equicord_equibop_settings_panel"],
|
2025-12-06 19:34:15 -05:00
|
|
|
["EquicordDiscordIcons", "equicord_icon_viewer"],
|
|
|
|
|
["EquicordThemeLibrary", "equicord_theme_library"],
|
|
|
|
|
["EquicordIRememberYou", "equicord_i_remember_you"],
|
2025-12-06 23:43:30 +01:00
|
|
|
];
|
|
|
|
|
},
|
|
|
|
|
|
2025-12-06 11:32:51 +11:00
|
|
|
buildLayout(originalLayoutBuilder: SettingsLayoutBuilder) {
|
|
|
|
|
const layout = originalLayoutBuilder.buildLayout();
|
|
|
|
|
if (originalLayoutBuilder.key !== "$Root") return layout;
|
|
|
|
|
if (!Array.isArray(layout)) return layout;
|
|
|
|
|
|
2025-12-06 00:01:38 -05:00
|
|
|
if (layout.some(s => s?.key === "equicord_section")) return layout;
|
|
|
|
|
|
|
|
|
|
const { buildEntry } = this;
|
2025-12-06 11:32:51 +11:00
|
|
|
|
2025-12-06 19:34:15 -05:00
|
|
|
const equicordEntries: SettingsLayoutNode[] = [
|
2025-12-06 11:32:51 +11:00
|
|
|
buildEntry({
|
2025-12-06 00:01:38 -05:00
|
|
|
key: "equicord_main",
|
2025-12-05 23:07:13 -05:00
|
|
|
title: "Equicord",
|
|
|
|
|
panelTitle: "Equicord Settings",
|
2025-12-06 11:32:51 +11:00
|
|
|
Component: VencordTab,
|
|
|
|
|
Icon: MainSettingsIcon
|
|
|
|
|
}),
|
|
|
|
|
buildEntry({
|
2025-12-06 00:01:38 -05:00
|
|
|
key: "equicord_plugins",
|
2025-12-06 11:32:51 +11:00
|
|
|
title: "Plugins",
|
|
|
|
|
Component: PluginsTab,
|
|
|
|
|
Icon: PluginsIcon
|
|
|
|
|
}),
|
|
|
|
|
buildEntry({
|
2025-12-06 00:01:38 -05:00
|
|
|
key: "equicord_themes",
|
2025-12-06 11:32:51 +11:00
|
|
|
title: "Themes",
|
|
|
|
|
Component: ThemesTab,
|
|
|
|
|
Icon: PaintbrushIcon
|
|
|
|
|
}),
|
|
|
|
|
!IS_UPDATER_DISABLED && UpdaterTab && buildEntry({
|
2025-12-06 00:01:38 -05:00
|
|
|
key: "equicord_updater",
|
2025-12-06 11:32:51 +11:00
|
|
|
title: "Updater",
|
2025-12-05 23:07:13 -05:00
|
|
|
panelTitle: "Equicord Updater",
|
2025-12-06 11:32:51 +11:00
|
|
|
Component: UpdaterTab,
|
|
|
|
|
Icon: UpdaterIcon
|
|
|
|
|
}),
|
2025-12-06 06:18:27 +01:00
|
|
|
buildEntry({
|
|
|
|
|
key: "equicord_changelog",
|
|
|
|
|
title: "Changelog",
|
|
|
|
|
Component: ChangelogTab,
|
|
|
|
|
Icon: LogIcon,
|
|
|
|
|
}),
|
2025-12-06 11:32:51 +11:00
|
|
|
buildEntry({
|
2025-12-06 00:01:38 -05:00
|
|
|
key: "equicord_cloud",
|
2025-12-06 11:32:51 +11:00
|
|
|
title: "Cloud",
|
2025-12-05 23:07:13 -05:00
|
|
|
panelTitle: "Equicord Cloud",
|
2025-12-06 11:32:51 +11:00
|
|
|
Component: CloudTab,
|
|
|
|
|
Icon: CloudIcon
|
|
|
|
|
}),
|
|
|
|
|
buildEntry({
|
2025-12-06 00:01:38 -05:00
|
|
|
key: "equicord_backup_restore",
|
2025-12-06 11:32:51 +11:00
|
|
|
title: "Backup & Restore",
|
|
|
|
|
Component: BackupAndRestoreTab,
|
|
|
|
|
Icon: BackupRestoreIcon
|
|
|
|
|
}),
|
|
|
|
|
IS_DEV && PatchHelperTab && buildEntry({
|
2025-12-06 00:01:38 -05:00
|
|
|
key: "equicord_patch_helper",
|
2025-12-06 11:32:51 +11:00
|
|
|
title: "Patch Helper",
|
|
|
|
|
Component: PatchHelperTab,
|
|
|
|
|
Icon: PatchHelperIcon
|
|
|
|
|
}),
|
|
|
|
|
...this.customEntries.map(buildEntry),
|
|
|
|
|
// TODO: Remove deprecated customSections in a future update
|
|
|
|
|
...this.customSections.map((func, i) => {
|
|
|
|
|
const { section, element, label } = func(FallbackSectionTypes);
|
2025-12-06 20:34:59 -05:00
|
|
|
if (section !== "Equibop") return null;
|
2025-12-06 11:32:51 +11:00
|
|
|
|
|
|
|
|
return buildEntry({
|
2025-12-06 00:01:38 -05:00
|
|
|
key: `equicord_deprecated_custom_${section}`,
|
2025-12-06 11:32:51 +11:00
|
|
|
title: label,
|
|
|
|
|
Component: element,
|
2025-12-06 20:34:59 -05:00
|
|
|
Icon: VesktopSettingsIcon
|
2025-12-06 11:32:51 +11:00
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
].filter(isTruthy);
|
|
|
|
|
|
2025-12-06 19:34:15 -05:00
|
|
|
const equicordSection: SettingsLayoutNode = {
|
2025-12-06 00:01:38 -05:00
|
|
|
key: "equicord_section",
|
2025-12-06 11:32:51 +11:00
|
|
|
type: LayoutTypes.SECTION,
|
2025-12-06 00:01:38 -05:00
|
|
|
useLabel: () => "Equicord",
|
2025-12-06 19:34:15 -05:00
|
|
|
buildLayout: () => equicordEntries
|
2025-12-06 11:32:51 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const { settingsLocation } = settings.store;
|
|
|
|
|
|
|
|
|
|
const places: Record<SettingsLocation, string> = {
|
|
|
|
|
top: "user_section",
|
|
|
|
|
aboveNitro: "billing_section",
|
|
|
|
|
belowNitro: "billing_section",
|
|
|
|
|
aboveActivity: "activity_section",
|
|
|
|
|
belowActivity: "activity_section",
|
|
|
|
|
bottom: "logout_section"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const key = places[settingsLocation] ?? places.top;
|
|
|
|
|
let idx = layout.findIndex(s => typeof s?.key === "string" && s.key === key);
|
|
|
|
|
|
|
|
|
|
if (idx === -1) {
|
|
|
|
|
idx = 2;
|
|
|
|
|
} else if (settingsLocation.startsWith("below")) {
|
|
|
|
|
idx += 1;
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-06 19:34:15 -05:00
|
|
|
layout.splice(idx, 0, equicordSection);
|
2025-12-06 11:32:51 +11:00
|
|
|
|
|
|
|
|
return layout;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/** @deprecated Use customEntries */
|
2024-05-15 03:14:02 +02:00
|
|
|
customSections: [] as ((SectionTypes: SectionTypes) => any)[],
|
2025-12-06 11:32:51 +11:00
|
|
|
customEntries: [] as EntryOptions[],
|
2023-06-11 17:11:56 -04:00
|
|
|
|
2024-05-15 03:14:02 +02:00
|
|
|
makeSettingsCategories(SectionTypes: SectionTypes) {
|
2023-04-09 04:04:02 +02:00
|
|
|
return [
|
2023-01-22 04:26:33 +01:00
|
|
|
{
|
2023-10-25 00:17:11 +02:00
|
|
|
section: SectionTypes.HEADER,
|
2024-04-17 14:29:47 -04:00
|
|
|
label: "Equicord",
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
className: "vc-settings-header",
|
2023-04-09 04:04:02 +02:00
|
|
|
},
|
|
|
|
|
{
|
2024-07-13 00:06:01 -04:00
|
|
|
section: "EquicordSettings",
|
2024-04-17 14:29:47 -04:00
|
|
|
label: "Equicord",
|
2024-05-04 23:15:33 -03:00
|
|
|
element: VencordTab,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
className: "vc-settings",
|
2023-04-09 04:04:02 +02:00
|
|
|
},
|
|
|
|
|
{
|
2024-07-13 00:06:01 -04:00
|
|
|
section: "EquicordPlugins",
|
2023-01-22 04:26:33 +01:00
|
|
|
label: "Plugins",
|
2024-11-06 04:00:38 -05:00
|
|
|
searchableTitles: ["Plugins"],
|
2024-05-04 23:15:33 -03:00
|
|
|
element: PluginsTab,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
className: "vc-plugins",
|
2023-04-09 04:04:02 +02:00
|
|
|
},
|
|
|
|
|
{
|
2024-07-13 00:06:01 -04:00
|
|
|
section: "EquicordThemes",
|
2023-01-22 04:26:33 +01:00
|
|
|
label: "Themes",
|
2024-11-06 04:00:38 -05:00
|
|
|
searchableTitles: ["Themes"],
|
2025-02-23 11:10:55 -05:00
|
|
|
element: ThemesTab,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
className: "vc-themes",
|
2023-04-09 04:04:02 +02:00
|
|
|
},
|
2023-08-25 14:15:02 +02:00
|
|
|
!IS_UPDATER_DISABLED && {
|
2024-07-13 00:06:01 -04:00
|
|
|
section: "EquicordUpdater",
|
2023-01-22 04:26:33 +01:00
|
|
|
label: "Updater",
|
2024-11-06 04:00:38 -05:00
|
|
|
searchableTitles: ["Updater"],
|
2024-05-04 23:15:33 -03:00
|
|
|
element: UpdaterTab,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
className: "vc-updater",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
section: "EquicordChangelog",
|
|
|
|
|
label: "Changelog",
|
|
|
|
|
searchableTitles: ["Changelog"],
|
|
|
|
|
element: ChangelogTab,
|
|
|
|
|
className: "vc-changelog",
|
2023-04-09 04:04:02 +02:00
|
|
|
},
|
|
|
|
|
{
|
2024-07-13 00:06:01 -04:00
|
|
|
section: "EquicordCloud",
|
2023-04-09 04:04:02 +02:00
|
|
|
label: "Cloud",
|
2024-11-06 04:00:38 -05:00
|
|
|
searchableTitles: ["Cloud"],
|
2024-05-04 23:15:33 -03:00
|
|
|
element: CloudTab,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
className: "vc-cloud",
|
2023-04-09 04:04:02 +02:00
|
|
|
},
|
|
|
|
|
{
|
2025-12-06 19:34:15 -05:00
|
|
|
section: "EquicordBackupAndRestore",
|
2023-04-09 04:04:02 +02:00
|
|
|
label: "Backup & Restore",
|
2024-11-06 04:00:38 -05:00
|
|
|
searchableTitles: ["Backup & Restore"],
|
2024-05-04 23:15:33 -03:00
|
|
|
element: BackupAndRestoreTab,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
className: "vc-backup-restore",
|
2023-04-09 04:04:02 +02:00
|
|
|
},
|
2025-02-23 10:56:29 -05:00
|
|
|
IS_DEV && {
|
2024-07-13 00:06:01 -04:00
|
|
|
section: "EquicordPatchHelper",
|
2023-01-22 04:26:33 +01:00
|
|
|
label: "Patch Helper",
|
2024-11-06 04:00:38 -05:00
|
|
|
searchableTitles: ["Patch Helper"],
|
2024-05-04 23:15:33 -03:00
|
|
|
element: PatchHelperTab,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
className: "vc-patch-helper",
|
2023-04-09 04:04:02 +02:00
|
|
|
},
|
2023-10-25 00:17:11 +02:00
|
|
|
...this.customSections.map(func => func(SectionTypes)),
|
2023-04-09 04:04:02 +02:00
|
|
|
{
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
section: SectionTypes.DIVIDER,
|
|
|
|
|
},
|
2023-04-09 04:04:02 +02:00
|
|
|
].filter(Boolean);
|
2023-01-22 04:26:33 +01:00
|
|
|
},
|
|
|
|
|
|
2025-12-06 11:32:51 +11:00
|
|
|
isRightSpot({ header, settings: s }: { header?: string; settings?: string[]; }) {
|
|
|
|
|
const firstChild = s?.[0];
|
2024-05-14 18:52:35 +02:00
|
|
|
// lowest two elements... sanity backup
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
if (firstChild === "LOGOUT" || firstChild === "SOCIAL_LINKS")
|
|
|
|
|
return true;
|
2024-05-14 18:52:35 +02:00
|
|
|
|
2025-12-06 11:32:51 +11:00
|
|
|
const { settingsLocation } = settings.store;
|
2024-05-14 18:52:35 +02:00
|
|
|
|
|
|
|
|
if (settingsLocation === "bottom") return firstChild === "LOGOUT";
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
if (settingsLocation === "belowActivity")
|
|
|
|
|
return firstChild === "CHANGELOG";
|
2024-05-14 18:52:35 +02:00
|
|
|
|
2024-05-14 21:18:43 +02:00
|
|
|
if (!header) return;
|
|
|
|
|
|
2024-11-03 15:47:19 -03:00
|
|
|
try {
|
2025-12-06 11:32:51 +11:00
|
|
|
const names: Record<Exclude<SettingsLocation, "bottom" | "belowActivity">, string> = {
|
2024-11-05 16:49:27 -03:00
|
|
|
top: getIntlMessage("USER_SETTINGS"),
|
|
|
|
|
aboveNitro: getIntlMessage("BILLING_SETTINGS"),
|
|
|
|
|
belowNitro: getIntlMessage("APP_SETTINGS"),
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
aboveActivity: getIntlMessage("ACTIVITY_SETTINGS"),
|
2024-11-03 15:47:19 -03:00
|
|
|
};
|
2024-11-05 16:49:27 -03:00
|
|
|
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
if (
|
|
|
|
|
!names[settingsLocation] ||
|
|
|
|
|
names[settingsLocation].endsWith("_SETTINGS")
|
|
|
|
|
)
|
2025-02-17 02:10:02 +01:00
|
|
|
return firstChild === "PREMIUM";
|
|
|
|
|
|
2024-11-03 15:47:19 -03:00
|
|
|
return header === names[settingsLocation];
|
|
|
|
|
} catch {
|
|
|
|
|
return firstChild === "PREMIUM";
|
|
|
|
|
}
|
2024-05-14 18:52:35 +02:00
|
|
|
},
|
|
|
|
|
|
2024-05-14 21:18:43 +02:00
|
|
|
patchedSettings: new WeakSet(),
|
|
|
|
|
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
addSettings(
|
|
|
|
|
elements: any[],
|
|
|
|
|
element: { header?: string; settings: string[]; },
|
|
|
|
|
sectionTypes: SectionTypes,
|
|
|
|
|
) {
|
|
|
|
|
if (this.patchedSettings.has(elements) || !this.isRightSpot(element))
|
|
|
|
|
return;
|
2024-05-14 21:18:43 +02:00
|
|
|
|
|
|
|
|
this.patchedSettings.add(elements);
|
2024-05-14 18:52:35 +02:00
|
|
|
|
|
|
|
|
elements.push(...this.makeSettingsCategories(sectionTypes));
|
|
|
|
|
},
|
|
|
|
|
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
wrapSettingsHook(
|
|
|
|
|
originalHook: (...args: any[]) => Record<string, unknown>[],
|
|
|
|
|
) {
|
2024-05-15 03:14:02 +02:00
|
|
|
return (...args: any[]) => {
|
|
|
|
|
const elements = originalHook(...args);
|
|
|
|
|
if (!this.patchedSettings.has(elements))
|
2025-12-06 11:32:51 +11:00
|
|
|
elements.unshift(...this.makeSettingsCategories(FallbackSectionTypes));
|
2024-05-15 03:14:02 +02:00
|
|
|
|
|
|
|
|
return elements;
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
2022-11-17 13:49:51 +01:00
|
|
|
get electronVersion() {
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
return (
|
|
|
|
|
VencordNative.native.getVersions().electron ||
|
|
|
|
|
window.legcord?.electron ||
|
|
|
|
|
null
|
|
|
|
|
);
|
2022-11-17 13:49:51 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
get chromiumVersion() {
|
|
|
|
|
try {
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
return (
|
|
|
|
|
VencordNative.native.getVersions().chrome ||
|
2025-07-10 00:38:39 +02:00
|
|
|
// @ts-expect-error Typescript will add userAgentData IMMEDIATELY
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
navigator.userAgentData?.brands?.find(
|
|
|
|
|
b =>
|
|
|
|
|
b.brand === "Chromium" || b.brand === "Google Chrome",
|
|
|
|
|
)?.version ||
|
|
|
|
|
null
|
|
|
|
|
);
|
2024-10-14 19:33:17 -04:00
|
|
|
} catch {
|
|
|
|
|
// inb4 some stupid browser throws unsupported error for navigator.userAgentData, it's only in chromium
|
2022-11-17 13:49:51 +01:00
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2025-08-05 00:47:41 -04:00
|
|
|
getVersionInfo(support = true) {
|
2025-08-05 00:45:21 -04:00
|
|
|
let version = "";
|
|
|
|
|
|
|
|
|
|
if (IS_DEV) version = "Dev";
|
2025-08-05 14:52:51 -04:00
|
|
|
if (IS_WEB) version = "Web";
|
|
|
|
|
if (IS_VESKTOP) version = `Vesktop v${VesktopNative.app.getVersion()}`;
|
|
|
|
|
if (IS_EQUIBOP) version = `Equibop v${VesktopNative.app.getVersion()}`;
|
|
|
|
|
if (IS_STANDALONE) version = "Standalone";
|
2025-08-05 00:45:21 -04:00
|
|
|
|
2025-08-05 00:47:41 -04:00
|
|
|
return support && version ? ` (${version})` : version;
|
2022-11-17 13:49:51 +01:00
|
|
|
},
|
|
|
|
|
|
2024-05-15 03:14:02 +02:00
|
|
|
getInfoRows() {
|
2025-08-05 00:45:21 -04:00
|
|
|
const { electronVersion, chromiumVersion, getVersionInfo } = this;
|
2022-11-17 13:49:51 +01:00
|
|
|
|
2025-10-28 20:18:21 -04:00
|
|
|
const rows = [`Equicord ${gitHashShort}${getVersionInfo()}`];
|
2024-05-15 03:14:02 +02:00
|
|
|
|
|
|
|
|
if (electronVersion) rows.push(`Electron ${electronVersion}`);
|
|
|
|
|
if (chromiumVersion) rows.push(`Chromium ${chromiumVersion}`);
|
|
|
|
|
|
|
|
|
|
return rows;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getInfoString() {
|
|
|
|
|
return "\n" + this.getInfoRows().join("\n");
|
|
|
|
|
},
|
|
|
|
|
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
makeInfoElements(
|
2025-12-05 23:07:13 -05:00
|
|
|
Component: ComponentType<React.PropsWithChildren>,
|
|
|
|
|
props: PropsWithChildren,
|
add changelog section (#410)
* add tone indicators plugin
* im tired of this man
* oh my fucking god its EquicordDevs not Devs
* dont use json
* Update index.tsx
* Initial commit
* past updates history, new plugins section, more git commit information.
waho
* move it to be under updater instead of cloud
* LINT ERROR FIX PLEASE
* wait why does it say 2022
* add support for new settings, history list scrollable and taller, data
migration, debugging commands.
* add support for required plugins, also name things logs instead of
sessions, clean up code too
* Fixes
* holy changes. ability to bulk clear and specific clear logs with either
a trash can icon or the "clear logs" button at the top of the page,
plugin entries in the logs section showing if something is required of
any other plugins, fetch logs from repository which checks for duplicate
hash to prevent duplicate messy logs, fixed cramming of elements by
extending the page itself, made things look better.
* Fix Lint
* Update styles.css
* Remove NewPluginsManager
* API Plugin Check
---------
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: justjxke <Jake0300@protonmai.com>
2025-09-23 14:20:50 +01:00
|
|
|
) {
|
|
|
|
|
return this.getInfoRows().map((text, i) => (
|
|
|
|
|
<Component key={i} {...props}>
|
|
|
|
|
{text}
|
|
|
|
|
</Component>
|
|
|
|
|
));
|
|
|
|
|
},
|
2022-09-16 22:59:34 +02:00
|
|
|
});
|