mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-30 16:21:39 +00:00
fix(ui): resolve connection dialog errors
- Escape `@` in i18n connection URL placeholder to prevent vue-i18n linked message compilation error - Add hidden DialogDescription to DialogContent to suppress reka-ui aria-describedby warning
This commit is contained in:
@@ -4,7 +4,14 @@ import type { DialogContentEmits, DialogContentProps } from "reka-ui";
|
||||
import type { HTMLAttributes } from "vue";
|
||||
import { reactiveOmit } from "@vueuse/core";
|
||||
import { XIcon } from "lucide-vue-next";
|
||||
import { DialogClose, DialogContent, DialogPortal, useForwardPropsEmits } from "reka-ui";
|
||||
import {
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogPortal,
|
||||
VisuallyHidden,
|
||||
useForwardPropsEmits,
|
||||
} from "reka-ui";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import DialogOverlay from "./DialogOverlay.vue";
|
||||
@@ -39,6 +46,10 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
||||
)
|
||||
"
|
||||
>
|
||||
<VisuallyHidden as-child>
|
||||
<DialogDescription />
|
||||
</VisuallyHidden>
|
||||
|
||||
<slot />
|
||||
|
||||
<DialogClose v-if="showCloseButton" data-slot="dialog-close" as-child>
|
||||
|
||||
@@ -99,7 +99,7 @@ export default {
|
||||
driverName: "Driver Name",
|
||||
driverNamePlaceholder: "Vendor or environment name",
|
||||
urlParams: "URL Params",
|
||||
connectionUrlPlaceholder: "postgresql://user:pass@host:5432/db?sslmode=require",
|
||||
connectionUrlPlaceholder: "postgresql://user:pass{'@'}host:5432/db?sslmode=require",
|
||||
parseConnectionUrl: "Parse connection URL",
|
||||
parseConnectionUrlApplied: "Connection URL applied",
|
||||
parseConnectionUrlFailed: "Failed to parse connection URL: {message}",
|
||||
|
||||
@@ -98,7 +98,7 @@ export default {
|
||||
driverName: "驱动名称",
|
||||
driverNamePlaceholder: "厂商或环境名称",
|
||||
urlParams: "URL 参数",
|
||||
connectionUrlPlaceholder: "postgresql://user:pass@host:5432/db?sslmode=require",
|
||||
connectionUrlPlaceholder: "postgresql://user:pass{'@'}host:5432/db?sslmode=require",
|
||||
parseConnectionUrl: "解析连接 URL",
|
||||
parseConnectionUrlApplied: "已应用连接 URL",
|
||||
parseConnectionUrlFailed: "解析连接 URL 失败:{message}",
|
||||
|
||||
Reference in New Issue
Block a user