refactor: update color scheme from vibrancy to text-secondary across multiple components

- Replaced instances of 'text-theme-vibrancyFg' with 'text-text-secondary' for improved consistency in styling.
- Adjusted padding and margin in ModalInternal and other components for better layout.
- Removed vibrancy color definitions from tailwind and CSS files to streamline the color palette.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-04-23 15:29:22 +08:00
parent 755c12b4f4
commit a41b695e75
15 changed files with 20 additions and 35 deletions
@@ -328,7 +328,7 @@ export const ModalInternal = memo(
{...modalMontionConfig}
animate={animateController}
className={cn(
"relative flex flex-col overflow-hidden rounded-lg p-2",
"relative flex flex-col overflow-hidden rounded-lg px-2 pt-2",
opaque
? "bg-theme-modal-background-opaque"
: "bg-theme-modal-background backdrop-blur-sm",
@@ -381,9 +381,9 @@ export const ModalInternal = memo(
</Dialog.DialogClose>
)}
</div>
<div className="my-2 h-px w-full shrink-0 bg-slate-200 dark:bg-neutral-800" />
<div className="mt-2 h-px w-full shrink-0 bg-slate-200 dark:bg-neutral-800" />
<div className="-mx-2 min-h-0 shrink grow overflow-auto px-6 py-2">
<div className="-mx-2 min-h-0 shrink grow overflow-auto px-6 py-4">
<ModalContext modalContextProps={ModalContextProps} isTop={!!isTop}>
{finalChildren}
</ModalContext>
@@ -206,7 +206,7 @@ export const AchievementModalContent: FC = () => {
<div className="mt-4 text-xl font-bold">{t("words.achievement")}</div>
<small className="text-theme-vibrancyFg mt-1 gap-1">
<small className="text-text-secondary mt-1 gap-1">
{t("achievement.description")}
<sup className="inline-block translate-y-1 text-xs">*</sup>
</small>
@@ -102,7 +102,7 @@ const ViewTabs = ({ onViewChange }: { onViewChange?: (view: number) => void }) =
return (
<div
className="text-theme-vibrancyFg flex w-full shrink items-center justify-between gap-4 overflow-x-auto overflow-y-hidden text-xl"
className="text-text-secondary flex w-full shrink items-center justify-between gap-4 overflow-x-auto overflow-y-hidden text-xl"
onClick={stopPropagation}
>
{views.map((item) => (
@@ -38,7 +38,7 @@ export function FeedColumnMobile({ asWidget }: { asWidget?: boolean }) {
<div className="center inline-flex">
<Link to="/discover" tabIndex={-1}>
<ActionButton shortcut="Meta+T" tooltip={t("words.discover")}>
<i className="i-mgc-add-cute-re text-theme-vibrancyFg size-5" />
<i className="i-mgc-add-cute-re text-text-secondary size-5" />
</ActionButton>
</Link>
</div>
@@ -52,7 +52,7 @@ export const BoostModalContent = ({ feedId }: { feedId: string }) => {
}
return (
<div className="flex w-full flex-col gap-3 lg:w-[80vw] lg:max-w-[350px]">
<div className="flex w-full flex-col gap-3 lg:max-h-[700px] lg:w-[80vw] lg:max-w-[450px]">
<div className="center flex flex-col gap-2">
<FeedIcon noMargin feed={feed} size={50} />
@@ -65,7 +65,7 @@ export const BoostModalContent = ({ feedId }: { feedId: string }) => {
</h1>
</div>
<div className="relative flex w-full grow flex-col items-center gap-3">
<small className="center text-theme-vibrancyFg -mt-1 mb-2 gap-1">
<small className="center text-text-secondary -mt-1 mb-2 max-w-prose gap-1 text-balance text-center">
{t("boost.boost_feed_description")}
</small>
@@ -48,7 +48,7 @@ export const RadioCards = ({
<h3 className="text-sm font-medium leading-none">
{dayjs.duration(item.value, "months").humanize()}
</h3>
<p className="text-theme-vibrancyFg mt-1 flex items-center justify-center gap-1 text-xs leading-none">
<p className="text-text-secondary mt-1 flex items-center justify-center gap-1 text-xs leading-none">
{item.value * monthlyBoostCost}
<i className="i-mgc-power text-accent" />
</p>
@@ -200,7 +200,7 @@ export function GuideModalContent({ onClose }: { onClose: () => void }) {
{title}
</h1>
{!!guideSteps[step - 1]!.description && (
<div className="text-theme-vibrancyFg mx-auto mt-4 flex max-w-prose justify-center text-center text-sm">
<div className="text-text-secondary mx-auto mt-4 flex max-w-prose justify-center text-center text-sm">
<Markdown className="prose max-w-[100ch] text-left text-sm">
{guideSteps[step - 1]!.description!}
</Markdown>
@@ -215,7 +215,7 @@ const FeedListImpl = forwardRef<HTMLDivElement, { className?: string; view: numb
<StarredItem view={view} />
{hasListData && (
<>
<div className="text-theme-vibrancyFg mt-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors">
<div className="text-text-secondary mt-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors">
{t("words.lists")}
</div>
<SortByAlphabeticalList view={view} data={listsData} />
@@ -223,7 +223,7 @@ const FeedListImpl = forwardRef<HTMLDivElement, { className?: string; view: numb
)}
{hasInboxData && (
<>
<div className="text-theme-vibrancyFg mt-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors">
<div className="text-text-secondary mt-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors">
{t("words.inbox")}
</div>
<SortByAlphabeticalInbox view={view} data={inboxesData} />
@@ -232,7 +232,7 @@ const FeedListImpl = forwardRef<HTMLDivElement, { className?: string; view: numb
{(hasListData || hasInboxData) && (
<div
className={cn(
"text-theme-vibrancyFg mb-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors",
"text-text-secondary mb-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors",
Object.keys(feedsData).length === 0 ? "mt-0" : "mt-1",
)}
>
@@ -54,7 +54,7 @@ const FeedListImpl = ({ className, view }: { className?: string; view: number })
<StarredItem view={view} />
{hasListData && (
<>
<div className="text-theme-vibrancyFg mt-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors">
<div className="text-text-secondary mt-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors">
{t("words.lists")}
</div>
<SortByAlphabeticalList view={view} data={listsData} />
@@ -62,7 +62,7 @@ const FeedListImpl = ({ className, view }: { className?: string; view: number })
)}
{hasInboxData && (
<>
<div className="text-theme-vibrancyFg mt-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors">
<div className="text-text-secondary mt-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors">
{t("words.inbox")}
</div>
<SortByAlphabeticalInbox view={view} data={inboxesData} />
@@ -73,7 +73,7 @@ const FeedListImpl = ({ className, view }: { className?: string; view: number })
{(hasListData || hasInboxData) && (
<div
className={cn(
"text-theme-vibrancyFg mb-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors",
"text-text-secondary mb-1 flex h-6 w-full shrink-0 items-center rounded-md px-2.5 text-xs font-semibold transition-colors",
Object.keys(feedsData).length === 0 ? "mt-0" : "mt-1",
)}
>
@@ -66,7 +66,7 @@ export const ListHeader = ({ view }: { view: number }) => {
>
{view !== undefined && t(views[view]!.name, { ns: "common" })}
</div>
<div className="lg:!text-theme-vibrancyFg ml-2 flex items-center gap-3 text-base text-zinc-400 lg:text-sm dark:text-zinc-600">
<div className="lg:!text-text-secondary ml-2 flex items-center gap-3 text-base text-zinc-400 lg:text-sm dark:text-zinc-600">
<SortButton />
{expansion ? (
<i
@@ -73,7 +73,7 @@ export const TimelineColumnHeader = memo(() => {
<div className="relative flex items-center gap-2" onClick={stopPropagation}>
<Link to="/discover" tabIndex={-1}>
<ActionButton shortcut="Meta+T" tooltip={t("words.discover")}>
<i className="i-mgc-add-cute-re text-theme-vibrancyFg size-5" />
<i className="i-mgc-add-cute-re text-text-secondary size-5" />
</ActionButton>
</Link>
<SearchTrigger />
@@ -116,7 +116,7 @@ const LayoutActionButton = () => {
!feedColumnShow
? "i-mgc-layout-leftbar-open-cute-re"
: "i-mgc-layout-leftbar-close-cute-re",
"text-theme-vibrancyFg",
"text-text-secondary",
)}
/>
)
@@ -154,7 +154,7 @@ export function FeedColumn({ children, className }: PropsWithChildren<{ classNam
)}
<div className="relative mb-4 mt-3">
<div className="text-theme-vibrancyFg flex h-11 justify-between gap-0 px-3 text-xl">
<div className="text-text-secondary flex h-11 justify-between gap-0 px-3 text-xl">
{timelineList.map((timelineId) => (
<TimelineSwitchButton key={timelineId} timelineId={timelineId} />
))}
-3
View File
@@ -57,9 +57,6 @@ const twConfig = {
"950": "#451505",
},
vibrancyFg: "hsl(var(--fo-vibrancy-foreground) / <alpha-value>)",
vibrancyBg: "var(--fo-vibrancy-background)",
item: {
active: "var(--fo-item-active)",
hover: "var(--fo-item-hover)",
@@ -2,9 +2,6 @@
:root {
--fo-a: 21.6 100% 50%;
--fo-vibrancy-background: theme(colors.native.active);
--fo-vibrancy-foreground: 0 0% 45%;
--fo-text-primary: 0 0% 10%;
--fo-item-active: theme(colors.zinc.400/0.3);
@@ -35,9 +32,6 @@
:root {
--fo-a: 21.6 100% 50%;
--fo-vibrancy-foreground: 0 0% 83%;
--fo-vibrancy-background: theme(colors.native.active);
--fo-text-primary: 0 0% 80%;
--fo-item-active: theme(colors.neutral.600/0.4);
-6
View File
@@ -1,9 +1,6 @@
[data-theme="light"] {
--fo-a: 21.6 100% 50%;
--fo-vibrancy-background: theme(colors.native.active);
--fo-vibrancy-foreground: 0 0% 45%;
--fo-text-primary: 0 0% 10%;
--fo-item-active: theme(colors.zinc.400/0.3);
@@ -27,9 +24,6 @@
[data-theme="dark"] {
--fo-a: 21.6 100% 50%;
--fo-vibrancy-foreground: 0 0% 83%;
--fo-vibrancy-background: theme(colors.native.active);
--fo-text-primary: 0 0% 80%;
--fo-item-active: theme(colors.neutral.600/0.4);