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-22 01:40:58 +01:00
|
|
|
import { BackupRestoreIcon, CloudIcon, LogIcon, MainSettingsIcon, PaintbrushIcon, PatchHelperIcon, PluginsIcon, UpdaterIcon } 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";
|
2025-12-06 11:32:51 +11:00
|
|
|
import { isTruthy } from "@utils/guards";
|
|
|
|
|
import definePlugin, { IconProps, OptionType } from "@utils/types";
|
2025-12-22 01:40:58 +01:00
|
|
|
import { findByPropsLazy } 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-22 01:40:58 +01:00
|
|
|
const enum LayoutType {
|
|
|
|
|
ROOT = 0,
|
|
|
|
|
SECTION = 1,
|
|
|
|
|
SIDEBAR_ITEM = 2,
|
|
|
|
|
PANEL = 3,
|
|
|
|
|
SPLIT = 4,
|
|
|
|
|
CATEGORY = 5,
|
|
|
|
|
ACCORDION = 6,
|
|
|
|
|
LIST = 7,
|
|
|
|
|
RELATED = 8,
|
|
|
|
|
FIELD_SET = 9,
|
|
|
|
|
TAB_ITEM = 10,
|
|
|
|
|
STATIC = 11,
|
|
|
|
|
BUTTON = 12,
|
|
|
|
|
TOGGLE = 13,
|
|
|
|
|
SLIDER = 14,
|
|
|
|
|
SELECT = 15,
|
|
|
|
|
RADIO = 16,
|
|
|
|
|
NAVIGATOR = 17,
|
|
|
|
|
CUSTOM = 18
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const LayoutTypes: typeof LayoutType = findByPropsLazy("SECTION", "SIDEBAR_ITEM", "PANEL");
|
|
|
|
|
|
|
|
|
|
const enum SectionType {
|
|
|
|
|
HEADER = "HEADER",
|
|
|
|
|
DIVIDER = "DIVIDER",
|
|
|
|
|
CUSTOM = "CUSTOM"
|
|
|
|
|
}
|
2025-12-06 11:32:51 +11:00
|
|
|
|
|
|
|
|
type SettingsLocation =
|
|
|
|
|
| "top"
|
|
|
|
|
| "aboveNitro"
|
|
|
|
|
| "belowNitro"
|
|
|
|
|
| "aboveActivity"
|
|
|
|
|
| "belowActivity"
|
|
|
|
|
| "bottom";
|
|
|
|
|
|
|
|
|
|
interface SettingsLayoutNode {
|
2025-12-22 01:40:58 +01:00
|
|
|
type: LayoutType;
|
2025-12-06 11:32:51 +11:00
|
|
|
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 {
|
2025-12-22 01:40:58 +01:00
|
|
|
key: string;
|
|
|
|
|
title: string;
|
|
|
|
|
panelTitle?: string;
|
|
|
|
|
Component: ComponentType<{}>;
|
2025-12-06 11:32:51 +11:00
|
|
|
Icon: ComponentType<IconProps>;
|
|
|
|
|
}
|
2025-12-22 01:40:58 +01:00
|
|
|
|
2025-12-06 11:32:51 +11:00
|
|
|
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
|
|
|
|
2026-02-09 19:19:17 -05:00
|
|
|
const settingsSectionMap: [string, string][] = [
|
2026-01-14 18:42:33 -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"],
|
|
|
|
|
["EquibopSettings", "equicord_equibop_settings_panel"],
|
|
|
|
|
];
|
|
|
|
|
|
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,
|
2026-02-09 19:19:17 -05:00
|
|
|
settingsSectionMap,
|
2025-12-06 11:32:51 +11:00
|
|
|
|
2024-05-14 18:52:35 +02:00
|
|
|
patches: [
|
|
|
|
|
{
|
2026-01-23 14:18:30 -05:00
|
|
|
find: "#{intl::COPY_VERSION}",
|
2024-05-14 18:52:35 +02:00
|
|
|
replacement: [
|
2025-12-06 00:01:38 -05:00
|
|
|
{
|
|
|
|
|
match: /\.RELEASE_CHANNEL/,
|
|
|
|
|
replace: "$&.replace(/^./, c => c.toUpperCase())"
|
|
|
|
|
},
|
2025-12-06 11:32:51 +11:00
|
|
|
{
|
2026-01-24 01:18:51 +01:00
|
|
|
match: /"text-xxs\/normal".{0,300}?(?=null!=(\i)&&(.{0,20}\i\.Text.{0,200}?,children:).{0,15}?("span"),({className:\i\.\i,children:\["Build Override: ",\1\.id\]\})\)\}\))/,
|
2025-12-06 11:32:51 +11:00
|
|
|
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
|
|
|
{
|
2026-01-24 01:18:51 +01:00
|
|
|
match: /"text-xs\/normal".{0,300}?\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}className:\i.\i,.+?\})\)," "/,
|
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
|
|
|
]
|
|
|
|
|
},
|
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,
|
2025-12-22 01:40:58 +01:00
|
|
|
buildLayout: () => [],
|
2025-12-11 00:45:45 +01:00
|
|
|
StronglyDiscouragedCustomComponent: () => <Component />,
|
|
|
|
|
render: () => <Component />,
|
|
|
|
|
};
|
|
|
|
|
|
2025-12-22 01:40:58 +01:00
|
|
|
return {
|
2025-12-06 00:01:38 -05:00
|
|
|
key,
|
|
|
|
|
type: LayoutTypes.SIDEBAR_ITEM,
|
|
|
|
|
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-22 01:40:58 +01:00
|
|
|
};
|
2025-12-06 00:01:38 -05:00
|
|
|
},
|
|
|
|
|
|
2025-12-06 23:43:30 +01:00
|
|
|
getSettingsSectionMappings() {
|
2026-01-14 18:42:33 -05:00
|
|
|
return settingsSectionMap;
|
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
|
|
|
|
|
}),
|
2025-12-22 01:40:58 +01:00
|
|
|
...this.customEntries.map(buildEntry)
|
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-14 21:20:29 +01:00
|
|
|
useTitle: () => "Equicord Settings",
|
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;
|
|
|
|
|
},
|
|
|
|
|
|
2025-12-22 01:40:58 +01:00
|
|
|
customSections: [] as ((SectionTypes: Record<string, string>) => { section: string; element: ComponentType; label: string; id?: string; })[],
|
2025-12-06 11:32:51 +11:00
|
|
|
customEntries: [] as EntryOptions[],
|
2023-06-11 17:11:56 -04:00
|
|
|
|
2022-11-17 13:49:51 +01:00
|
|
|
get electronVersion() {
|
2025-12-22 01:40:58 +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 (
|
2025-12-22 01:40:58 +01:00
|
|
|
VencordNative.native.getVersions().chrome ??
|
|
|
|
|
// @ts-expect-error userAgentData types
|
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(
|
2025-12-22 01:40:58 +01:00
|
|
|
(b: { brand: string; }) => b.brand === "Chromium" || b.brand === "Google Chrome",
|
|
|
|
|
)?.version ??
|
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
|
|
|
null
|
|
|
|
|
);
|
2024-10-14 19:33:17 -04:00
|
|
|
} catch {
|
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 = "";
|
|
|
|
|
|
2026-01-20 12:37:48 -05:00
|
|
|
if (IS_DEV) version = "Dev Build";
|
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
|
|
|
});
|