view for background push checkbox, install button
This commit is contained in:
parent
c89193e907
commit
b0d7cad5f3
1 changed files with 58 additions and 0 deletions
|
@ -3,6 +3,7 @@ import {useEffect, useState} from 'react';
|
||||||
import {
|
import {
|
||||||
CardActions,
|
CardActions,
|
||||||
CardContent,
|
CardContent,
|
||||||
|
Checkbox,
|
||||||
FormControl,
|
FormControl,
|
||||||
Select,
|
Select,
|
||||||
Stack,
|
Stack,
|
||||||
|
@ -42,6 +43,7 @@ const Preferences = () => {
|
||||||
<Notifications/>
|
<Notifications/>
|
||||||
<Appearance/>
|
<Appearance/>
|
||||||
<Users/>
|
<Users/>
|
||||||
|
<Installation/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
@ -58,6 +60,7 @@ const Notifications = () => {
|
||||||
<Sound/>
|
<Sound/>
|
||||||
<MinPriority/>
|
<MinPriority/>
|
||||||
<DeleteAfter/>
|
<DeleteAfter/>
|
||||||
|
<BackgroundPush/>
|
||||||
</PrefGroup>
|
</PrefGroup>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
@ -173,6 +176,33 @@ const DeleteAfter = () => {
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const BackgroundPush = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const handleChange = () => {
|
||||||
|
console.log('The checkbox was toggled.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Pref
|
||||||
|
labelId={"background_push"}
|
||||||
|
title={"prefs_notification_background"}
|
||||||
|
description={"Enable background notifications?"}
|
||||||
|
>
|
||||||
|
<FormControl
|
||||||
|
fullWidth
|
||||||
|
variant="standard"
|
||||||
|
sx={{ m: 1 }}
|
||||||
|
>
|
||||||
|
<Checkbox
|
||||||
|
onChange={handleChange}
|
||||||
|
>
|
||||||
|
</Checkbox>
|
||||||
|
</FormControl>
|
||||||
|
</Pref>
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
const PrefGroup = (props) => {
|
const PrefGroup = (props) => {
|
||||||
return (
|
return (
|
||||||
<div role="table">
|
<div role="table">
|
||||||
|
@ -473,4 +503,32 @@ const Language = () => {
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const Installation = () => {
|
||||||
|
const { t } = useTranslation(); // Need help setting up the locale
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card sx={{p: 3}} aria-label={"Install ntfy"}>
|
||||||
|
<Typography variant="h5" sx={{marginBottom: 2}}>
|
||||||
|
{"Install NTFY"}
|
||||||
|
</Typography>
|
||||||
|
<Install/>
|
||||||
|
</Card>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const Install = () => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<FormControl fullWidth variant="standard" sx={{ m: 1 }}>
|
||||||
|
<Button variant="contained">
|
||||||
|
Install
|
||||||
|
</Button>
|
||||||
|
</FormControl>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
export default Preferences;
|
export default Preferences;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue