优化密钥认证开关样式,升级py版本

This commit is contained in:
starry
2025-07-21 17:39:34 +00:00
parent 84480fbf4f
commit dcacb8b241
4 changed files with 9 additions and 11 deletions

View File

@@ -7,7 +7,7 @@ RUN npm install -g pnpm
COPY ./web /app COPY ./web /app
RUN pnpm install && pnpm run build RUN pnpm install && pnpm run build
FROM python:3.9-alpine FROM python:3.11-alpine
WORKDIR /app WORKDIR /app

View File

@@ -7,5 +7,3 @@ services:
- ANSIBLE_HOST_KEY_CHECKING=False - ANSIBLE_HOST_KEY_CHECKING=False
- ADMIN_USERNAME=admin123 - ADMIN_USERNAME=admin123
- ADMIN_PASSWORD=admin123 - ADMIN_PASSWORD=admin123
volumes:
- ./ansible:/app/db

View File

@@ -11,7 +11,7 @@ const Switch = React.forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<SwitchPrimitives.Root <SwitchPrimitives.Root
className={cn( className={cn(
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-gray-300", "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent bg-input transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=unchecked]:bg-neutral-200 dark:focus-visible:ring-neutral-300 dark:focus-visible:ring-offset-neutral-950 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=unchecked]:bg-neutral-800",
className className
)} )}
{...props} {...props}
@@ -19,11 +19,11 @@ const Switch = React.forwardRef<
> >
<SwitchPrimitives.Thumb <SwitchPrimitives.Thumb
className={cn( className={cn(
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0" "pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 dark:bg-neutral-950"
)} )}
/> />
</SwitchPrimitives.Root> </SwitchPrimitives.Root>
)) ))
Switch.displayName = SwitchPrimitives.Root.displayName Switch.displayName = SwitchPrimitives.Root.displayName
export { Switch } export { Switch }

View File

@@ -511,13 +511,13 @@ function MainPage() {
<DialogDescription> <DialogDescription>
{useKeyAuth {useKeyAuth
? "备注 地址 用户 端口" ? "备注 地址 用户 端口"
: "备注 地址 用户 端口 SSH密码"} : "备注 地址 用户 端口 SSH密码"}
<br /> <br />
<code> <code>
{useKeyAuth {useKeyAuth
? "web-server 192.168.1.1 root 22" ? "us 192.168.1.1 root 22"
: "db-server 192.168.1.2 admin 22 yourpassword"} : "us 192.168.1.2 root 22 yourpassword"}
</code> </code>
</DialogDescription> </DialogDescription>
</DialogHeader> </DialogHeader>
@@ -542,7 +542,7 @@ function MainPage() {
</Dialog> </Dialog>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<Switch id="key-auth-switch" checked={useKeyAuth} onCheckedChange={setUseKeyAuth} /> <Switch id="key-auth-switch" checked={useKeyAuth} onCheckedChange={setUseKeyAuth} />
<Label htmlFor="key-auth-switch"></Label> <Label htmlFor="key-auth-switch">使</Label>
</div> </div>
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">