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:
UUBulb
2025-01-03 22:43:36 +08:00
committed by GitHub
parent 290459997c
commit f93d266810
17 changed files with 123 additions and 6996 deletions
+1 -1
View File
@@ -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" />}
+6 -2
View File
@@ -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>
)}