From d8fe9f0c76426ac681eca5cfcd7222f00d3a5f6c Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 5 Dec 2025 21:44:29 +0100 Subject: [PATCH 1/7] fix some text being wrong colour --- src/components/Heading.css | 2 +- src/components/settings/QuickAction.css | 2 +- src/components/settings/tabs/plugins/components/styles.css | 4 ++-- src/plugins/serverListIndicators/index.tsx | 4 ++-- src/plugins/spotifyControls/spotifyStyles.css | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Heading.css b/src/components/Heading.css index 2b101250c..3eddc40e7 100644 --- a/src/components/Heading.css +++ b/src/components/Heading.css @@ -7,7 +7,7 @@ .vc-h3, .vc-h4, .vc-h5 { - color: var(--header-secondary); + color: var(--header-primary); } .vc-h1 { diff --git a/src/components/settings/QuickAction.css b/src/components/settings/QuickAction.css index 8b94bd2d4..ba582106b 100644 --- a/src/components/settings/QuickAction.css +++ b/src/components/settings/QuickAction.css @@ -15,7 +15,7 @@ .vc-settings-quickActions-pill { all: unset; background: var(--button-secondary-background); - color: var(--header-secondary); + color: var(--text-default); display: flex; align-items: center; gap: 0.5em; diff --git a/src/components/settings/tabs/plugins/components/styles.css b/src/components/settings/tabs/plugins/components/styles.css index 9d72554e3..100c1d4c6 100644 --- a/src/components/settings/tabs/plugins/components/styles.css +++ b/src/components/settings/tabs/plugins/components/styles.css @@ -27,9 +27,9 @@ } .vc-plugins-setting-description { - color: var(--header-secondary); + color: var(--text-default); } .vc-plugins-setting-error { color: var(--text-danger); -} +} \ No newline at end of file diff --git a/src/plugins/serverListIndicators/index.tsx b/src/plugins/serverListIndicators/index.tsx index 7648bc2d0..17a11a37d 100644 --- a/src/plugins/serverListIndicators/index.tsx +++ b/src/plugins/serverListIndicators/index.tsx @@ -55,7 +55,7 @@ function FriendsIndicator() { width: "100%", fontSize: "12px", fontWeight: "600", - color: "var(--header-secondary)", + color: "var(--text-default)", textTransform: "uppercase", textAlign: "center", }}> @@ -79,7 +79,7 @@ function ServersIndicator() { width: "100%", fontSize: "12px", fontWeight: "600", - color: "var(--header-secondary)", + color: "var(--text-default)", textTransform: "uppercase", textAlign: "center", }}> diff --git a/src/plugins/spotifyControls/spotifyStyles.css b/src/plugins/spotifyControls/spotifyStyles.css index e9dfeffde..03cdfbe0b 100644 --- a/src/plugins/spotifyControls/spotifyStyles.css +++ b/src/plugins/spotifyControls/spotifyStyles.css @@ -149,7 +149,7 @@ } .vc-spotify-comma { - color: var(--header-secondary); + color: var(--text-default); } .vc-spotify-artist[role="link"]:hover, From b8ab6a74702c32c504963085c37a5684c8ca58da Mon Sep 17 00:00:00 2001 From: VV <44335189+vvareo@users.noreply.github.com> Date: Sat, 6 Dec 2025 11:32:51 +1100 Subject: [PATCH 2/7] support new Settings UI (#3803) Co-authored-by: Vendicated --- src/components/Icons.tsx | 98 +++++++ src/components/settings/tabs/BaseTab.tsx | 9 +- .../settings/tabs/patchHelper/index.tsx | 2 +- .../settings/tabs/plugins/index.tsx | 2 +- .../tabs/sync/BackupAndRestoreTab.tsx | 2 +- .../settings/tabs/sync/CloudTab.tsx | 6 +- src/components/settings/tabs/themes/index.tsx | 4 +- .../settings/tabs/updater/index.tsx | 4 +- .../settings/tabs/vencord/index.tsx | 2 +- src/plugins/_core/settings.tsx | 256 +++++++++++++++--- src/utils/constants.ts | 4 + 11 files changed, 333 insertions(+), 56 deletions(-) diff --git a/src/components/Icons.tsx b/src/components/Icons.tsx index 40cb15c9d..eede9559e 100644 --- a/src/components/Icons.tsx +++ b/src/components/Icons.tsx @@ -444,3 +444,101 @@ export function PlaceholderIcon(props: IconProps) { ); } + +export function MainSettingsIcon(props: IconProps) { + return ( + + + + ); +} + +export function PluginsIcon(props: IconProps) { + return ( + + + + ); +} + +export function CloudIcon(props: IconProps) { + return ( + + + + ); +} + +export function BackupRestoreIcon(props: IconProps) { + return ( + + + + ); +} + +export function UpdaterIcon(props: IconProps) { + return ( + + + + ); +} + +export function PatchHelperIcon(props: IconProps) { + return ( + + + + ); +} + +export function VesktopSettingsIcon(props: IconProps) { + return ( + + + + ); +} diff --git a/src/components/settings/tabs/BaseTab.tsx b/src/components/settings/tabs/BaseTab.tsx index 5d9914c3d..b4c0ebb53 100644 --- a/src/components/settings/tabs/BaseTab.tsx +++ b/src/components/settings/tabs/BaseTab.tsx @@ -16,20 +16,15 @@ * along with this program. If not, see . */ -import { BaseText } from "@components/BaseText"; import ErrorBoundary from "@components/ErrorBoundary"; import { handleComponentFailed } from "@components/handleComponentFailed"; -import { Margins } from "@utils/margins"; import { ModalCloseButton, ModalContent, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { onlyOnce } from "@utils/onlyOnce"; import type { ComponentType, PropsWithChildren } from "react"; -export function SettingsTab({ title, children }: PropsWithChildren<{ title: string; }>) { +export function SettingsTab({ children }: PropsWithChildren) { return ( -
- {title} - {children} -
+
{children}
); } diff --git a/src/components/settings/tabs/patchHelper/index.tsx b/src/components/settings/tabs/patchHelper/index.tsx index 2d33a0293..bd99f5c8b 100644 --- a/src/components/settings/tabs/patchHelper/index.tsx +++ b/src/components/settings/tabs/patchHelper/index.tsx @@ -104,7 +104,7 @@ function PatchHelper() { } return ( - + Full patch + diff --git a/src/components/settings/tabs/sync/BackupAndRestoreTab.tsx b/src/components/settings/tabs/sync/BackupAndRestoreTab.tsx index e4e8b001f..447c1f442 100644 --- a/src/components/settings/tabs/sync/BackupAndRestoreTab.tsx +++ b/src/components/settings/tabs/sync/BackupAndRestoreTab.tsx @@ -27,7 +27,7 @@ import { Button, Text } from "@webpack/common"; function BackupAndRestoreTab() { return ( - + Warning diff --git a/src/components/settings/tabs/sync/CloudTab.tsx b/src/components/settings/tabs/sync/CloudTab.tsx index 73526bcdb..bab67a7fd 100644 --- a/src/components/settings/tabs/sync/CloudTab.tsx +++ b/src/components/settings/tabs/sync/CloudTab.tsx @@ -96,10 +96,8 @@ function CloudTab() { const settings = useSettings(["cloud.authenticated", "cloud.url"]); return ( - +
- Cloud Settings - Vencord comes with a cloud integration that adds goodies like settings sync across devices. It respects your privacy, and @@ -118,7 +116,7 @@ function CloudTab() { settings.cloud.authenticated = v; }} /> - Backend URL + Backend URL Which backend to use when using cloud integrations. diff --git a/src/components/settings/tabs/themes/index.tsx b/src/components/settings/tabs/themes/index.tsx index 7d2234459..2bc5e81eb 100644 --- a/src/components/settings/tabs/themes/index.tsx +++ b/src/components/settings/tabs/themes/index.tsx @@ -37,7 +37,7 @@ function ThemesTab() { const [currentTab, setCurrentTab] = useState(ThemeTab.LOCAL); return ( - + + Themes are not supported on the Userscript! diff --git a/src/components/settings/tabs/updater/index.tsx b/src/components/settings/tabs/updater/index.tsx index 935f66125..c238d0772 100644 --- a/src/components/settings/tabs/updater/index.tsx +++ b/src/components/settings/tabs/updater/index.tsx @@ -44,9 +44,7 @@ function Updater() { }; return ( - - Updater Settings - + + {isDonor(user?.id) ? ( . */ -import { Settings } from "@api/Settings"; +import { definePluginSettings } from "@api/Settings"; +import { BackupRestoreIcon, CloudIcon, MainSettingsIcon, PaintbrushIcon, PatchHelperIcon, PlaceholderIcon, PluginsIcon, UpdaterIcon, VesktopSettingsIcon } from "@components/Icons"; import { BackupAndRestoreTab, CloudTab, PatchHelperTab, PluginsTab, ThemesTab, UpdaterTab, VencordTab } from "@components/settings/tabs"; import { Devs } from "@utils/constants"; import { getIntlMessage } from "@utils/discord"; -import definePlugin, { OptionType } from "@utils/types"; +import { isTruthy } from "@utils/guards"; +import definePlugin, { IconProps, OptionType } from "@utils/types"; +import { waitFor } from "@webpack"; import { React } from "@webpack/common"; +import type { ComponentType, PropsWithChildren, ReactNode } from "react"; import gitHash from "~git-hash"; -type SectionType = "HEADER" | "DIVIDER" | "CUSTOM"; -type SectionTypes = Record; +let LayoutTypes = { + SECTION: 1, + SIDEBAR_ITEM: 2, + PANEL: 3, + PANE: 4 +}; +waitFor(["SECTION", "SIDEBAR_ITEM", "PANEL", "PANE"], v => LayoutTypes = v); + +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; + useLabel?(): string; + useTitle?(): string; + buildLayout?(): SettingsLayoutNode[]; + icon?(): ReactNode; + render?(): ReactNode; +} + +interface EntryOptions { + key: string, + title: string, + panelTitle?: string, + Component: ComponentType<{}>, + Icon: ComponentType; +} +interface SettingsLayoutBuilder { + key?: string; + buildLayout(): SettingsLayoutNode[]; +} + +const settings = definePluginSettings({ + settingsLocation: { + type: OptionType.SELECT, + description: "Where to put the Vencord settings section", + 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; }[] + } +}); export default definePlugin({ name: "Settings", @@ -34,19 +96,28 @@ export default definePlugin({ authors: [Devs.Ven, Devs.Megu], required: true, + settings, + patches: [ { find: ".versionHash", replacement: [ { - match: /\.info.+?\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/, - replace: (m, component, props) => { + 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})`; + return `${m},$self.makeInfoElements(${component},${props}).map(e=>${makeRow}e})),`; } }, { - match: /copyValue:\i\.join\(" "\)/, + match: /\.info.+?\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/, + replace: (m, component, props) => { + props = props.replace(/children:\[.+\]/, ""); + return `${m},$self.makeInfoElements(${component},${props})`; + } + }, + { + match: /copyValue:\i\.join\(" "\)/g, replace: "$& + $self.getInfoString()" } ] @@ -73,15 +144,147 @@ export default definePlugin({ } }, { - find: "2025-09-user-settings-redesign-1", + find: ".buildLayout().map", replacement: { - match: /enabled:![01],showLegacyOpen:/g, - replace: "enabled:false,showLegacyOpen:" + match: /(\i)\.buildLayout\(\)(?=\.map)/, + replace: "$self.buildLayout($1)" } } ], + buildEntry(options: EntryOptions): SettingsLayoutNode { + const { key, title, panelTitle = title, Component, Icon } = options; + + return ({ + key, + type: LayoutTypes.SIDEBAR_ITEM, + legacySearchKey: title.toUpperCase(), + useTitle: () => title, + icon: () => , + buildLayout: () => [ + { + key: key + "_panel", + type: LayoutTypes.PANEL, + useTitle: () => panelTitle, + buildLayout: () => [ + { + key: key + "_pane", + type: LayoutTypes.PANE, + buildLayout: () => [], + render: () => , + useTitle: () => panelTitle + } + ] + } + ] + }); + }, + + buildLayout(originalLayoutBuilder: SettingsLayoutBuilder) { + const layout = originalLayoutBuilder.buildLayout(); + if (originalLayoutBuilder.key !== "$Root") return layout; + if (!Array.isArray(layout)) return layout; + + if (layout.some(s => s?.key === "vencord_section")) return layout; + + const { buildEntry } = this; + + const vencordEntries: SettingsLayoutNode[] = [ + buildEntry({ + key: "vencord_main", + title: "Vencord", + panelTitle: "Vencord Settings", + Component: VencordTab, + Icon: MainSettingsIcon + }), + buildEntry({ + key: "vencord_plugins", + title: "Plugins", + Component: PluginsTab, + Icon: PluginsIcon + }), + buildEntry({ + key: "vencord_themes", + title: "Themes", + Component: ThemesTab, + Icon: PaintbrushIcon + }), + !IS_UPDATER_DISABLED && UpdaterTab && buildEntry({ + key: "vencord_updater", + title: "Updater", + panelTitle: "Vencord Updater", + Component: UpdaterTab, + Icon: UpdaterIcon + }), + buildEntry({ + key: "vencord_cloud", + title: "Cloud", + panelTitle: "Vencord Cloud", + Component: CloudTab, + Icon: CloudIcon + }), + buildEntry({ + key: "vencord_backup_restore", + title: "Backup & Restore", + Component: BackupAndRestoreTab, + Icon: BackupRestoreIcon + }), + IS_DEV && PatchHelperTab && buildEntry({ + key: "vencord_patch_helper", + 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); + if (Object.values(FallbackSectionTypes).includes(section)) return null; + + return buildEntry({ + key: `vencord_deprecated_custom_${section}`, + title: label, + Component: element, + Icon: section === "Vesktop" ? VesktopSettingsIcon : PlaceholderIcon + }); + }) + ].filter(isTruthy); + + const vencordSection: SettingsLayoutNode = { + key: "vencord_section", + type: LayoutTypes.SECTION, + useLabel: () => "Vencord", + buildLayout: () => vencordEntries + }; + + const { settingsLocation } = settings.store; + + const places: Record = { + 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; + } + + layout.splice(idx, 0, vencordSection); + + return layout; + }, + + /** @deprecated Use customEntries */ customSections: [] as ((SectionTypes: SectionTypes) => any)[], + customEntries: [] as EntryOptions[], makeSettingsCategories(SectionTypes: SectionTypes) { return [ @@ -139,12 +342,12 @@ export default definePlugin({ ].filter(Boolean); }, - isRightSpot({ header, settings }: { header?: string; settings?: string[]; }) { - const firstChild = settings?.[0]; + isRightSpot({ header, settings: s }: { header?: string; settings?: string[]; }) { + const firstChild = s?.[0]; // lowest two elements... sanity backup if (firstChild === "LOGOUT" || firstChild === "SOCIAL_LINKS") return true; - const { settingsLocation } = Settings.plugins.Settings; + const { settingsLocation } = settings.store; if (settingsLocation === "bottom") return firstChild === "LOGOUT"; if (settingsLocation === "belowActivity") return firstChild === "CHANGELOG"; @@ -152,7 +355,7 @@ export default definePlugin({ if (!header) return; try { - const names = { + const names: Record, string> = { top: getIntlMessage("USER_SETTINGS"), aboveNitro: getIntlMessage("BILLING_SETTINGS"), belowNitro: getIntlMessage("APP_SETTINGS"), @@ -182,31 +385,12 @@ export default definePlugin({ return (...args: any[]) => { const elements = originalHook(...args); if (!this.patchedSettings.has(elements)) - elements.unshift(...this.makeSettingsCategories({ - HEADER: "HEADER", - DIVIDER: "DIVIDER", - CUSTOM: "CUSTOM" - })); + elements.unshift(...this.makeSettingsCategories(FallbackSectionTypes)); return elements; }; }, - options: { - settingsLocation: { - type: OptionType.SELECT, - description: "Where to put the Vencord settings section", - 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" }, - ] - }, - }, - get electronVersion() { return VencordNative.native.getVersions().electron || window.legcord?.electron || null; }, @@ -245,7 +429,7 @@ export default definePlugin({ return "\n" + this.getInfoRows().join("\n"); }, - makeInfoElements(Component: React.ComponentType, props: React.PropsWithChildren) { + makeInfoElements(Component: ComponentType, props: PropsWithChildren) { return this.getInfoRows().map((text, i) => {text} ); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 737c5eb9a..e864c651e 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -612,6 +612,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ alfred: { name: "alfred", id: 1038466644353232967n + }, + vv: { + name: "VV", + id: 254866377087778816n } } satisfies Record); From b07db6c50016778a160f7cd2cd0466ef66f67c37 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 5 Dec 2025 16:37:42 -0800 Subject: [PATCH 3/7] SendTimestamps: support s and S timestamp formats (#3792) --- src/plugins/sendTimestamps/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/sendTimestamps/index.tsx b/src/plugins/sendTimestamps/index.tsx index a136e9c8f..579656c45 100644 --- a/src/plugins/sendTimestamps/index.tsx +++ b/src/plugins/sendTimestamps/index.tsx @@ -48,7 +48,7 @@ function parseTime(time: string) { return ``; } -const Formats = ["", "t", "T", "d", "D", "f", "F", "R"] as const; +const Formats = ["", "t", "T", "d", "D", "f", "F", "s", "S", "R"] as const; type Format = typeof Formats[number]; const cl = classNameFactory("vc-st-"); From 3ea80c254ae3676828fd4dc31e30aed831182848 Mon Sep 17 00:00:00 2001 From: nin0 Date: Fri, 5 Dec 2025 19:45:04 -0500 Subject: [PATCH 4/7] LastFmRPC: ignore custom status (#3814) --- src/plugins/lastfmRichPresence/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/lastfmRichPresence/index.tsx b/src/plugins/lastfmRichPresence/index.tsx index fdfa3f3ed..b6164b196 100644 --- a/src/plugins/lastfmRichPresence/index.tsx +++ b/src/plugins/lastfmRichPresence/index.tsx @@ -243,7 +243,7 @@ export default definePlugin({ async getActivity(): Promise { if (settings.store.hideWithActivity) { - if (PresenceStore.getActivities(AuthenticationStore.getId()).some(a => a.application_id !== DISCORD_APP_ID)) { + if (PresenceStore.getActivities(AuthenticationStore.getId()).some(a => a.application_id !== DISCORD_APP_ID && a.type !== ActivityType.CUSTOM_STATUS)) { return null; } } From 192d6a2237a4aa3138872ce244b1274de6c794cf Mon Sep 17 00:00:00 2001 From: thororen <78185467+thororen1234@users.noreply.github.com> Date: Fri, 5 Dec 2025 20:33:17 -0500 Subject: [PATCH 5/7] ShikiCodeBlocks: Update assets (#3785) Co-authored-by: V --- .../shikiCodeblocks.desktop/api/languages.ts | 31 +++++++++++-------- .../shikiCodeblocks.desktop/api/themes.ts | 10 ++++-- .../shikiCodeblocks.desktop/devicon.css | 2 +- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/plugins/shikiCodeblocks.desktop/api/languages.ts b/src/plugins/shikiCodeblocks.desktop/api/languages.ts index baf7a5481..140d9c530 100644 --- a/src/plugins/shikiCodeblocks.desktop/api/languages.ts +++ b/src/plugins/shikiCodeblocks.desktop/api/languages.ts @@ -18,11 +18,12 @@ import { ILanguageRegistration } from "@vap/shiki"; -export const VPC_REPO = "Vap0r1ze/vapcord"; -export const VPC_REPO_COMMIT = "4d0e4b420fb1e4358852bbd18c804a6f5e54c0d7"; -export const vpcRepoAssets = `https://raw.githubusercontent.com/${VPC_REPO}/${VPC_REPO_COMMIT}/assets/shiki-codeblocks`; -export const vpcRepoGrammar = (fileName: string) => `${vpcRepoAssets}/${fileName}`; -export const vpcRepoLanguages = `${vpcRepoAssets}/languages.json`; +import { SHIKI_REPO, SHIKI_REPO_COMMIT } from "./themes"; + +export const JSON_REPO = "Vencord/ShikiPluginAssets"; +export const JSON_REPO_COMMIT = "75d69df9fdf596a31eef8b7f6f891231a6feab44"; +export const JSON_URL = `https://cdn.jsdelivr.net/gh/${JSON_REPO}@${JSON_REPO_COMMIT}/grammars.json`; +export const shikiRepoGrammar = (name: string) => `https://cdn.jsdelivr.net/gh/${SHIKI_REPO}@${SHIKI_REPO_COMMIT}/packages/tm-grammars/grammars/${name}.json`; export interface Language { name: string; @@ -36,22 +37,26 @@ export interface Language { } export interface LanguageJson { name: string; - id: string; - fileName: string; - devicon?: string; + displayName: string; scopeName: string; + devicon?: string; aliases?: string[]; } export const languages: Record = {}; export const loadLanguages = async () => { - const langsJson: LanguageJson[] = await fetch(vpcRepoLanguages).then(res => res.ok ? res.json() : []); + const langsJson: LanguageJson[] = await fetch(JSON_URL).then(res => res.ok ? res.json() : []); const loadedLanguages = Object.fromEntries( - langsJson.map(lang => [lang.id, { - ...lang, - grammarUrl: vpcRepoGrammar(lang.fileName), - }]) + langsJson.map(lang => { + const { name, displayName, ...rest } = lang; + return [name, { + ...rest, + id: name, + name: displayName, + grammarUrl: shikiRepoGrammar(name), + }]; + }) ); Object.assign(languages, loadedLanguages); }; diff --git a/src/plugins/shikiCodeblocks.desktop/api/themes.ts b/src/plugins/shikiCodeblocks.desktop/api/themes.ts index bc1dd184d..4c2f8b682 100644 --- a/src/plugins/shikiCodeblocks.desktop/api/themes.ts +++ b/src/plugins/shikiCodeblocks.desktop/api/themes.ts @@ -19,8 +19,8 @@ import { IShikiTheme } from "@vap/shiki"; export const SHIKI_REPO = "shikijs/textmate-grammars-themes"; -export const SHIKI_REPO_COMMIT = "2d87559c7601a928b9f7e0f0dda243d2fb6d4499"; -export const shikiRepoTheme = (name: string) => `https://raw.githubusercontent.com/${SHIKI_REPO}/${SHIKI_REPO_COMMIT}/packages/tm-themes/themes/${name}.json`; +export const SHIKI_REPO_COMMIT = "bc5436518111d87ea58eb56d97b3f9bec30e6b83"; +export const shikiRepoTheme = (name: string) => `https://cdn.jsdelivr.net/gh/${SHIKI_REPO}@${SHIKI_REPO_COMMIT}/packages/tm-themes/themes/${name}.json`; export const themes = { // Default @@ -48,6 +48,12 @@ export const themes = { GithubLightDefault: shikiRepoTheme("github-light-default"), GithubLightHighContrast: shikiRepoTheme("github-light-high-contrast"), GithubLight: shikiRepoTheme("github-light"), + GruvBoxDarkHard: shikiRepoTheme("gruvbox-dark-hard"), + GruvBoxDarkMedium: shikiRepoTheme("gruvbox-dark-medium"), + GruvBoxDarkSoft: shikiRepoTheme("gruvbox-dark-soft"), + GruvBoxLightHard: shikiRepoTheme("gruvbox-light-hard"), + GruvBoxLightMedium: shikiRepoTheme("gruvbox-light-medium"), + GruvBoxLightSoft: shikiRepoTheme("gruvbox-light-soft"), Houston: shikiRepoTheme("houston"), KanagawaDragon: shikiRepoTheme("kanagawa-dragon"), KanagawaLotus: shikiRepoTheme("kanagawa-lotus"), diff --git a/src/plugins/shikiCodeblocks.desktop/devicon.css b/src/plugins/shikiCodeblocks.desktop/devicon.css index ed1014e38..be0893f09 100644 --- a/src/plugins/shikiCodeblocks.desktop/devicon.css +++ b/src/plugins/shikiCodeblocks.desktop/devicon.css @@ -1 +1 @@ -@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css"); +@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.17.0/devicon.min.css"); \ No newline at end of file From 9aa3f380333e9bf9f170126c8bd7de94400c4e61 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 6 Dec 2025 02:41:37 +0100 Subject: [PATCH 6/7] PreviewMessage, SendTimestamps: add chat bar button in split view --- src/api/ChatButtons.tsx | 5 +++-- src/plugins/previewMessage/index.tsx | 7 +++---- src/plugins/sendTimestamps/index.tsx | 4 ++-- src/plugins/translate/TranslateIcon.tsx | 4 ++-- src/plugins/translate/settings.ts | 5 ----- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/api/ChatButtons.tsx b/src/api/ChatButtons.tsx index 52052a528..c2a1a1982 100644 --- a/src/api/ChatButtons.tsx +++ b/src/api/ChatButtons.tsx @@ -79,7 +79,7 @@ export interface ChatBarProps { }; } -export type ChatBarButtonFactory = (props: ChatBarProps & { isMainChat: boolean; }) => JSX.Element | null; +export type ChatBarButtonFactory = (props: ChatBarProps & { isMainChat: boolean; isAnyChat: boolean; }) => JSX.Element | null; export type ChatBarButtonData = { render: ChatBarButtonFactory; /** @@ -98,13 +98,14 @@ const logger = new Logger("ChatButtons"); function VencordChatBarButtons(props: ChatBarProps) { const { chatBarButtons } = useSettings(["uiElements.chatBarButtons.*"]).uiElements; + const { analyticsName } = props.type; return ( <> {Array.from(ChatBarButtonMap) .filter(([key]) => chatBarButtons[key]?.enabled !== false) .map(([key, { render: Button }]) => ( logger.error(`Failed to render ${key}`, e.error)}> -