diff --git a/dashboard/public/locales/en.json b/dashboard/public/locales/en.json index 274a5ef..e132980 100644 --- a/dashboard/public/locales/en.json +++ b/dashboard/public/locales/en.json @@ -212,6 +212,9 @@ "title": "No inbound is selected", "desc": "You must select an inbound in order to add a host." }, + "settings": { + "title": "Host Settings" + }, "allowinsecure": "Allow Insecure", "dialogs": { "edition": { diff --git a/dashboard/src/features/hosts/dialogs/mutation/index.tsx b/dashboard/src/features/hosts/dialogs/mutation/index.tsx index d17b295..d6c02bd 100644 --- a/dashboard/src/features/hosts/dialogs/mutation/index.tsx +++ b/dashboard/src/features/hosts/dialogs/mutation/index.tsx @@ -43,9 +43,10 @@ interface MutationDialogProps { } const transformFormValue = (values: HostType) => { + const port = values.port === "" ? null : values.port; const alpn = values.alpn === "none" ? "" : values.alpn; const fingerprint = values.fingerprint === "none" ? "" : values.fingerprint; - return { ...values, alpn, fingerprint }; + return { ...values, alpn, fingerprint, port }; }; export const HostsMutationDialog: FC = ({ diff --git a/dashboard/src/features/hosts/dialogs/settings/index.tsx b/dashboard/src/features/hosts/dialogs/settings/index.tsx index e195561..2b2c26e 100644 --- a/dashboard/src/features/hosts/dialogs/settings/index.tsx +++ b/dashboard/src/features/hosts/dialogs/settings/index.tsx @@ -30,7 +30,7 @@ export const HostSettingsDialog: FC = ({ onOpenChange, - {t('page.services.settings.title')} + {t('page.hosts.settings.title')} diff --git a/dashboard/src/features/hosts/tables/inbound-hosts/columns.tsx b/dashboard/src/features/hosts/tables/inbound-hosts/columns.tsx index 2b54e40..7be05c4 100644 --- a/dashboard/src/features/hosts/tables/inbound-hosts/columns.tsx +++ b/dashboard/src/features/hosts/tables/inbound-hosts/columns.tsx @@ -19,11 +19,10 @@ export const columns = (actions: ColumnAction): ColumnDef[] => ([ { accessorKey: "address", header: ({ column }) => , - cell: ({ row }) => `${row.original.address}:${row.original.port}` }, { accessorKey: "port", - header: ({ column }) => , + header: ({ column }) => , }, { id: "actions",