Implement web-based user management / admin setup. (#8)

Implement Admin Settings dialog for user management and toggling the public server flag, not needing CLI for maintenance anymore.
This commit was merged in pull request #8.
This commit is contained in:
2025-10-01 01:10:33 +01:00
parent bf604334bd
commit cfc80d2462
7 changed files with 427 additions and 2 deletions
+4 -1
View File
@@ -73,7 +73,10 @@ watchEffect(() => {
const settingsMenu = (e: Event) => {
// show the context menu
const items = []
items.push({ label: 'Settings', onClick: () => { store.dialog = 'settings' }})
items.push({ label: 'Change Password', onClick: () => { store.dialog = 'settings' }})
if (store.user.privileged) {
items.push({ label: 'Admin Settings', onClick: () => { store.dialog = 'usermgmt' }})
}
if (store.user.isLoggedIn) {
items.push({ label: `Logout ${store.user.username ?? ''}`, onClick: () => store.logout() })
} else {