Set custom httpd port in Settings

This commit is contained in:
Sebastian Martinez
2024-05-07 12:28:59 +02:00
committed by Rūdolfs Ošiņš
parent ff8b26df55
commit 5657811467
2 changed files with 17 additions and 0 deletions
+16
View File
@@ -1,4 +1,6 @@
<script lang="ts">
import { api, changeHttpdPort } from "@app/lib/httpd";
import { config } from "@app/lib/config";
import {
codeFont,
codeFonts,
@@ -12,6 +14,9 @@
import Icon from "@app/components/Icon.svelte";
import Radio from "@app/components/Radio.svelte";
import Button from "@app/components/Button.svelte";
import TextInput from "@app/components/TextInput.svelte";
$: customPort = api.port;
</script>
<style>
@@ -104,4 +109,15 @@
</Radio>
</div>
</div>
<div class="item">
<div>Radicle HTTP Daemon Port</div>
<div class="right txt-monospace" style:width="6rem">
<TextInput
name="httpd port"
bind:value={customPort}
placeholder={config.nodes.defaultLocalHttpdPort.toString()}
valid={Number(customPort) >= 1 && Number(customPort) <= 65535}
on:submit={() => changeHttpdPort(Number(customPort))} />
</div>
</div>
</div>