Update host update form for main host (host 0)
This commit is contained in:
@@ -42,7 +42,7 @@ export default function deriveHostConfig({ host, clients }: Params) {
|
||||
config_path: host?.dir_names?.HOST_CONFIG_FILE,
|
||||
|
||||
address: wg_ip_address ? `${wg_ip_address}/24` : undefined,
|
||||
listen_port: AppData["DefaultWGListenPort"],
|
||||
listen_port: host?.listen_port || AppData["DefaultWGListenPort"],
|
||||
post_up: host?.dir_names?.POST_UP_PATH,
|
||||
post_down: host?.dir_names?.POST_DOWN_PATH,
|
||||
public_key: public_key,
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function AddHostFormInterface({
|
||||
}: Props) {
|
||||
const interfaces = app_context.pageProps?.network_interfaces || [];
|
||||
|
||||
if (existing_full?.id) {
|
||||
if (existing_full?.interface) {
|
||||
return (
|
||||
<Input
|
||||
value={existing_full.interface || "N/A"}
|
||||
|
||||
@@ -19,7 +19,7 @@ export default function AddHostFormListenPort({
|
||||
}: Props) {
|
||||
const [busy, setBusy] = useState(false);
|
||||
|
||||
if (existing_full?.id) {
|
||||
if (existing_full?.listen_port) {
|
||||
return (
|
||||
<Input
|
||||
value={existing_full.listen_port || "N/A"}
|
||||
|
||||
@@ -57,7 +57,7 @@ export default function AddHostFormPublicIP({
|
||||
fetchIP(form.interface, useLocalIP);
|
||||
}, [form.interface, useLocalIP]);
|
||||
|
||||
if (existing_full?.id) {
|
||||
if (existing_full?.public_ip_address) {
|
||||
return (
|
||||
<Input
|
||||
value={existing_full.public_ip_address || "N/A"}
|
||||
|
||||
Reference in New Issue
Block a user