feat: implement comprehensive admin dashboard for server management and user oversight

This commit is contained in:
2026-02-21 03:28:21 +01:00
parent fa29bd5a85
commit 6dc940bb3a
5 changed files with 203 additions and 6 deletions

View File

@@ -22,6 +22,13 @@ contextBridge.exposeInMainWorld('electronAPI', {
getCommunityAccounts: () => ipcRenderer.invoke('get-community-accounts'),
getServerUsers: () => ipcRenderer.invoke('get-server-users'),
// Admin API
adminGetStats: () => ipcRenderer.invoke('admin-get-stats'),
adminGetUsers: () => ipcRenderer.invoke('admin-get-users'),
adminDeleteUser: (userId: string) => ipcRenderer.invoke('admin-delete-user', userId),
adminGetAccounts: () => ipcRenderer.invoke('admin-get-accounts'),
adminRemoveAccount: (steamId: string) => ipcRenderer.invoke('admin-remove-account', steamId),
onAccountsUpdated: (callback: (accounts: any[]) => void) => {
const subscription = (_event: IpcRendererEvent, accounts: any[]) => callback(accounts);
ipcRenderer.on('accounts-updated', subscription);