Can use backup routes from API

This commit is contained in:
2025-05-02 15:31:29 +02:00
parent e159d3c963
commit c68ddffc5e
9 changed files with 32 additions and 2 deletions

View File

@ -32,6 +32,7 @@ export interface NewToken {
right_file: boolean;
right_auth: boolean;
right_stats: boolean;
right_backup: boolean;
}
export class TokensApi {

View File

@ -37,6 +37,7 @@ export function CreateTokenDialog(p: {
right_inbox: false,
right_movement: false,
right_stats: false,
right_backup: false,
};
const clearForm = () => {
@ -79,6 +80,7 @@ export function CreateTokenDialog(p: {
right_auth: true,
right_inbox: true,
right_stats: false,
right_backup: false,
});
};
@ -216,6 +218,18 @@ export function CreateTokenDialog(p: {
});
}}
/>
<br />
<CheckboxInput
editable
label="Right: backup routes"
checked={newToken.right_backup}
onValueChange={(v) => {
setNewToken({
...newToken,
right_backup: v,
});
}}
/>
</DialogContent>
<DialogActions>
<Button onClick={cancel}>Cancel</Button>

View File

@ -197,6 +197,12 @@ function TokensRouteInner(p: {
flex: 2,
type: "boolean",
},
{
field: "right_backup",
headerName: "Backup",
flex: 2,
type: "boolean",
},
{
field: "actions",
type: "actions",