mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/sky22333/ansible-ui
synced 2026-09-20 08:03:57 +08:00
优化密钥认证开关样式,升级py版本
This commit is contained in:
@@ -7,7 +7,7 @@ RUN npm install -g pnpm
|
||||
COPY ./web /app
|
||||
RUN pnpm install && pnpm run build
|
||||
|
||||
FROM python:3.9-alpine
|
||||
FROM python:3.11-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@@ -7,5 +7,3 @@ services:
|
||||
- ANSIBLE_HOST_KEY_CHECKING=False
|
||||
- ADMIN_USERNAME=admin123
|
||||
- ADMIN_PASSWORD=admin123
|
||||
volumes:
|
||||
- ./ansible:/app/db
|
||||
|
||||
@@ -11,7 +11,7 @@ const Switch = React.forwardRef<
|
||||
>(({ className, ...props }, ref) => (
|
||||
<SwitchPrimitives.Root
|
||||
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
|
||||
)}
|
||||
{...props}
|
||||
@@ -19,7 +19,7 @@ const Switch = React.forwardRef<
|
||||
>
|
||||
<SwitchPrimitives.Thumb
|
||||
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>
|
||||
|
||||
@@ -511,13 +511,13 @@ function MainPage() {
|
||||
<DialogDescription>
|
||||
每行输入一台主机信息,格式:
|
||||
{useKeyAuth
|
||||
? "备注 地址 用户名 端口"
|
||||
: "备注 地址 用户名 端口 SSH密码"}
|
||||
? "备注 地址 用户 端口"
|
||||
: "备注 地址 用户 端口 SSH密码"}
|
||||
。例如:<br />
|
||||
<code>
|
||||
{useKeyAuth
|
||||
? "web-server 192.168.1.1 root 22"
|
||||
: "db-server 192.168.1.2 admin 22 yourpassword"}
|
||||
? "us 192.168.1.1 root 22"
|
||||
: "us 192.168.1.2 root 22 yourpassword"}
|
||||
</code>
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
@@ -542,7 +542,7 @@ function MainPage() {
|
||||
</Dialog>
|
||||
<div className="flex items-center space-x-2">
|
||||
<Switch id="key-auth-switch" checked={useKeyAuth} onCheckedChange={setUseKeyAuth} />
|
||||
<Label htmlFor="key-auth-switch">密钥认证</Label>
|
||||
<Label htmlFor="key-auth-switch">使用密钥认证</Label>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex gap-2">
|
||||
|
||||
Reference in New Issue
Block a user