fixed more things
This commit is contained in:
parent
ad01c9f0dd
commit
fedcd9d6f9
@ -680,3 +680,15 @@ export const USERS_ACTIONS: ActionInfo[] = [
|
|||||||
response_action: "Ignore"
|
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 { Browser, ServerInfo } from "./interfaces";
|
||||||
import { loadServers } from "./servers";
|
import { loadServers } from "./servers";
|
||||||
import { JSONSchema7TypeName } from "json-schema";
|
import { JSONSchema7TypeName } from "json-schema";
|
||||||
|
import { BROWSER_ACTIONS } from "./actions";
|
||||||
|
|
||||||
const browserContext: Context<Browser> = createContext({} as Browser)
|
const browserContext: Context<Browser> = createContext({} as Browser)
|
||||||
const browserActionContext: Context<ActionInfo[]|null> = createContext(null as ActionInfo[]|null)
|
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']}>
|
return <DataTable headers={['Browser Owner', 'Server Owner', 'Server Game', 'Game Version', 'Actions']}>
|
||||||
<browserActionContext.Provider value={[]}>
|
<browserActionContext.Provider value={BROWSER_ACTIONS}>
|
||||||
{browserComponents}
|
{browserComponents}
|
||||||
</browserActionContext.Provider>
|
</browserActionContext.Provider>
|
||||||
</DataTable>
|
</DataTable>
|
||||||
|
@ -45,7 +45,7 @@ function UserItem(p: { user: User }) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function UsersPage({ }) {
|
export function UsersPage(p: {}) {
|
||||||
const [apiAuthenticated, setApiAuthenticated] = useContext(apiAuthenticatedContext)
|
const [apiAuthenticated, setApiAuthenticated] = useContext(apiAuthenticatedContext)
|
||||||
const [users, setUsers]: [User[], Dispatch<User[]>] = useState([] as User[])
|
const [users, setUsers]: [User[], Dispatch<User[]>] = useState([] as User[])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user