messages
This commit is contained in:
parent
288f193754
commit
fc3a6fe2a0
8 changed files with 372 additions and 50 deletions
|
@ -15,16 +15,27 @@
|
|||
<h1 class="text-xl underline text-center p-2">
|
||||
macnickenson
|
||||
</h1>
|
||||
<div>
|
||||
{% for message in messages %}
|
||||
{{ message.1 }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="p-2">
|
||||
<h2 class="underline">Your Devices:</h2>
|
||||
{% for device in my %}
|
||||
<form action="/update" method="POST">
|
||||
<div class="grid grid-cols-3 grid-gap-1">
|
||||
<div class="font-mono">{{ device.macaddr }} {{ device.present }}</div>
|
||||
<div class="font-mono">
|
||||
{{ device.macaddr }} {{ device.present }}
|
||||
<input type="hidden" name="macaddr" value="{{ device.macaddr }}" />
|
||||
</div>
|
||||
<div>
|
||||
<input class="focus:shadow-outline border border-gray-300 px-2"
|
||||
value="{{ device.descr }}"/>
|
||||
<select class="focus:shadow-outline border border-gray-300 px-2">
|
||||
name="descr"
|
||||
value="{{ device.descr }}" />
|
||||
<select class="focus:shadow-outline border border-gray-300 px-2"
|
||||
name="privacy">
|
||||
<option value="0"
|
||||
{{ device.privacy.selected(crate::db::PrivacyLevel::ShowUserAndDevice) }}
|
||||
>Show User and Device</option>
|
||||
|
@ -47,30 +58,45 @@
|
|||
<button class="rounded bg-gray-300 font-bold px-2 bg-red-500">Delete</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<h2 class="underline">Unregistred Devices:</h2>
|
||||
{% for device in unassinged %}
|
||||
<form action="/register" method="POST">
|
||||
<div class="grid grid-cols-4 grid-gap-1 p-2">
|
||||
<div class="font-mono">{{ device.macaddr }}</div>
|
||||
<div class="font-mono">
|
||||
{{ device.macaddr }}
|
||||
<input type="hidden" name="macaddr" value="{{ device.macaddr }}" />
|
||||
</div>
|
||||
<div class="font-mono">{{ device.ip() }}</div>
|
||||
<div>
|
||||
<input class="focus:shadow-outline border border-gray-300 px-2"
|
||||
placeholder="awesome new device"/>
|
||||
placeholder="awesome new device"
|
||||
name="descr" />
|
||||
<select class="focus:shadow-outline border border-gray-300 px-2"
|
||||
name="privacy">
|
||||
<option value="0">Show User and Device</option>
|
||||
<option value="1">Show User</option>
|
||||
<option value="2" selected>Show Anonymous</option>
|
||||
<option value="3">Hide User</option>
|
||||
<option value="4">Dont Log</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<button class="rounded bg-gray-300 font-bold px-2 bg-blue-300">Register</button>
|
||||
<button class="rounded bg-gray-300 font-bold px-2 bg-blue-300"
|
||||
type="submit">
|
||||
Register
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="shadow-lg p-2">
|
||||
footer
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue