mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-19 03:00:49 +08:00
fix(oauth): use resolvedTheme for provider icons
This commit is contained in:
@@ -54,7 +54,7 @@ const getIcon = (icon: string | { light: string; dark: string }, theme: 'light'
|
|||||||
export function OAuthPage() {
|
export function OAuthPage() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { showNotification } = useNotificationStore();
|
const { showNotification } = useNotificationStore();
|
||||||
const { theme } = useThemeStore();
|
const resolvedTheme = useThemeStore((state) => state.resolvedTheme);
|
||||||
const [states, setStates] = useState<Record<OAuthProvider, ProviderState>>({} as Record<OAuthProvider, ProviderState>);
|
const [states, setStates] = useState<Record<OAuthProvider, ProviderState>>({} as Record<OAuthProvider, ProviderState>);
|
||||||
const [iflowCookie, setIflowCookie] = useState<IFlowCookieState>({ cookie: '', loading: false });
|
const [iflowCookie, setIflowCookie] = useState<IFlowCookieState>({ cookie: '', loading: false });
|
||||||
const timers = useRef<Record<string, number>>({});
|
const timers = useRef<Record<string, number>>({});
|
||||||
@@ -229,7 +229,11 @@ export function OAuthPage() {
|
|||||||
<Card
|
<Card
|
||||||
title={
|
title={
|
||||||
<span className={styles.cardTitle}>
|
<span className={styles.cardTitle}>
|
||||||
<img src={getIcon(provider.icon, theme)} alt="" className={styles.cardTitleIcon} />
|
<img
|
||||||
|
src={getIcon(provider.icon, resolvedTheme)}
|
||||||
|
alt=""
|
||||||
|
className={styles.cardTitleIcon}
|
||||||
|
/>
|
||||||
{t(provider.titleKey)}
|
{t(provider.titleKey)}
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user