-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yang Li
committed
Jul 30, 2024
1 parent
7354386
commit d2d629f
Showing
11 changed files
with
111 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
"use client"; | ||
import Footer from "@/components/footer"; | ||
import { SYSTEM_ROLE } from "@/constants"; | ||
import { useRouter } from "next/navigation"; | ||
import { useState } from "react"; | ||
|
||
export default function Page() { | ||
const router = useRouter(); | ||
const [role, setRole] = useState<string>(SYSTEM_ROLE.NORMAL); | ||
|
||
const handleSelectChange = (e: any) => { | ||
setRole(e.target.value); | ||
}; | ||
const handleBtnClick = () => { | ||
router.push("/"); | ||
}; | ||
|
||
return ( | ||
<div className="bg-gradient-to-r from-rose-400 via-fuchsia-500 to-indigo-500 w-screen h-screen grid place-content-center"> | ||
<div className="card card-compact bg-base-100 w-96 shadow-xl flex items-center gap-8 p-10"> | ||
<div className="avatar"> | ||
<div className="w-20 rounded-full"> | ||
<img src="images/avatar.png" alt="avatar.png" /> | ||
</div> | ||
</div> | ||
<select | ||
className="select select-bordered w-full" | ||
onChange={handleSelectChange} | ||
value={role} | ||
> | ||
<option value={SYSTEM_ROLE.ADMIN}>{SYSTEM_ROLE.ADMIN}</option> | ||
<option value={SYSTEM_ROLE.NORMAL}>{SYSTEM_ROLE.NORMAL}</option> | ||
</select> | ||
{role === SYSTEM_ROLE.ADMIN && ( | ||
<input | ||
type="text" | ||
className="input input-bordered w-full" | ||
placeholder="password" | ||
/> | ||
)} | ||
<button className="btn w-full" type="button" onClick={handleBtnClick}> | ||
login | ||
</button> | ||
</div> | ||
<Footer /> | ||
</div> | ||
); | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import IDock from "@/components/dock"; | ||
import Footer from "@/components/footer"; | ||
import IMenu from "@/components/menu"; | ||
|
||
export default function Home() { | ||
return ( | ||
<div className="h-full flex flex-col"> | ||
<div className="container-bg"> | ||
<IMenu /> | ||
{/*<IDock />*/} | ||
<Footer /> | ||
<IDock /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
export default function () { | ||
return ( | ||
<div className="absolute bottom-0 left-[50%] translate-x-[-50%] text-center w-fulltext-[15px] text-[#fff] text-xs"> | ||
<p className="flex items-center justify-center"> | ||
<span>Copyright @ 2024 Design by Young </span> | ||
<a | ||
target="_blank" | ||
rel="noreferrer" | ||
href=" https://beian.miit.gov.cn/" | ||
className="no-underline" | ||
> | ||
蜀ICP备2022005564号 | ||
</a> | ||
</p> | ||
<p className="h-[20px] grid place-content-center"> | ||
<a | ||
target="_blank" | ||
rel="noreferrer" | ||
href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=51082402000177" | ||
className="no-underline inline-block w-full" | ||
> | ||
川公网安备 51082402000177号 | ||
</a> | ||
</p> | ||
<div className="absolute bottom-5 w-full text-white text-sm tracking-wider flex items-center justify-center"> | ||
<span>Copyright @ 2024 Design by Young </span> | ||
<a | ||
target="_blank" | ||
rel="noreferrer" | ||
href=" https://beian.miit.gov.cn/" | ||
className="no-underline" | ||
> | ||
蜀ICP备2022005564号 | ||
</a> | ||
| ||
<a | ||
target="_blank" | ||
rel="noreferrer" | ||
href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=51082402000177" | ||
className="no-underline" | ||
> | ||
川公网安备 51082402000177号 | ||
</a> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export const SYSTEM_ROLE = { | ||
/* 管理员 */ | ||
ADMIN: "admin", | ||
/* 普通用户 */ | ||
NORMAL: "normal", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters