ChannelTabs: Themeing Fix

This commit is contained in:
thororen1234 2026-03-01 21:32:06 -05:00
parent 33cc2a07c5
commit e4329abb4e
No known key found for this signature in database
2 changed files with 22 additions and 15 deletions

View file

@ -13,7 +13,7 @@ import { getGuildAcronym, getIntlMessage, getUniqueUsername } from "@utils/disco
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import { Channel, Guild, User } from "@vencord/discord-types"; import { Channel, Guild, User } from "@vencord/discord-types";
import { findComponentByCodeLazy, findCssClassesLazy } from "@webpack"; import { findComponentByCodeLazy, findCssClassesLazy } from "@webpack";
import { Avatar, ChannelStore, ContextMenuApi, GuildStore, PresenceStore, ReadStateStore, TypingStore, useDrag, useDrop, useEffect, useRef, UserStore, useState, useStateFromStores } from "@webpack/common"; import { Avatar, ChannelStore, ContextMenuApi, GuildStore, PresenceStore, ReadStateStore, ThemeStore, TypingStore, useDrag, useDrop, useEffect, useRef, UserStore, useState, useStateFromStores } from "@webpack/common";
import { JSX } from "react"; import { JSX } from "react";
import { TabContextMenu } from "./ContextMenus"; import { TabContextMenu } from "./ContextMenus";
@ -428,19 +428,21 @@ export default function ChannelTab(props: ChannelTabsProps & { index: number; })
// check if quests running (questify momentLet) // check if quests running (questify momentLet)
const hasActiveQuests = activeQuestIntervals.size > 0; const hasActiveQuests = activeQuestIntervals.size > 0;
console.log(ThemeStore.theme);
return <div return <div
className={cl("tab", { className={cl("tab",
"tab-compact": compact, ThemeStore.theme === "light" ? "light-theme" : "dark-theme",
"tab-selected": isTabSelected(id), {
"tab-entering": isEntering, "tab-compact": compact,
"tab-closing": isClosing, "tab-selected": isTabSelected(id),
"tab-dragging": isDragging, "tab-entering": isEntering,
"tab-drop-target": isDropTarget, "tab-closing": isClosing,
"tab-nitro": channelId === "__nitro__", "tab-dragging": isDragging,
"tab-quests-active": channelId === "__quests__" && hasActiveQuests, "tab-drop-target": isDropTarget,
wider: settings.store.widerTabsAndBookmarks "tab-nitro": channelId === "__nitro__",
})} "tab-quests-active": channelId === "__quests__" && hasActiveQuests,
wider: settings.store.widerTabsAndBookmarks
})}
key={index} key={index}
ref={ref} ref={ref}
onMouseEnter={() => setIsHovered(true)} onMouseEnter={() => setIsHovered(true)}

View file

@ -294,11 +294,16 @@
} }
/* stylelint-disable-next-line no-descending-specificity */ /* stylelint-disable-next-line no-descending-specificity */
.vc-channeltabs-tab-selected .vc-channeltabs-name-text { .vc-channeltabs-dark-theme.vc-channeltabs-tab-selected .vc-channeltabs-name-text {
font-weight: 600; font-weight: 600;
color: var(--white-500); color: var(--white-500);
} }
/* stylelint-disable-next-line no-descending-specificity */
.vc-channeltabs-light-theme.vc-channeltabs-tab-selected .vc-channeltabs-name-text {
font-weight: 600;
}
.vc-channeltabs-tab-selected .vc-channeltabs-guild-acronym-icon span { .vc-channeltabs-tab-selected .vc-channeltabs-guild-acronym-icon span {
color: var(--white-500); color: var(--white-500);
} }