feat: Public port range (WIP)

This commit is contained in:
Andras Bacsai
2022-02-20 15:12:01 +01:00
parent d3d9754277
commit add441675d
7 changed files with 48 additions and 28 deletions

View File

@@ -56,9 +56,11 @@
appendOnly = !appendOnly;
}
try {
await post(`/databases/${id}/settings.json`, { isPublic, appendOnly });
const { publicPort } = await post(`/databases/${id}/settings.json`, { isPublic, appendOnly });
if (isPublic) {
database.publicPort = publicPort;
}
databaseUrl = generateUrl();
return;
} catch ({ error }) {
return errorNotification(error);
}
@@ -135,7 +137,7 @@
<div class="grid grid-cols-2 items-center">
<label for="publicPort">Port</label>
<CopyPasswordField
placeholder="Generated automatically after start"
placeholder="Generated automatically after set to public"
id="publicPort"
readonly
disabled