diff --git a/ui/src/components/access/AccessEditDrawer.tsx b/ui/src/components/access/AccessEditDrawer.tsx
index 470a1b861..8e0e6080b 100644
--- a/ui/src/components/access/AccessEditDrawer.tsx
+++ b/ui/src/components/access/AccessEditDrawer.tsx
@@ -11,17 +11,17 @@ import { getErrMsg } from "@/utils/error";
import AccessForm, { type AccessFormInstance, type AccessFormProps } from "./AccessForm";
export type AccessEditDrawerProps = {
+ action: AccessFormProps["action"];
data?: AccessFormProps["initialValues"];
loading?: boolean;
open?: boolean;
- scene: AccessFormProps["scene"];
trigger?: React.ReactNode;
usage?: AccessFormProps["usage"];
onOpenChange?: (open: boolean) => void;
afterSubmit?: (record: AccessModel) => void;
};
-const AccessEditDrawer = ({ data, loading, trigger, scene, usage, afterSubmit, ...props }: AccessEditDrawerProps) => {
+const AccessEditDrawer = ({ action, data, loading, trigger, usage, afterSubmit, ...props }: AccessEditDrawerProps) => {
const { t } = useTranslation();
const { notification } = App.useApp();
@@ -51,20 +51,20 @@ const AccessEditDrawer = ({ data, loading, trigger, scene, usage, afterSubmit, .
try {
let values: AccessModel = formRef.current!.getFieldsValue();
- if (scene === "create") {
+ if (action === "create") {
if (data?.id) {
throw "Invalid props: `data`";
}
values = await createAccess(values);
- } else if (scene === "edit") {
+ } else if (action === "edit") {
if (!data?.id) {
throw "Invalid props: `data`";
}
values = await updateAccess({ ...data, ...values });
} else {
- throw "Invalid props: `scene`";
+ throw "Invalid props: `action`";
}
afterSubmit?.(values);
@@ -96,18 +96,18 @@ const AccessEditDrawer = ({ data, loading, trigger, scene, usage, afterSubmit, .
}
loading={loading}
maskClosable={!formPending}
open={open}
- title={t(`access.action.${scene}`)}
+ title={t(`access.action.${action}.modal.title`)}
width={720}
onClose={() => setOpen(false)}
>
-
+
>
);
diff --git a/ui/src/components/access/AccessEditModal.tsx b/ui/src/components/access/AccessEditModal.tsx
index d8b9a81d5..954ed73ca 100644
--- a/ui/src/components/access/AccessEditModal.tsx
+++ b/ui/src/components/access/AccessEditModal.tsx
@@ -11,17 +11,17 @@ import { getErrMsg } from "@/utils/error";
import AccessForm, { type AccessFormInstance, type AccessFormProps } from "./AccessForm";
export type AccessEditModalProps = {
+ action: AccessFormProps["action"];
data?: AccessFormProps["initialValues"];
loading?: boolean;
open?: boolean;
usage?: AccessFormProps["usage"];
- scene: AccessFormProps["scene"];
trigger?: React.ReactNode;
onOpenChange?: (open: boolean) => void;
afterSubmit?: (record: AccessModel) => void;
};
-const AccessEditModal = ({ data, loading, trigger, scene, usage, afterSubmit, ...props }: AccessEditModalProps) => {
+const AccessEditModal = ({ action, data, loading, trigger, usage, afterSubmit, ...props }: AccessEditModalProps) => {
const { t } = useTranslation();
const { notification } = App.useApp();
@@ -51,20 +51,20 @@ const AccessEditModal = ({ data, loading, trigger, scene, usage, afterSubmit, ..
try {
let values: AccessModel = formRef.current!.getFieldsValue();
- if (scene === "create") {
+ if (action === "create") {
if (data?.id) {
throw "Invalid props: `data`";
}
values = await createAccess(values);
- } else if (scene === "edit") {
+ } else if (action === "edit") {
if (!data?.id) {
throw "Invalid props: `data`";
}
values = await updateAccess({ ...data, ...values });
} else {
- throw "Invalid props: `preset`";
+ throw "Invalid props: `action`";
}
afterSubmit?.(values);
@@ -103,15 +103,15 @@ const AccessEditModal = ({ data, loading, trigger, scene, usage, afterSubmit, ..
confirmLoading={formPending}
destroyOnHidden
loading={loading}
- okText={scene === "edit" ? t("common.button.save") : t("common.button.submit")}
+ okText={action === "edit" ? t("common.button.save") : t("common.button.submit")}
open={open}
- title={t(`access.action.${scene}`)}
+ title={t(`access.action.${action}`)}
width={480}
onOk={handleOkClick}
onCancel={handleCancelClick}
>
>
diff --git a/ui/src/components/access/AccessForm.tsx b/ui/src/components/access/AccessForm.tsx
index 46a74ce38..1577bba7b 100644
--- a/ui/src/components/access/AccessForm.tsx
+++ b/ui/src/components/access/AccessForm.tsx
@@ -86,15 +86,15 @@ import AccessFormWestcnConfig from "./AccessFormWestcnConfig";
import AccessFormZeroSSLConfig from "./AccessFormZeroSSLConfig";
type AccessFormFieldValues = Partial>;
-type AccessFormScenes = "create" | "edit";
+type AccessFormActions = "create" | "edit";
type AccessFormUsages = "both-dns-hosting" | "ca-only" | "notification-only";
export type AccessFormProps = {
className?: string;
style?: React.CSSProperties;
+ action: AccessFormActions;
disabled?: boolean;
initialValues?: AccessFormFieldValues;
- scene: AccessFormScenes;
usage?: AccessFormUsages;
onValuesChange?: (values: AccessFormFieldValues) => void;
};
@@ -105,7 +105,7 @@ export type AccessFormInstance = {
validateFields: FormInstance["validateFields"];
};
-const AccessForm = forwardRef(({ className, style, disabled, initialValues, usage, scene, onValuesChange }, ref) => {
+const AccessForm = forwardRef(({ className, style, action, disabled, initialValues, usage, onValuesChange }, ref) => {
const { t } = useTranslation();
const formSchema = z.object({
@@ -406,7 +406,7 @@ const AccessForm = forwardRef(({ className,
{
}}
>
} iconPosition="end" type="primary">
- {t("certificate.action.download")}
+ {t("common.button.download")}
diff --git a/ui/src/components/provider/CAProviderSelect.tsx b/ui/src/components/provider/CAProviderSelect.tsx
index 61a5f2c91..68d6de920 100644
--- a/ui/src/components/provider/CAProviderSelect.tsx
+++ b/ui/src/components/provider/CAProviderSelect.tsx
@@ -35,7 +35,7 @@ const CAProviderSelect = ({ filter, ...props }: CAProviderSelectProps) => {
temp.unshift({
key: "",
value: "",
- label: t("provider.default_ca_provider.label"),
+ label: t("provider.text.default_ca_provider.label"),
data: {} as CAProvider,
});
@@ -47,7 +47,7 @@ const CAProviderSelect = ({ filter, ...props }: CAProviderSelectProps) => {
return (
- {t("provider.default_ca_provider.label")}
+ {t("provider.text.default_ca_provider.label")}
);
diff --git a/ui/src/components/workflow/WorkflowRunDetail.tsx b/ui/src/components/workflow/WorkflowRunDetail.tsx
index 86244c3a7..7c87bf8f5 100644
--- a/ui/src/components/workflow/WorkflowRunDetail.tsx
+++ b/ui/src/components/workflow/WorkflowRunDetail.tsx
@@ -299,7 +299,7 @@ const WorkflowRunArtifacts = ({ runId }: { runId: string }) => {
+
} variant="text" />
}
diff --git a/ui/src/components/workflow/WorkflowRuns.tsx b/ui/src/components/workflow/WorkflowRuns.tsx
index 3cf335ce9..72ae58383 100644
--- a/ui/src/components/workflow/WorkflowRuns.tsx
+++ b/ui/src/components/workflow/WorkflowRuns.tsx
@@ -106,7 +106,7 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => {
return (
-
+
}
@@ -117,7 +117,7 @@ const WorkflowRuns = ({ className, style, workflowId }: WorkflowRunsProps) => {
}}
/>
-
+
-
+