fixed more things
This commit is contained in:
parent
ad01c9f0dd
commit
fedcd9d6f9
@ -679,4 +679,16 @@ export const USERS_ACTIONS: ActionInfo[] = [
|
||||
permissions: Permission.Admin,
|
||||
response_action: "Ignore"
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
export const BROWSER_ACTIONS: ActionInfo[] = [
|
||||
{
|
||||
name: "Delete Browser",
|
||||
requestType: "delete",
|
||||
endpoint: "/browsers/{browser_id}",
|
||||
args: {},
|
||||
permissions: Permission.Browse,
|
||||
response_action: "Ignore"
|
||||
}
|
||||
]
|
@ -6,6 +6,7 @@ import validator from '@rjsf/validator-ajv8';
|
||||
import { Browser, ServerInfo } from "./interfaces";
|
||||
import { loadServers } from "./servers";
|
||||
import { JSONSchema7TypeName } from "json-schema";
|
||||
import { BROWSER_ACTIONS } from "./actions";
|
||||
|
||||
const browserContext: Context<Browser> = createContext({} as Browser)
|
||||
const browserActionContext: Context<ActionInfo[]|null> = createContext(null as ActionInfo[]|null)
|
||||
@ -85,7 +86,7 @@ export function BrowsersPage({ }) {
|
||||
)
|
||||
}
|
||||
return <DataTable headers={['Browser Owner', 'Server Owner', 'Server Game', 'Game Version', 'Actions']}>
|
||||
<browserActionContext.Provider value={[]}>
|
||||
<browserActionContext.Provider value={BROWSER_ACTIONS}>
|
||||
{browserComponents}
|
||||
</browserActionContext.Provider>
|
||||
</DataTable>
|
||||
|
@ -45,7 +45,7 @@ function UserItem(p: { user: User }) {
|
||||
)
|
||||
}
|
||||
|
||||
export function UsersPage({ }) {
|
||||
export function UsersPage(p: {}) {
|
||||
const [apiAuthenticated, setApiAuthenticated] = useContext(apiAuthenticatedContext)
|
||||
const [users, setUsers]: [User[], Dispatch<User[]>] = useState([] as User[])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user