From 41ad6d73b3fca2d46b923543a63c483c57cc17ad Mon Sep 17 00:00:00 2001 From: Innei Date: Thu, 27 Nov 2025 00:48:01 +0800 Subject: [PATCH] feat: update SignInPanel to use dynamic icons for login providers - Replaced static icon rendering with a new LoginPlatfoIcon component that dynamically renders icons based on the provider. - Added SVG support for Google login icon and maintained the GitHub icon. - Cleaned up CSS comments related to icon sources. Signed-off-by: Innei --- .../modules/social/comments/SignInPanel.tsx | 35 ++++++++++++++++++- apps/web/src/styles/index.css | 4 +-- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/apps/web/src/modules/social/comments/SignInPanel.tsx b/apps/web/src/modules/social/comments/SignInPanel.tsx index eda74f24..a27bd613 100644 --- a/apps/web/src/modules/social/comments/SignInPanel.tsx +++ b/apps/web/src/modules/social/comments/SignInPanel.tsx @@ -33,7 +33,7 @@ export const SignInPanel = () => { className="bg-material-medium hover:bg-material-light flex h-9 w-9 items-center justify-center rounded-full border border-white/10 text-white transition" aria-label={t('comments.signInWith', { provider: provider.name })} > - + {provider.name} ))} @@ -41,3 +41,36 @@ export const SignInPanel = () => { ) } + +const LoginPlatfoIcon = ({ provider, className }: { provider: string; className?: string }) => { + switch (provider) { + case 'github': { + return + } + case 'google': { + return ( + + + + + + + ) + } + default: { + return null + } + } +} diff --git a/apps/web/src/styles/index.css b/apps/web/src/styles/index.css index c5da90ac..155fbcdd 100644 --- a/apps/web/src/styles/index.css +++ b/apps/web/src/styles/index.css @@ -37,6 +37,6 @@ body { background: theme(colors.zinc.100); } } - +/* @source inline('i-simple-icons-github'); -@source inline('i-simple-icons-google'); +@source inline('i-simple-icons-google'); */