mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-05-06 05:38:51 +00:00
improve: add missing try-catch cases (#86)
* improve: add missing try-catch cases * i18n: support german * chore: auto-fix linting and formatting issues --------- Co-authored-by: uubulb <uubulb@users.noreply.github.com>
This commit is contained in:
@@ -120,7 +120,7 @@ function Login() {
|
||||
<div className="mt-3 flex flex-col space-y-2">
|
||||
{settingData?.config?.oauth2_providers?.map((p: string) => (
|
||||
<Button
|
||||
className="w-full rounded-lg shadow-[inset_0_1px_0_rgba(255,255,255,0.2)] bg-muted text-primary hover:bg-muted/80 hover:text-primary/80"
|
||||
className="w-full rounded-lg shadow-[inset_0_1px_0_rgba(255,255,255,0.2)] bg-muted text-primary hover:bg-muted/80 hover:text-primary/80 mb-3"
|
||||
onClick={() => loginWith(p)}
|
||||
>
|
||||
{p === "GitHub" && <GitHubIcon className="-mt-[1px] size-4" />}
|
||||
|
||||
@@ -118,14 +118,18 @@ export default function ProfilePage() {
|
||||
</section>
|
||||
{profile.oauth2_bind?.[provider.toLowerCase()] ? (
|
||||
<Button
|
||||
className="w-fit bg-red-600 hover:bg-red-500 dark:text-white rounded-lg shadow-[inset_0_1px_0_rgba(255,255,255,0.2)]"
|
||||
className="w-fit bg-red-600 hover:bg-red-500 dark:text-white rounded-lg shadow-[inset_0_1px_0_rgba(255,255,255,0.2)] my-1"
|
||||
size="sm"
|
||||
onClick={() => unbindO2(provider)}
|
||||
>
|
||||
Unbind
|
||||
</Button>
|
||||
) : (
|
||||
<Button size="sm" onClick={() => bindO2(provider)}>
|
||||
<Button
|
||||
className="my-1"
|
||||
size="sm"
|
||||
onClick={() => bindO2(provider)}
|
||||
>
|
||||
Bind
|
||||
</Button>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user