feat: implement comprehensive admin dashboard for server management and user oversight
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user