From 9f97a4ddd5c14e10926d99df2016ece587ed52b1 Mon Sep 17 00:00:00 2001 From: Stavros Date: Fri, 12 Sep 2025 14:57:26 +0300 Subject: [PATCH] feat: add some default icons --- frontend/src/components/icons/microsoft.tsx | 18 ++++++++++++++++ frontend/src/components/icons/pocket-id.tsx | 20 +++++++++++++++++ frontend/src/components/icons/tailscale.tsx | 24 +++++++++++++++++++++ frontend/src/pages/login-page.tsx | 16 +++++++++++++- 4 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/icons/microsoft.tsx create mode 100644 frontend/src/components/icons/pocket-id.tsx create mode 100644 frontend/src/components/icons/tailscale.tsx diff --git a/frontend/src/components/icons/microsoft.tsx b/frontend/src/components/icons/microsoft.tsx new file mode 100644 index 0000000..58d470c --- /dev/null +++ b/frontend/src/components/icons/microsoft.tsx @@ -0,0 +1,18 @@ +import type { SVGProps } from "react"; + +export function MicrosoftIcon(props: SVGProps) { + return ( + + + + + + + ); +} diff --git a/frontend/src/components/icons/pocket-id.tsx b/frontend/src/components/icons/pocket-id.tsx new file mode 100644 index 0000000..cd0d017 --- /dev/null +++ b/frontend/src/components/icons/pocket-id.tsx @@ -0,0 +1,20 @@ +import type { SVGProps } from "react"; + +export function PocketIDIcon(props: SVGProps) { + return ( + + + + + ); +} diff --git a/frontend/src/components/icons/tailscale.tsx b/frontend/src/components/icons/tailscale.tsx new file mode 100644 index 0000000..3f7a15a --- /dev/null +++ b/frontend/src/components/icons/tailscale.tsx @@ -0,0 +1,24 @@ +import type { SVGProps } from "react"; + +export function TailscaleIcon(props: SVGProps) { + return ( + + + + + + ); +} diff --git a/frontend/src/pages/login-page.tsx b/frontend/src/pages/login-page.tsx index 9db1087..3354b2d 100644 --- a/frontend/src/pages/login-page.tsx +++ b/frontend/src/pages/login-page.tsx @@ -1,5 +1,10 @@ import { LoginForm } from "@/components/auth/login-form"; +import { GithubIcon } from "@/components/icons/github"; +import { GoogleIcon } from "@/components/icons/google"; +import { MicrosoftIcon } from "@/components/icons/microsoft"; import { OAuthIcon } from "@/components/icons/oauth"; +import { PocketIDIcon } from "@/components/icons/pocket-id"; +import { TailscaleIcon } from "@/components/icons/tailscale"; import { Card, CardHeader, @@ -20,6 +25,14 @@ import { useTranslation } from "react-i18next"; import { Navigate, useLocation } from "react-router"; import { toast } from "sonner"; +const iconMap: Record = { + google: , + github: , + tailscale: , + microsoft: , + pocketid: , +}; + export const LoginPage = () => { const { isLoggedIn } = useUserContext(); const { providers, title, oauthAutoRedirect } = useAppContext(); @@ -141,8 +154,9 @@ export const LoginPage = () => {
{oauthProviders.map((provider) => ( } + icon={iconMap[provider.id] ?? } className="w-full" onClick={() => oauthMutation.mutate(provider.id)} loading={