Add support for statistics routes
This commit is contained in:
@ -14,6 +14,7 @@ export interface Token {
|
||||
right_inbox: boolean;
|
||||
right_file: boolean;
|
||||
right_auth: boolean;
|
||||
right_stats: boolean;
|
||||
}
|
||||
|
||||
export interface TokenWithSecret extends Token {
|
||||
@ -30,6 +31,7 @@ export interface NewToken {
|
||||
right_inbox: boolean;
|
||||
right_file: boolean;
|
||||
right_auth: boolean;
|
||||
right_stats: boolean;
|
||||
}
|
||||
|
||||
export class TokensApi {
|
||||
|
@ -36,6 +36,7 @@ export function CreateTokenDialog(p: {
|
||||
right_auth: false,
|
||||
right_inbox: false,
|
||||
right_movement: false,
|
||||
right_stats: false,
|
||||
};
|
||||
|
||||
const clearForm = () => {
|
||||
@ -77,6 +78,7 @@ export function CreateTokenDialog(p: {
|
||||
right_file: true,
|
||||
right_auth: true,
|
||||
right_inbox: true,
|
||||
right_stats: false,
|
||||
});
|
||||
};
|
||||
|
||||
@ -202,6 +204,18 @@ export function CreateTokenDialog(p: {
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<br />
|
||||
<CheckboxInput
|
||||
editable
|
||||
label="Right: statistics routes"
|
||||
checked={newToken.right_stats}
|
||||
onValueChange={(v) => {
|
||||
setNewToken({
|
||||
...newToken,
|
||||
right_stats: v,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={cancel}>Cancel</Button>
|
||||
|
@ -191,6 +191,12 @@ function TokensRouteInner(p: {
|
||||
flex: 2,
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
field: "right_stats",
|
||||
headerName: "Stats",
|
||||
flex: 2,
|
||||
type: "boolean",
|
||||
},
|
||||
{
|
||||
field: "actions",
|
||||
type: "actions",
|
||||
|
Reference in New Issue
Block a user