DEVELOPMENT ENVIRONMENT

~liljamo/felu

ref: 3cd37b5d7df372ecbf494843ba642e004a54621a felu/internal/components/manageadmin.templ -rw-r--r-- 1.2 KiB
3cd37b5dJonni Liljamo feat: custom TsigProvider implementation 17 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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>
	}
}