add sbot config template and rename menu

This commit is contained in:
glyph 2022-01-17 15:20:43 +02:00
parent 8f5b257ed1
commit 8c4cf6261e
2 changed files with 59 additions and 6 deletions

View File

@ -0,0 +1,55 @@
{%- extends "nav" -%}
{%- block card %}
<!-- SBOT CONFIGURATION FORM -->
<div class="card center">
<form>
<div class="center" style="display: flex; flex-direction: column; width: 80%;" title="Number of hops to replicate">
<label for="hops" class="label-small">HOPS</label>
<div id="hops" style="display: flex; justify-content: space-evenly;">
<input type="radio" id="hops_0" name="hops" value="0">
<label for="hops_0">0</label>
<input type="radio" id="hops_1" name="hops" value="1">
<label for="hops_1">1</label>
<input type="radio" id="hops_2" name="hops" value="2">
<label for="hops_2">2</label>
<input type="radio" id="hops_3" name="hops" value="3">
<label for="hops_3">3</label>
<input type="radio" id="hops_4" name="hops" value="4">
<label for="hops_4">4</label><br>
</div>
</div>
<br>
<div class="center" style="display: flex; justify-content: space-between; width: 80%;">
<div style="display: flex; flex-direction: column; width: 60%;" title="IP address on which the sbot runs">
<label for="ip" class="label-small">IP ADDRESS</label>
<input type="text" id="ip" name="ip">
</div>
<div style="display: flex; flex-direction: column; width: 20%;" title="Port on which the sbot runs">
<label for="port" class="label-small">PORT</label>
<input type="text" id="port" name="port">
</div>
</div>
<br>
<div class="center" style="display: flex; flex-direction: column; width: 80%;" title="Network key (aka 'caps key') to define the Scuttleverse in which the sbot operates in">
<label for="network_key" class="label-small">NETWORK KEY</label>
<input type="text" id="network_key" name="network_key">
</div>
<br>
<div class="center" style="display: flex; flex-direction: column; width: 80%;" title="Directory in which the sbot database is saved">
<label for="database_dir" class="label-small">DATABASE DIRECTORY</label>
<input type="text" id="database_dir" name="database_dir">
</div>
<br>
<div class="center" style="width: 80%;" title="Broadcast the IP and port of this sbot instance so that local peers can discovery it and attempt to connect">
<input type="checkbox" id="lan_broadcast" name="lan_broadcast">
<label for="lan_broadcast">Enable LAN Broadcasting</label><br>
<br>
<input type="checkbox" id="lan_discovery" name="lan_discovery" title="Listen for the presence of local peers and attempt to connect if found">
<label for="lan_discovery">Enable LAN Discovery</label><br>
</div>
<br>
<input class="button button-primary center" type="button" value="Save">
<input class="button button-warning center" type="button" value="Restore Defaults">
</form>
</div>
{%- endblock card -%}

View File

@ -4,15 +4,13 @@
<div class="card center">
<!-- BUTTONS -->
<div id="settingsButtons">
<a id="networkKey" class="button button-primary center" href="/settings/scuttlebutt/network_key" title="Set Network Key">Set Network Key</a>
<a id="replicationHops" class="button button-primary center" href="/settings/scuttlebutt/hops" title="Set Replication Hops">Set Replication Hops</a>
<a id="removeFeeds" class="button button-primary center" href="/settings/scuttlebutt/remove_feeds" title="Remove Blocked Feeds">Remove Blocked Feeds</a>
<a id="setDirectory" class="button button-primary center" href="/settings/scuttlebutt/set_directory" title="Set Database Directory">Set Database Directory</a>
<a id="checkFilesystem" class="button button-primary center" href="/settings/scuttlebutt/check_fs" title="Check Filesystem">Check Filesystem</a>
<a id="repairFilesystem" class="button button-primary center" href="/settings/scuttlebutt/repair" title="Repair Filesystem">Repair Filesystem</a>
<a id="configureSbot" class="button button-primary center" href="/settings/scuttlebutt/configure" title="Configure Sbot">Configure Sbot</a>
<a id="disable" class="button button-primary center" href="/settings/scuttlebutt/disable" title="Disable Sbot">Disable Sbot</a>
<a id="enable" class="button button-primary center" href="/settings/scuttlebutt/enable" title="Enable Sbot">Enable Sbot</a>
<a id="restart" class="button button-primary center" href="/settings/scuttlebutt/restart" title="Restart Sbot">Restart Sbot</a>
<a id="checkFilesystem" class="button button-primary center" href="/settings/scuttlebutt/check_fs" title="Check Filesystem">Check Filesystem</a>
<a id="repairFilesystem" class="button button-primary center" href="/settings/scuttlebutt/repair" title="Repair Filesystem">Repair Filesystem</a>
<a id="removeFeeds" class="button button-primary center" href="/settings/scuttlebutt/remove_feeds" title="Remove Blocked Feeds">Remove Blocked Feeds</a>
</div>
</div>
{%- endblock card -%}