Got rid of all overridden styles.
This commit is contained in:
1 parent
a296a70bcd
commit
5fff398a25
1 file changed
+93
-43
@@ -135,13 +135,10 @@ const NotificationIntegrationModal = ({
|
|||||||
maxWidth="md"
|
maxWidth="md"
|
||||||
sx={{
|
sx={{
|
||||||
'& .MuiDialog-paper': {
|
'& .MuiDialog-paper': {
|
||||||
backgroundColor: theme.palette.primary.main,
|
|
||||||
color: '#344054',
|
|
||||||
maxWidth: '775px'
|
maxWidth: '775px'
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<Box sx={{ display: 'flex', height: '300px' }}>
|
<Box sx={{ display: 'flex', height: '300px' }}>
|
||||||
{/* Left sidebar with tabs */}
|
{/* Left sidebar with tabs */}
|
||||||
@@ -149,10 +146,15 @@ const NotificationIntegrationModal = ({
|
|||||||
borderRight: 1,
|
borderRight: 1,
|
||||||
borderColor: 'divider',
|
borderColor: 'divider',
|
||||||
minWidth: '200px',
|
minWidth: '200px',
|
||||||
pr: 20
|
pr: theme.spacing(10)
|
||||||
}}>
|
}}>
|
||||||
<Typography variant="subtitle1" sx={{ my: 2, fontWeight: 'bold', fontSize: '0.9rem', color: '#344054'}}>
|
<Typography variant="subtitle1" sx={{
|
||||||
Add or edit notifications
|
my: theme.spacing(1),
|
||||||
|
fontWeight: 'bold',
|
||||||
|
fontSize: '0.9rem',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>
|
||||||
|
Add or edit notifications
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Tabs
|
<Tabs
|
||||||
@@ -170,25 +172,36 @@ const NotificationIntegrationModal = ({
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Right side content */}
|
{/* Right side content */}
|
||||||
<Box sx={{ flex: 1, pl: theme.spacing(15) }}>
|
<Box sx={{ flex: 1, pl: theme.spacing(7.5) }}>
|
||||||
{/* Slack Tab */}
|
{/* Slack Tab */}
|
||||||
<TabPanel value={tabValue} index={0}>
|
<TabPanel value={tabValue} index={0}>
|
||||||
<Typography variant="subtitle1" component="h4" sx={{ fontWeight: 'bold' }}>Slack</Typography>
|
<Typography variant="subtitle1" component="h4" sx={{
|
||||||
<Typography sx={{ mt: 1, mb: 3 }}>
|
fontWeight: 'bold',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>Slack</Typography>
|
||||||
|
<Typography sx={{
|
||||||
|
mt: theme.spacing(0.5),
|
||||||
|
mb: theme.spacing(1.5),
|
||||||
|
color: theme.palette.primary.contrastTextTertiary
|
||||||
|
}}>
|
||||||
To enable Slack notifications, create a Slack app and enable incoming webhooks. After that, simply provide the webhook URL here.
|
To enable Slack notifications, create a Slack app and enable incoming webhooks. After that, simply provide the webhook URL here.
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Box sx={{ pl: 3 }}>
|
<Box sx={{ pl: theme.spacing(1.5) }}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
id="enable-slack"
|
id="enable-slack"
|
||||||
label="Enable Slack notifications"
|
label="Enable Slack notifications"
|
||||||
isChecked={integrations.slack}
|
isChecked={integrations.slack}
|
||||||
onChange={(e) => handleIntegrationChange('slack', e.target.checked)}
|
onChange={(e) => handleIntegrationChange('slack', e.target.checked)}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: theme.spacing(1) }}>
|
||||||
<Typography sx={{ mb: 4, fontWeight: 'bold' }}>Webhook URL</Typography>
|
<Typography sx={{
|
||||||
|
mb: theme.spacing(2),
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>Webhook URL</Typography>
|
||||||
<TextInput
|
<TextInput
|
||||||
id="slack-webhook"
|
id="slack-webhook"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -199,7 +212,7 @@ const NotificationIntegrationModal = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: theme.spacing(1) }}>
|
||||||
<Button
|
<Button
|
||||||
variant="text"
|
variant="text"
|
||||||
color="info"
|
color="info"
|
||||||
@@ -213,12 +226,19 @@ const NotificationIntegrationModal = ({
|
|||||||
|
|
||||||
{/* Discord Tab */}
|
{/* Discord Tab */}
|
||||||
<TabPanel value={tabValue} index={1}>
|
<TabPanel value={tabValue} index={1}>
|
||||||
<Typography variant="subtitle1" component="h4" sx={{ fontWeight: 'bold' }}>Discord</Typography>
|
<Typography variant="subtitle1" component="h4" sx={{
|
||||||
<Typography sx={{ mt: 1, mb: 3 }}>
|
fontWeight: 'bold',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>Discord</Typography>
|
||||||
|
<Typography sx={{
|
||||||
|
mt: theme.spacing(0.5),
|
||||||
|
mb: theme.spacing(1.5),
|
||||||
|
color: theme.palette.primary.contrastTextTertiary
|
||||||
|
}}>
|
||||||
To send data to a Discord channel from Checkmate via Discord notifications using webhooks, you can use Discord's incoming Webhooks feature.
|
To send data to a Discord channel from Checkmate via Discord notifications using webhooks, you can use Discord's incoming Webhooks feature.
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Box sx={{ pl: 3 }}>
|
<Box sx={{ pl: theme.spacing(1.5) }}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
id="enable-discord"
|
id="enable-discord"
|
||||||
label="Enable Discord notifications"
|
label="Enable Discord notifications"
|
||||||
@@ -227,8 +247,12 @@ const NotificationIntegrationModal = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: theme.spacing(1) }}>
|
||||||
<Typography sx={{ mb: 4, fontWeight: 'bold' }}>Discord Webhook URL</Typography>
|
<Typography sx={{
|
||||||
|
mb: theme.spacing(2),
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>Discord Webhook URL</Typography>
|
||||||
<TextInput
|
<TextInput
|
||||||
id="discord-webhook"
|
id="discord-webhook"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -239,7 +263,7 @@ const NotificationIntegrationModal = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: theme.spacing(1) }}>
|
||||||
<Button
|
<Button
|
||||||
variant="text"
|
variant="text"
|
||||||
color="info"
|
color="info"
|
||||||
@@ -253,12 +277,19 @@ const NotificationIntegrationModal = ({
|
|||||||
|
|
||||||
{/* Telegram Tab */}
|
{/* Telegram Tab */}
|
||||||
<TabPanel value={tabValue} index={2}>
|
<TabPanel value={tabValue} index={2}>
|
||||||
<Typography variant="subtitle1" component="h4" sx={{ fontWeight: 'bold' }}>Telegram</Typography>
|
<Typography variant="subtitle1" component="h4" sx={{
|
||||||
<Typography sx={{ mt: 1, mb: 3 }}>
|
fontWeight: 'bold',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>Telegram</Typography>
|
||||||
|
<Typography sx={{
|
||||||
|
mt: theme.spacing(0.5),
|
||||||
|
mb: theme.spacing(1.5),
|
||||||
|
color: theme.palette.primary.contrastTextTertiary
|
||||||
|
}}>
|
||||||
To enable Telegram notifications, create a Telegram bot using BotFather, an official bot for creating and managing Telegram bots. Then, get the API token and chat ID and write them down here.
|
To enable Telegram notifications, create a Telegram bot using BotFather, an official bot for creating and managing Telegram bots. Then, get the API token and chat ID and write them down here.
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Box sx={{ pl: 3 }}>
|
<Box sx={{ pl: theme.spacing(1.5) }}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
id="enable-telegram"
|
id="enable-telegram"
|
||||||
label="Enable Telegram notifications"
|
label="Enable Telegram notifications"
|
||||||
@@ -267,8 +298,12 @@ const NotificationIntegrationModal = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: theme.spacing(1) }}>
|
||||||
<Typography sx={{ mb: 4, fontWeight: 'bold' }}>Your bot token</Typography>
|
<Typography sx={{
|
||||||
|
mb: theme.spacing(2),
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>Your bot token</Typography>
|
||||||
<TextInput
|
<TextInput
|
||||||
id="telegram-token"
|
id="telegram-token"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -279,8 +314,12 @@ const NotificationIntegrationModal = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: theme.spacing(1) }}>
|
||||||
<Typography sx={{ mb: 4, fontWeight: 'bold' }}>Your Chat ID</Typography>
|
<Typography sx={{
|
||||||
|
mb: theme.spacing(2),
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>Your Chat ID</Typography>
|
||||||
<TextInput
|
<TextInput
|
||||||
id="telegram-chat-id"
|
id="telegram-chat-id"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -291,7 +330,7 @@ const NotificationIntegrationModal = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: theme.spacing(1) }}>
|
||||||
<Button
|
<Button
|
||||||
variant="text"
|
variant="text"
|
||||||
color="info"
|
color="info"
|
||||||
@@ -305,12 +344,19 @@ const NotificationIntegrationModal = ({
|
|||||||
|
|
||||||
{/* Webhooks Tab */}
|
{/* Webhooks Tab */}
|
||||||
<TabPanel value={tabValue} index={3}>
|
<TabPanel value={tabValue} index={3}>
|
||||||
<Typography variant="subtitle1" component="h4" sx={{ fontWeight: 'bold' }}>Webhooks</Typography>
|
<Typography variant="subtitle1" component="h4" sx={{
|
||||||
<Typography sx={{ mt: 1, mb: 3 }}>
|
fontWeight: 'bold',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>Webhooks</Typography>
|
||||||
|
<Typography sx={{
|
||||||
|
mt: theme.spacing(0.5),
|
||||||
|
mb: theme.spacing(1.5),
|
||||||
|
color: theme.palette.primary.contrastTextTertiary
|
||||||
|
}}>
|
||||||
You can set up a custom webhook to receive notifications when incidents occur.
|
You can set up a custom webhook to receive notifications when incidents occur.
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
<Box sx={{ pl: 3 }}>
|
<Box sx={{ pl: theme.spacing(1.5) }}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
id="enable-webhook"
|
id="enable-webhook"
|
||||||
label="Enable Webhook notifications"
|
label="Enable Webhook notifications"
|
||||||
@@ -319,8 +365,12 @@ const NotificationIntegrationModal = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: theme.spacing(1) }}>
|
||||||
<Typography sx={{ mb: 4, fontWeight: 'bold' }}>Webhook URL</Typography>
|
<Typography sx={{
|
||||||
|
mb: theme.spacing(2),
|
||||||
|
fontWeight: 'bold',
|
||||||
|
color: theme.palette.primary.contrastTextSecondary
|
||||||
|
}}>Webhook URL</Typography>
|
||||||
<TextInput
|
<TextInput
|
||||||
id="webhook-url"
|
id="webhook-url"
|
||||||
type="text"
|
type="text"
|
||||||
@@ -331,7 +381,7 @@ const NotificationIntegrationModal = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box sx={{ mt: 2 }}>
|
<Box sx={{ mt: theme.spacing(1) }}>
|
||||||
<Button
|
<Button
|
||||||
variant="text"
|
variant="text"
|
||||||
color="info"
|
color="info"
|
||||||
@@ -349,9 +399,9 @@ const NotificationIntegrationModal = ({
|
|||||||
p: theme.spacing(4),
|
p: theme.spacing(4),
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
mb: theme.spacing(10),
|
mb: theme.spacing(5),
|
||||||
mr: theme.spacing(10)
|
mr: theme.spacing(5)
|
||||||
}}>
|
}}>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="accent"
|
||||||
|
|||||||
Reference in new issue
Block a user