feat: dynamic auth providers

This commit is contained in:
DIYgod
2024-11-28 00:36:19 +08:00
parent 9819591f21
commit b031ce57b8
47 changed files with 110 additions and 136 deletions
@@ -1,6 +1,7 @@
import { FollowIcon } from "@follow/components/icons/follow.jsx"
import { MotionButtonBase } from "@follow/components/ui/button/index.js"
import { LoadingCircle } from "@follow/components/ui/loading/index.jsx"
import { authProvidersConfig } from "@follow/constants"
import { stopPropagation } from "@follow/utils/dom"
import clsx from "clsx"
import { AnimatePresence, m } from "framer-motion"
@@ -11,6 +12,7 @@ import { modalMontionConfig } from "~/components/ui/modal/stacked/constants"
import { useCurrentModal } from "~/components/ui/modal/stacked/hooks"
import type { LoginRuntime } from "~/lib/auth"
import { loginHandler } from "~/lib/auth"
import { useAuthProviders } from "~/queries/users"
interface LoginModalContentProps {
runtime?: LoginRuntime
@@ -22,6 +24,7 @@ export const LoginModalContent = (props: LoginModalContentProps) => {
const { canClose = true, runtime } = props
const { t } = useTranslation()
const { data: authProviders } = useAuthProviders()
const [loadingLockSet, _setLoadingLockSet] = useState<string>("")
@@ -60,46 +63,30 @@ export const LoginModalContent = (props: LoginModalContentProps) => {
</span>
</div>
<div className="flex flex-col gap-4">
<MotionButtonBase
className={clsx(
"center h-[48px] w-[320px] rounded-[8px] !bg-black font-sans text-base font-medium text-white hover:!bg-black/80 focus:!border-black/80 focus:!ring-black/80",
disabled && "pointer-events-none opacity-50",
"overflow-hidden",
)}
disabled={disabled}
onClick={() => {
loginHandler("github", runtime)
setLoadingLockSet("github")
window.analytics?.capture("login", {
type: "github",
})
}}
>
<LoginButtonContent isLoading={loadingLockSet === "github"}>
<i className="i-mgc-github-cute-fi mr-2 text-xl" />
{t("signin.continue_with_github")}
</LoginButtonContent>
</MotionButtonBase>
<MotionButtonBase
disabled={disabled}
className={clsx(
"center h-[48px] w-[320px] rounded-[8px] bg-blue-500 font-sans text-base font-medium text-white hover:bg-blue-500/90 focus:!border-blue-500/80 focus:!ring-blue-500/80",
disabled && "pointer-events-none opacity-50",
"overflow-hidden",
)}
onClick={() => {
loginHandler("google", runtime)
setLoadingLockSet("google")
window.analytics?.capture("login", {
type: "google",
})
}}
>
<LoginButtonContent isLoading={loadingLockSet === "google"}>
<i className="i-mgc-google-cute-fi mr-2 text-xl" />
{t("signin.continue_with_google")}
</LoginButtonContent>
</MotionButtonBase>
{Object.entries(authProviders || []).map(([key, provider]) => (
<MotionButtonBase
key={key}
className={clsx(
"center h-[48px] w-[320px] rounded-[8px] font-sans text-base font-medium text-white",
disabled && "pointer-events-none opacity-50",
"overflow-hidden",
authProvidersConfig[key]?.buttonClassName,
)}
disabled={disabled}
onClick={() => {
loginHandler(key, runtime)
setLoadingLockSet(key)
window.analytics?.capture("login", {
type: key,
})
}}
>
<LoginButtonContent isLoading={loadingLockSet === key}>
<i className={clsx("mr-2 text-xl", authProvidersConfig[key].iconClassName)} />{" "}
{t("signin.continue_with", { provider: provider.name })}
</LoginButtonContent>
</MotionButtonBase>
))}
</div>
</m.div>
</div>
+20
View File
@@ -1,3 +1,6 @@
import { getProviders } from "@hono/auth-js/react"
import { useQuery } from "@tanstack/react-query"
import { apiClient } from "~/lib/api-fetch"
import { defineQuery } from "~/lib/defineQuery"
@@ -10,3 +13,20 @@ export const users = {
return res.data
}),
}
export const useAuthProviders = () => {
return useQuery({
queryKey: ["providers"],
queryFn: () => getProviders(),
placeholderData: {
google: {
id: "google",
name: "Google",
},
github: {
id: "github",
name: "GitHub",
},
} as Awaited<ReturnType<typeof getProviders>>,
})
}
+19 -16
View File
@@ -1,9 +1,12 @@
import { UserAvatar } from "@client/components/ui/user-avatar"
import { apiClient } from "@client/lib/api-fetch"
import { LOGIN_CALLBACK_URL, loginHandler } from "@client/lib/auth"
import { useAuthProviders } from "@client/query/users"
import { Logo } from "@follow/components/icons/logo.jsx"
import { Button } from "@follow/components/ui/button/index.js"
import { authProvidersConfig } from "@follow/constants"
import { DEEPLINK_SCHEME } from "@follow/shared/constants"
import { cn } from "@follow/utils/utils"
import { SessionProvider, signIn, signOut, useSession } from "@hono/auth-js/react"
import { useCallback, useEffect, useRef, useState } from "react"
import { useTranslation } from "react-i18next"
@@ -25,6 +28,7 @@ function Login() {
const location = useLocation()
const urlParams = new URLSearchParams(location.search)
const provider = urlParams.get("provider")
const { data: authProviders } = useAuthProviders()
const isAuthenticated = status === "authenticated"
@@ -106,22 +110,21 @@ function Login() {
</div>
) : (
<>
<Button
buttonClassName="h-[48px] w-[320px] rounded-[8px] !bg-black font-sans text-base text-white hover:!bg-black/80 focus:!border-black/80 focus:!ring-black/80"
onClick={() => {
loginHandler("github")
}}
>
<i className="i-mgc-github-cute-fi mr-2 text-xl" /> {t("login.continueWithGitHub")}
</Button>
<Button
buttonClassName="h-[48px] w-[320px] rounded-[8px] bg-blue-500 font-sans text-base text-white hover:bg-blue-500/90 focus:!border-blue-500/80 focus:!ring-blue-500/80"
onClick={() => {
loginHandler("google")
}}
>
<i className="i-mgc-google-cute-fi mr-2 text-xl" /> {t("login.continueWithGoogle")}
</Button>
{Object.entries(authProviders || []).map(([key, provider]) => (
<Button
key={key}
buttonClassName={cn(
"h-[48px] w-[320px] rounded-[8px] font-sans text-base text-white hover:!bg-black/80 focus:!border-black/80 focus:!ring-black/80",
authProvidersConfig[key]?.buttonClassName,
)}
onClick={() => {
loginHandler(key)
}}
>
<i className={cn("mr-2 text-xl", authProvidersConfig[key].iconClassName)} />{" "}
{t("login.continueWith", { provider: provider.name })}
</Button>
))}
</>
)}
</div>
+18
View File
@@ -1,6 +1,7 @@
import { apiClient } from "@client/lib/api-fetch"
import { getHydrateData } from "@client/lib/helper"
import { capitalizeFirstLetter, isBizId, parseUrl } from "@follow/utils/utils"
import { getProviders } from "@hono/auth-js/react"
import { useQuery } from "@tanstack/react-query"
export const useUserSubscriptionsQuery = (userId: string | undefined) => {
@@ -55,3 +56,20 @@ export const useUserQuery = (handleOrId: string | undefined) => {
initialData: getHydrateData(`profiles.$get,query:id=${handleOrId}`),
})
}
export const useAuthProviders = () => {
return useQuery({
queryKey: ["providers"],
queryFn: () => getProviders(),
placeholderData: {
google: {
id: "google",
name: "Google",
},
github: {
id: "github",
name: "GitHub",
},
} as Awaited<ReturnType<typeof getProviders>>,
})
}
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path fill="#fff" fill-opacity=".01" d="M24 0v24H0V0z"/><path fill="#10161F" fill-rule="evenodd" d="M13.538 1.328a1.147 1.147 0 0 1 1.336 1.336 3.302 3.302 0 0 1-.89 1.72 3.302 3.302 0 0 1-1.72.89 1.147 1.147 0 0 1-1.336-1.336 3.302 3.302 0 0 1 .89-1.72 3.302 3.302 0 0 1 1.72-.89m-3.134 4.888c.66.277 1.106.457 1.615.457.51 0 .955-.18 1.616-.457.68-.286 1.616-.678 2.76-.486a6.213 6.213 0 0 1 2.254.825c.447.276 1.14.644 1.339 1.535.131.585-.11 1.124-.299 1.487-.204.392-.516.873-.88 1.432a2.788 2.788 0 0 0-.466 1.526c0 .687.253 1.312.671 1.792.336.384.678.764.99 1.168.253.329.495.692.548 1.114.08.642-.234 1.217-.515 1.77-.956 1.885-2.34 3.51-3.923 4.136-.532.21-1.087.183-1.526.116-.853-.13-1.704-.58-2.569-.58s-1.716.45-2.569.58c-.439.067-.994.095-1.526-.116-1.337-.529-2.523-1.768-3.423-3.238-.914-1.495-1.608-3.35-1.89-5.285-.241-1.646-.11-3.49.648-5.047.78-1.602 2.206-2.849 4.385-3.215 1.143-.192 2.079.2 2.76.486" clip-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

-2
View File
@@ -154,8 +154,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "تحديد كمقروء",
"sidebar.feed_column.context_menu.rename_category": "إعادة تسمية الفئة",
"sidebar.select_sort_method": "اختيار طريقة الترتيب",
"signin.continue_with_github": "المتابعة باستخدام GitHub",
"signin.continue_with_google": "المتابعة باستخدام Google",
"signin.sign_in_to": "تسجيل الدخول إلى",
"sync_indicator.disabled": "بسبب أسباب أمنية، تم تعطيل المزامنة.",
"sync_indicator.offline": "غير متصل",
-2
View File
@@ -158,8 +158,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "تحديد كمقروء",
"sidebar.feed_column.context_menu.rename_category": "إعادة تسمية الفئة",
"sidebar.select_sort_method": "اختر طريقة الترتيب",
"signin.continue_with_github": "متابعة باستخدام GitHub",
"signin.continue_with_google": "متابعة باستخدام Google",
"signin.sign_in_to": "تسجيل الدخول إلى",
"sync_indicator.disabled": "نظرًا لأسباب أمنية، تم تعطيل المزامنة.",
"sync_indicator.offline": "غير متصل",
-2
View File
@@ -158,8 +158,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "وضع علامة كمقروء",
"sidebar.feed_column.context_menu.rename_category": "إعادة تسمية الفئة",
"sidebar.select_sort_method": "اختر طريقة الفرز",
"signin.continue_with_github": "متابعة باستخدام GitHub",
"signin.continue_with_google": "متابعة باستخدام Google",
"signin.sign_in_to": "تسجيل الدخول إلى",
"sync_indicator.disabled": "بسبب أسباب أمنية، تم تعطيل المزامنة.",
"sync_indicator.offline": "غير متصل",
-2
View File
@@ -154,8 +154,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "وضع علامة كمقروء",
"sidebar.feed_column.context_menu.rename_category": "إعادة تسمية الفئة",
"sidebar.select_sort_method": "اختر طريقة الترتيب",
"signin.continue_with_github": "متابعة باستخدام GitHub",
"signin.continue_with_google": "متابعة باستخدام Google",
"signin.sign_in_to": "تسجيل الدخول إلى",
"sync_indicator.disabled": "بسبب الأسباب الأمنية، تم تعطيل المزامنة.",
"sync_indicator.offline": "غير متصل",
-2
View File
@@ -151,8 +151,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "تمييز كمقروء",
"sidebar.feed_column.context_menu.rename_category": "إعادة تسمية الفئة",
"sidebar.select_sort_method": "اختر طريقة الفرز",
"signin.continue_with_github": "المتابعة مع GitHub",
"signin.continue_with_google": "المتابعة مع Google",
"signin.sign_in_to": "تسجيل الدخول إلى",
"sync_indicator.disabled": "لأسباب أمنية، تم تعطيل المزامنة.",
"sync_indicator.offline": "غير متصل",
-2
View File
@@ -155,8 +155,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "وضع علامة كمقروء",
"sidebar.feed_column.context_menu.rename_category": "إعادة تسمية الفئة",
"sidebar.select_sort_method": "اختر طريقة الفرز",
"signin.continue_with_github": "المتابعة مع GitHub",
"signin.continue_with_google": "المتابعة مع Google",
"signin.sign_in_to": "تسجيل الدخول إلى",
"sync_indicator.disabled": "بسبب مخاوف الأمان، تم تعطيل المزامنة.",
"sync_indicator.offline": "غير متصل",
-2
View File
@@ -158,8 +158,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "Als gelesen markieren",
"sidebar.feed_column.context_menu.rename_category": "Kategorie umbenennen",
"sidebar.select_sort_method": "Sortiermethode auswählen",
"signin.continue_with_github": "Mit GitHub fortfahren",
"signin.continue_with_google": "Mit Google fortfahren",
"signin.sign_in_to": "Anmelden bei",
"sync_indicator.disabled": "Aus Sicherheitsgründen ist die Synchronisierung deaktiviert.",
"sync_indicator.offline": "Offline",
+1 -2
View File
@@ -338,8 +338,7 @@
"sidebar.feed_column.context_menu.rename_category_error": "Failed to rename category",
"sidebar.feed_column.context_menu.rename_category_success": "Category renamed successfully",
"sidebar.select_sort_method": "Select a sort method",
"signin.continue_with_github": "Continue with GitHub",
"signin.continue_with_google": "Continue with Google",
"signin.continue_with": "Continue with {{provider}}",
"signin.sign_in_to": "Sign in to",
"sync_indicator.disabled": "Due to security reasons, sync is disabled.",
"sync_indicator.offline": "Offline",
-2
View File
@@ -106,8 +106,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "Marcar como leído",
"sidebar.feed_column.context_menu.rename_category": "Renombrar categoría",
"sidebar.select_sort_method": "Seleccionar método de ordenamiento",
"signin.continue_with_github": "Iniciar sesión con GitHub",
"signin.continue_with_google": "Iniciar sesión con Google",
"signin.sign_in_to": "Iniciar sesión en",
"sync_indicator.offline": "Sin conexión",
"sync_indicator.synced": "Sincronizado con el servidor",
-2
View File
@@ -151,8 +151,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "Merkitse luetuksi",
"sidebar.feed_column.context_menu.rename_category": "Nimeä kategoria uudelleen",
"sidebar.select_sort_method": "Valitse lajittelutapa",
"signin.continue_with_github": "Jatka GitHubilla",
"signin.continue_with_google": "Jatka Googlella",
"signin.sign_in_to": "Kirjaudu sisään",
"sync_indicator.disabled": "Tietoturvasyistä synkronointi on poistettu käytöstä.",
"sync_indicator.offline": "Offline",
-2
View File
@@ -151,8 +151,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "Marquer comme lu",
"sidebar.feed_column.context_menu.rename_category": "Renommer la catégorie",
"sidebar.select_sort_method": "Sélectionnez une méthode de tri",
"signin.continue_with_github": "Continuer avec GitHub",
"signin.continue_with_google": "Continuer avec Google",
"signin.sign_in_to": "Se connecter à",
"sync_indicator.disabled": "Pour des raisons de sécurité, la synchronisation est désactivée.",
"sync_indicator.offline": "Hors ligne",
-2
View File
@@ -151,8 +151,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "Segna come letto",
"sidebar.feed_column.context_menu.rename_category": "Rinomina categoria",
"sidebar.select_sort_method": "Seleziona un metodo di ordinamento",
"signin.continue_with_github": "Continua con GitHub",
"signin.continue_with_google": "Continua con Google",
"signin.sign_in_to": "Accedi a",
"sync_indicator.disabled": "Per ragioni di sicurezza, la sincronizzazione è disabilitata.",
"sync_indicator.offline": "Offline",
-2
View File
@@ -334,8 +334,6 @@
"sidebar.feed_column.context_menu.rename_category_error": "カテゴリーのリネームに失敗しました",
"sidebar.feed_column.context_menu.rename_category_success": "カテゴリーのリネームに成功しました",
"sidebar.select_sort_method": "並べ替え方法を選択",
"signin.continue_with_github": "GitHub で続ける",
"signin.continue_with_google": "Google で続ける",
"signin.sign_in_to": "サインイン",
"sync_indicator.disabled": "セキュリティ上の理由により、同期は無効になっています。",
"sync_indicator.offline": "オフライン",
-2
View File
@@ -181,8 +181,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "읽음으로 표시",
"sidebar.feed_column.context_menu.rename_category": "카테고리 이름 변경",
"sidebar.select_sort_method": "정렬 방법 선택",
"signin.continue_with_github": "GitHub 으로 계속",
"signin.continue_with_google": "Google 로 계속",
"signin.sign_in_to": "로그인",
"sync_indicator.disabled": "보안상의 이유로 동기화가 비활성화되었습니다.",
"sync_indicator.offline": "오프라인",
-2
View File
@@ -151,8 +151,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "既読にする",
"sidebar.feed_column.context_menu.rename_category": "カテゴリーの名前を変更",
"sidebar.select_sort_method": "並べ替え方法を選択",
"signin.continue_with_github": "GitHub で続ける",
"signin.continue_with_google": "Google で続ける",
"signin.sign_in_to": "サインイン",
"sync_indicator.disabled": "セキュリティ上の理由により、同期は無効になっています。",
"sync_indicator.offline": "オフライン",
-2
View File
@@ -151,8 +151,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "Отметить как прочитанное",
"sidebar.feed_column.context_menu.rename_category": "Переименовать категорию",
"sidebar.select_sort_method": "Выберите метод сортировки",
"signin.continue_with_github": "Продолжить через GitHub",
"signin.continue_with_google": "Продолжить через Google",
"signin.sign_in_to": "Войти в",
"sync_indicator.disabled": "По соображениям безопасности синхронизация отключена.",
"sync_indicator.offline": "Офлайн",
-2
View File
@@ -182,8 +182,6 @@
"sidebar.feed_column.context_menu.mark_as_read": "Okundu olarak işaretle",
"sidebar.feed_column.context_menu.rename_category": "Kategoriyi yeniden adlandır",
"sidebar.select_sort_method": "Bir sıralama yöntemi seçin",
"signin.continue_with_github": "GitHub ile devam et",
"signin.continue_with_google": "Google ile devam et",
"signin.sign_in_to": "Giriş yap",
"sync_indicator.disabled": "Güvenlik nedeniyle senkronizasyon devre dışı bırakıldı.",
"sync_indicator.offline": "Çevrimdışı",
-2
View File
@@ -333,8 +333,6 @@
"sidebar.feed_column.context_menu.rename_category_error": "重命名分类失败",
"sidebar.feed_column.context_menu.rename_category_success": "分类重命名成功",
"sidebar.select_sort_method": "选择排序方法",
"signin.continue_with_github": "使用 GitHub 登录",
"signin.continue_with_google": "使用 Google 登录",
"signin.sign_in_to": "登录到",
"sync_indicator.disabled": "出于安全原因,已禁用同步",
"sync_indicator.offline": "离线",
-2
View File
@@ -333,8 +333,6 @@
"sidebar.feed_column.context_menu.rename_category_error": "重命名分類失敗",
"sidebar.feed_column.context_menu.rename_category_success": "分類已成功重命名",
"sidebar.select_sort_method": "選擇排序方法",
"signin.continue_with_github": "繼續使用 GitHub",
"signin.continue_with_google": "繼續使用 Google",
"signin.sign_in_to": "登入至",
"sync_indicator.disabled": "由於安全原因,同步已禁用。",
"sync_indicator.offline": "離線",
-2
View File
@@ -333,8 +333,6 @@
"sidebar.feed_column.context_menu.rename_category_error": "重命名類別失敗",
"sidebar.feed_column.context_menu.rename_category_success": "類別重命名成功",
"sidebar.select_sort_method": "選擇排序方式",
"signin.continue_with_github": "繼續使用 GitHub",
"signin.continue_with_google": "繼續使用 Google",
"signin.sign_in_to": "登入",
"sync_indicator.disabled": "由於安全原因,同步功能已停用。",
"sync_indicator.offline": "離線",
-2
View File
@@ -15,8 +15,6 @@
"invitation.getCodeMessage": "يمكنك الحصول على رمز دعوة من خلال الطرق التالية:",
"invitation.title": "رمز الدعوة",
"login.backToWebApp": "العودة إلى تطبيق الويب",
"login.continueWithGitHub": "تابع مع GitHub",
"login.continueWithGoogle": "تابع مع Google",
"login.logInTo": "تسجيل الدخول إلى",
"login.openApp": "افتح التطبيق",
"login.redirecting": "إعادة التوجيه",
-2
View File
@@ -15,8 +15,6 @@
"invitation.getCodeMessage": "يمكنك الحصول على رمز دعوة من خلال الطرق التالية:",
"invitation.title": "رمز الدعوة",
"login.backToWebApp": "العودة إلى تطبيق الويب",
"login.continueWithGitHub": "تابع مع GitHub",
"login.continueWithGoogle": "تابع مع Google",
"login.logInTo": "تسجيل الدخول إلى",
"login.openApp": "افتح التطبيق",
"login.redirecting": "إعادة التوجيه",
-2
View File
@@ -15,8 +15,6 @@
"invitation.getCodeMessage": "يمكنك الحصول على رمز دعوة عبر الطرق التالية:",
"invitation.title": "رمز الدعوة",
"login.backToWebApp": "العودة إلى التطبيق على الويب",
"login.continueWithGitHub": "المتابعة باستخدام GitHub",
"login.continueWithGoogle": "المتابعة باستخدام Google",
"login.logInTo": "تسجيل الدخول إلى ",
"login.openApp": "فتح التطبيق",
"login.redirecting": "إعادة التوجيه",
-2
View File
@@ -15,8 +15,6 @@
"invitation.getCodeMessage": "يمكنك الحصول على رمز دعوة من خلال الطرق التالية:",
"invitation.title": "رمز الدعوة",
"login.backToWebApp": "العودة إلى تطبيق الويب",
"login.continueWithGitHub": "المتابعة باستخدام GitHub",
"login.continueWithGoogle": "المتابعة باستخدام Google",
"login.logInTo": "تسجيل الدخول إلى",
"login.openApp": "فتح التطبيق",
"login.redirecting": "إعادة التوجيه",
-2
View File
@@ -18,8 +18,6 @@
"invitation.getCodeMessage": "يمكنك الحصول على رمز دعوة من خلال الطرق التالية:",
"invitation.title": "رمز الدعوة",
"login.backToWebApp": "العودة إلى تطبيق الويب",
"login.continueWithGitHub": "المتابعة باستخدام GitHub",
"login.continueWithGoogle": "المتابعة باستخدام Google",
"login.logInTo": "تسجيل الدخول إلى ",
"login.openApp": "افتح التطبيق",
"login.redirecting": "جاري إعادة التوجيه",
-2
View File
@@ -18,8 +18,6 @@
"invitation.getCodeMessage": "يمكنك الحصول على رمز دعوة من خلال الطرق التالية:",
"invitation.title": "رمز الدعوة",
"login.backToWebApp": "العودة إلى تطبيق الويب",
"login.continueWithGitHub": "تابع مع GitHub",
"login.continueWithGoogle": "تابع مع Google",
"login.logInTo": "تسجيل الدخول إلى",
"login.openApp": "افتح التطبيق",
"login.redirecting": "إعادة التوجيه",
-2
View File
@@ -15,8 +15,6 @@
"invitation.getCodeMessage": "You can get an invitation code through the following ways:",
"invitation.title": "Invitation Code",
"login.backToWebApp": "Back to the web app",
"login.continueWithGitHub": "Continue with GitHub",
"login.continueWithGoogle": "Continue with Google",
"login.logInTo": "Log in to ",
"login.openApp": "Open app",
"login.redirecting": "Redirecting",
+1 -2
View File
@@ -31,8 +31,7 @@
"invitation.getCodeMessage": "You can get an invitation code in the following ways:",
"invitation.title": "Invitation Code",
"login.backToWebApp": "Back To Web App",
"login.continueWithGitHub": "Continue with GitHub",
"login.continueWithGoogle": "Continue with Google",
"login.continueWith": "Continue with {{provider}}",
"login.logInTo": "Log in to ",
"login.openApp": "Open App",
"login.redirecting": "Redirecting",
-2
View File
@@ -15,8 +15,6 @@
"invitation.getCodeMessage": "Puedes obtener un código de invitación de las siguientes maneras:",
"invitation.title": "Código de Invitación",
"login.backToWebApp": "Volver a la aplicación web",
"login.continueWithGitHub": "Continuar con GitHub",
"login.continueWithGoogle": "Continuar con Google",
"login.logInTo": "Iniciar sesión en ",
"login.openApp": "Abrir aplicación",
"login.redirecting": "Redirigiendo",
-2
View File
@@ -15,8 +15,6 @@
"invitation.getCodeMessage": "Voit saada kutsukoodin seuraavilla tavoilla:",
"invitation.title": "Kutsukoodi",
"login.backToWebApp": "Takaisin verkkosovellukseen",
"login.continueWithGitHub": "Jatka GitHubilla",
"login.continueWithGoogle": "Jatka Googlella",
"login.logInTo": "Kirjaudu sisään ",
"login.openApp": "Avaa sovellus",
"login.redirecting": "Uudelleenohjataan",
-2
View File
@@ -17,8 +17,6 @@
"invitation.getCodeMessage": "Vous pouvez obtenir un code d'invitation de la manière suivante :",
"invitation.title": "Code d'invitation",
"login.backToWebApp": "Retour à l'application web",
"login.continueWithGitHub": "Continuer avec GitHub",
"login.continueWithGoogle": "Continuer avec Google",
"login.logInTo": "Se connecter à",
"login.openApp": "Ouvrir l'application",
"login.redirecting": "Redirection",
-2
View File
@@ -15,8 +15,6 @@
"invitation.getCodeMessage": "Puoi ottenere un codice di invito nei seguenti modi:",
"invitation.title": "Codice di Invito",
"login.backToWebApp": "Torna all'App Web",
"login.continueWithGitHub": "Continua con GitHub",
"login.continueWithGoogle": "Continua con Google",
"login.logInTo": "Accedi a",
"login.openApp": "Apri App",
"login.redirecting": "Reindirizzamento in corso",
-2
View File
@@ -31,8 +31,6 @@
"invitation.getCodeMessage": "以下の方法で招待コードを入手できます:",
"invitation.title": "招待コード",
"login.backToWebApp": "ウェブアプリに戻る",
"login.continueWithGitHub": "GitHub で続行",
"login.continueWithGoogle": "Google で続行",
"login.logInTo": "ログイン ",
"login.openApp": "アプリを開く",
"login.redirecting": "リダイレクト中",
-2
View File
@@ -21,8 +21,6 @@
"invitation.getCodeMessage": "다음 방법을 통해 초대 코드를 얻을 수 있습니다:",
"invitation.title": "초대 코드",
"login.backToWebApp": "웹 앱으로 돌아가기",
"login.continueWithGitHub": "GitHub 으로 계속",
"login.continueWithGoogle": "Google 로 계속",
"login.logInTo": "로그인",
"login.openApp": "앱 열기",
"login.redirecting": "리디렉션 중",
-2
View File
@@ -17,8 +17,6 @@
"invitation.getCodeMessage": "Pode obter um código de convite das seguintes maneiras:",
"invitation.title": "Código de Convite",
"login.backToWebApp": "Voltar à App Web",
"login.continueWithGitHub": "Continuar com GitHub",
"login.continueWithGoogle": "Continuar com Google",
"login.logInTo": "Iniciar sessão em ",
"login.openApp": "Abrir Aplicação",
"login.redirecting": "A redirecionar",
-2
View File
@@ -15,8 +15,6 @@
"invitation.getCodeMessage": "Вы можете получить пригласительный код следующими способами:",
"invitation.title": "Пригласительный код",
"login.backToWebApp": "Вернуться к веб-приложению",
"login.continueWithGitHub": "Продолжить через GitHub",
"login.continueWithGoogle": "Продолжить через Google",
"login.logInTo": "Войти в ",
"login.openApp": "Открыть приложение",
"login.redirecting": "Перенаправление",
-2
View File
@@ -21,8 +21,6 @@
"invitation.getCodeMessage": "Aşağıdaki yollarla bir davet kodu alabilirsiniz:",
"invitation.title": "Davet Kodu",
"login.backToWebApp": "Web Uygulamasına Geri Dön",
"login.continueWithGitHub": "GitHub ile devam et",
"login.continueWithGoogle": "Google ile devam et",
"login.logInTo": "Giriş yap ",
"login.openApp": "Uygulamayı Aç",
"login.redirecting": "Yönlendiriliyor",
-2
View File
@@ -31,8 +31,6 @@
"invitation.getCodeMessage": "通过以下方式获取:",
"invitation.title": "邀请码",
"login.backToWebApp": "返回网页版",
"login.continueWithGitHub": "使用 GitHub 继续",
"login.continueWithGoogle": "使用 Google 继续",
"login.logInTo": "登录到 ",
"login.openApp": "打开应用",
"login.redirecting": "正在重定向",
-2
View File
@@ -31,8 +31,6 @@
"invitation.getCodeMessage": "你可以通過以下方式獲取邀請碼:",
"invitation.title": "邀請碼",
"login.backToWebApp": "返回網頁應用程式",
"login.continueWithGitHub": "繼續使用 GitHub",
"login.continueWithGoogle": "繼續使用 Googl",
"login.logInTo": "登錄到",
"login.openApp": "打開應用程式",
"login.redirecting": "重定向中",
-2
View File
@@ -31,8 +31,6 @@
"invitation.getCodeMessage": "您可以通過以下方式獲取邀請碼:",
"invitation.title": "邀請碼",
"login.backToWebApp": "返回網頁應用程式",
"login.continueWithGitHub": "繼續使用 GitHub",
"login.continueWithGoogle": "繼續使用 Google",
"login.logInTo": "登入至 ",
"login.openApp": "開啟應用程式",
"login.redirecting": "正在重定向",
+22
View File
@@ -0,0 +1,22 @@
export const authProvidersConfig = {
google: {
buttonClassName:
"bg-blue-500 hover:!bg-blue-500/90 focus:!border-blue-500/80 focus:!ring-blue-500/80",
iconClassName: "i-mgc-google-cute-fi",
},
github: {
buttonClassName: "bg-black hover:!bg-black/90 focus:!border-black/80 focus:!ring-black/80",
iconClassName: "i-mgc-github-cute-fi",
},
apple: {
buttonClassName:
"bg-gray-800 hover:!bg-gray-800/90 focus:!border-gray-800/80 focus:!ring-gray-800/80",
iconClassName: "i-mgc-apple-cute-fi",
},
} as Record<
string,
{
buttonClassName: string
iconClassName: string
}
>
+1
View File
@@ -1,2 +1,3 @@
export * from "./auth-providers"
export * from "./enums"
export * from "./tabs"