package components
templ ManageAdmin() {
@ManageBase("ManageAdmin") {
<div>
todo: probs have like stats and that kinda stuff here
</div>
<div class="flex flex-col">
<a class="border p-2" href="/manage/admin/users">Users</a>
<a class="border p-2" href="/manage/admin/domains">Domains</a>
</div>
}
}
templ ManageAdminUsers() {
@ManageBase("ManageAdmin") {
<div class="bg-yellow-200">
<form class="flex flex-col p-2 gap-2" hx-post="/manage/admin/users" hx-target="#add_user_error">
<label for="email">Email</label>
<input class="border" type="text" placeholder="name@example.com" name="email" id="email"/>
<label for="initial_pwd">Initial Password</label>
<input class="border" type="password" placeholder="..." name="initial_pwd" id="initial_pwd"/>
<div class="text-rose-600 text-center" id="add_user_error"></div>
<button class="border p-1" type="submit">Add</button>
</form>
</div>
<div hx-get="/manage/admin/partials/users_list" hx-trigger="load, update-user-list from:body" hx-target="this">
</div>
}
}
templ ManageAdminDomains() {
@ManageBase("ManageAdmin") {
<div hx-get="/manage/admin/partials/domains_list" hx-trigger="load" hx-target="this">
</div>
}
}