Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep provider badge initials readable on light accent colors #11643

ClosedMnigos(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/11643/headopened View on GitHub

Showing 4 changed files with 51 additions and 7 deletions (loading 1).

x
0 of 4 viewed, 4 left
7 additions and 2 deletionsapps/mobile/src/components/ProviderIcon.tsxModified
View file
@@ -1,7 +1,10 @@
import { Image } from "expo-image";
import { Path, Svg } from "react-native-svg";
import { View } from "react-native";
-import { providerInstanceInitials } from "@t3tools/client-runtime/state/provider-instance-display";
+import {
+ providerAccentForegroundColor,
+ providerInstanceInitials,
+} from "@t3tools/client-runtime/state/provider-instance-display";
import { useState } from "react";
import { resolveOfficialAcpRegistryIconUrl } from "@t3tools/contracts";
import { useAppearancePreferences } from "../features/settings/appearance/AppearancePreferencesProvider";
@@ -200,7 +203,9 @@
fontSize: 7,
fontWeight: "600",
lineHeight: 9,
- color: props.accentColor ? "#ffffff" : undefined,
+ color: props.accentColor
+ ? providerAccentForegroundColor(props.accentColor)
+ : undefined,
{providerInstanceInitials(props.displayName)}
9 additions and 5 deletionsapps/web/src/components/chat/ProviderInstanceIcon.tsxModified
View file
@@ -1,6 +1,9 @@
import { type CSSProperties, memo } from "react";
​
-import { providerInstanceInitials } from "@t3tools/client-runtime/state/provider-instance-display";