auth form: fix border style and add theme toggle

This commit is contained in:
henrygd
2025-08-28 21:17:44 -04:00
parent cce74246ee
commit b084814aea
3 changed files with 19 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ import { $router } from "../router"
import { AuthMethodsList } from "pocketbase" import { AuthMethodsList } from "pocketbase"
import { useTheme } from "../theme-provider" import { useTheme } from "../theme-provider"
import { pb } from "@/lib/api" import { pb } from "@/lib/api"
import { ModeToggle } from "../mode-toggle"
export default function () { export default function () {
const page = useStore($router) const page = useStore($router)
@@ -50,8 +51,11 @@ export default function () {
<div <div
className="grid gap-5 w-full px-4 mx-auto" className="grid gap-5 w-full px-4 mx-auto"
// @ts-ignore // @ts-ignore
style={{ maxWidth: "22em", "--border": theme == "light" ? "30 8% 80%" : "220 3% 20%" }} style={{ maxWidth: "22em", "--border": theme == "light" ? "hsl(30, 8%, 70%)" : "hsl(220, 3%, 25%)" }}
> >
<div className="absolute top-3 right-3">
<ModeToggle />
</div>
<div className="text-center"> <div className="text-center">
<h1 className="mb-3"> <h1 className="mb-3">
<Logo className="h-7 fill-foreground mx-auto" /> <Logo className="h-7 fill-foreground mx-auto" />

View File

@@ -2,21 +2,19 @@ import * as React from "react"
import { cn } from "@/lib/utils" import { cn } from "@/lib/utils"
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {} function Input({ className, type, ...props }: React.ComponentProps<"input">) {
const Input = React.forwardRef<HTMLInputElement, InputProps>(({ className, type, ...props }, ref) => {
return ( return (
<input <input
type={type} type={type}
data-slot="input"
className={cn( className={cn(
"flex h-10 w-full rounded-md border bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", "flex h-10 w-full rounded-md border bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
className className
)} )}
ref={ref}
{...props} {...props}
/> />
) )
}) }
Input.displayName = "Input"
export { Input } export { Input }

View File

@@ -1,3 +1,13 @@
## 0.12.6
- Add maximum 1 minute memory usage.
- Add status filters to All Systems table.
- Fix Safari system link CSS bug.
- Use older cuda image for increased compatibility (#1103)
## 0.12.5 ## 0.12.5
- Downgrade `gopsutil` to `v4.25.6` to fix panic on FreeBSD (#1083) - Downgrade `gopsutil` to `v4.25.6` to fix panic on FreeBSD (#1083)