fix: use system as defaultTheme (#60)

* fix: use system as defaultTheme

* chore: auto-fix linting and formatting issues

* fix: AnimatedMan position on login page

* fix: login form overflow on mobile

* fix: theme selected value display overflow

* fix: dropdown menu username overflow

---------

Co-authored-by: hamster1963 <hamster1963@users.noreply.github.com>
This commit is contained in:
仓鼠
2024-12-17 21:51:16 +08:00
committed by GitHub
parent b0f09f4292
commit 896221e83e
5 changed files with 34 additions and 28 deletions

View File

@@ -18,6 +18,7 @@ import {
import { useAuth } from "@/hooks/useAuth"
import { useMainStore } from "@/hooks/useMainStore"
import { useMediaQuery } from "@/hooks/useMediaQuery"
import { cn } from "@/lib/utils"
import i18next from "i18next"
import { LogOut, Settings, User2 } from "lucide-react"
import { DateTime } from "luxon"
@@ -72,7 +73,12 @@ export default function Header() {
<NavigationMenu className="flex flex-col items-start relative max-w-5xl mx-auto">
{!disableAnimatedMan && (
<img
className="absolute -right-0 z-[9999] top-11 w-20 scale-100 pointer-events-none"
className={cn(
"absolute right-0 z-[9999] top-11 w-20 scale-100 pointer-events-none",
{
"top-2 right-4": location.pathname === "/dashboard/login",
},
)}
alt={"animated-man"}
src={"/dashboard/animated-man.webp"}
/>
@@ -110,7 +116,7 @@ export default function Header() {
</Avatar>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-32">
<DropdownMenuLabel>
<DropdownMenuLabel className="break-all">
{profile.username}
</DropdownMenuLabel>
<DropdownMenuSeparator />

View File

@@ -22,7 +22,7 @@ enum OSTypes {
export const InstallCommandsMenu = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
const [copy, setCopy] = useState(false)
const {data: settings} = useSettings()
const { data: settings } = useSettings()
const { t } = useTranslation()
const switchState = async (type: number) => {