DEVELOPMENT ENVIRONMENT

~liljamo/felu

ref: 6b83684da956b580c5c32129848a1ff66f42e0c6 felu/internal/components/manageadmin.templ -rw-r--r-- 1.2 KiB
6b83684dJonni Liljamo docs: add README.md 1 year, 29 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
39
40
package components

templ ManageAdmin() {
	@ManageBase("ManageAdmin") {
		<div>
			something something admin page
			<br/>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>
			list of all domains on the instance, with owner details and such
		</div>
	}
}