Dashboard Redesign (#48)

* feat: add user_template setting

* style: header

* style: page padding

* style: header

* feat: header now time

* style: login page

* feat: nav indicator

* style: button inset shadow

* style: footer text size

* feat: header show login_ip

* fix: error toast

* fix: frontend_templates setting

* fix: lint

* feat: pr auto format

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: hamster1963 <hamster1963@users.noreply.github.com>
This commit is contained in:
仓鼠
2024-12-13 23:51:33 +08:00
committed by GitHub
co-authored by hamster1963
parent 811835ffe5
commit 540bb0185d
132 changed files with 13241 additions and 12877 deletions
+14 -12
View File
@@ -1,7 +1,3 @@
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import { z } from "zod"
import { Button } from "@/components/ui/button"
import {
Form,
@@ -13,9 +9,11 @@ import {
} from "@/components/ui/form"
import { Input } from "@/components/ui/input"
import { useAuth } from "@/hooks/useAuth"
import { zodResolver } from "@hookform/resolvers/zod"
import i18next from "i18next"
import { useForm } from "react-hook-form"
import { useTranslation } from "react-i18next"
import i18next from "i18next";
import { z } from "zod"
const formSchema = z.object({
username: z.string().min(2, {
@@ -23,10 +21,9 @@ const formSchema = z.object({
}),
password: z.string().min(1, {
message: i18next.t("Results.PasswordRequired"),
})
}),
})
function Login() {
const { login } = useAuth()
@@ -42,10 +39,10 @@ function Login() {
login(values.username, values.password)
}
const { t } = useTranslation();
const { t } = useTranslation()
return (
<div className="my-8 max-w-xl m-auto">
<div className="mt-28 max-w-sm m-auto">
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
<FormField
@@ -68,7 +65,12 @@ function Login() {
<FormItem>
<FormLabel>{t("Password")}</FormLabel>
<FormControl>
<Input type="password" placeholder="admin" autoComplete="current-password" {...field} />
<Input
type="password"
placeholder="admin"
autoComplete="current-password"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
@@ -81,4 +83,4 @@ function Login() {
)
}
export default Login;
export default Login