profiles: add ability to directly edit profile JSON

allows for customizing small things, like changing admin status.
This commit is contained in:
Harvey Tindall
2025-11-28 15:13:46 +00:00
parent f83695190d
commit 77d2ad3b6b
14 changed files with 172 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en" class="{{ .cssClass }}">
<head>
{{ template "syntaxhighlighting.html" . }}
<script>
window.usernameEnabled = {{ .username }};
window.langFile = JSON.parse({{ .language }});
@@ -445,6 +446,7 @@
{{ end }}
<th>{{ .strings.from }}</th>
<th>{{ .strings.userProfilesLibraries }}</th>
<th></th>
<th><span class="button ~neutral @high" id="button-profile-create">{{ .strings.create }}</span></th>
</tr>
</thead>
@@ -453,6 +455,17 @@
</div>
</div>
</div>
<div id="modal-edit-profile" class="modal">
<form class="relative mx-auto my-[10%] w-11/12 sm:w-4/5 lg:w-2/3 card flex flex-col gap-2" id="form-edit-profile">
<span class="heading">{{ .strings.editProfile }} <span class="modal-close">&times;</span></span>
<p class="content">{{ .strings.editProfileDescription }}</p>
<div id="modal-edit-profile-editor"></div>
<label>
<input type="submit" class="unfocused">
<span class="button ~urge @low full-width center supra submit">{{ .strings.submit }}</span>
</label>
</form>
</div>
<div id="modal-add-profile" class="modal">
<form class="card relative mx-auto my-[10%] w-11/12 sm:w-4/5 lg:w-1/3" id="form-add-profile" href="">
<span class="heading">{{ .strings.addProfile }} <span class="modal-close">&times;</span></span>

View File

@@ -0,0 +1,3 @@
<link rel="stylesheet" type="text/css" href="{{ .pages.Base }}/css/{{ .cssVersion }}highlightjs-light.css" data-theme="light">
<link rel="stylesheet" type="text/css" href="{{ .pages.Base }}/css/{{ .cssVersion }}highlightjs-dark.css" data-theme="dark">
<link rel="stylesheet" type="text/css" href="{{ .pages.Base }}/css/{{ .cssVersion }}code-input.css">