gitscope
← marzneshin / Diff · ec7410a → ec7410a
Changes ec7410a..ec7410a
Patch commit
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<MutationDialogProps> = ({
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<HostsSettingsDialogProps> = ({ onOpenChange,
<SheetContent className="sm:min-w-full md:min-w-[700px]" >
<SheetHeader>
<SheetTitle>
- {t('page.services.settings.title')}
+ {t('page.hosts.settings.title')}
</SheetTitle>
</SheetHeader>
<Table>
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<HostType>[] => ([
{
accessorKey: "address",
header: ({ column }) => <DataTableColumnHeader title={i18n.t('address')} column={column} />,
- cell: ({ row }) => `${row.original.address}:${row.original.port}`
},
{
accessorKey: "port",
- header: ({ column }) => <DataTableColumnHeader title={i18n.t('page.nodes.usage_coefficient')} column={column} />,
+ header: ({ column }) => <DataTableColumnHeader title={i18n.t('port')} column={column} />,
},
{
id: "actions",