Merge remote-tracking branch 'upstream/master' into feat/incidents-page
This commit is contained in:
commit
b4e6d7b7c0
14 files changed
+302
-243
No files matched your search
@@ -1,24 +1,15 @@
|
||||
.config-box {
|
||||
display: flex;
|
||||
padding: 30px 40px;
|
||||
padding: var(--env-var-spacing-4) 50px;
|
||||
padding-bottom: 60px;
|
||||
border: 1px solid var(--env-var-color-16);
|
||||
border-radius: var(--env-var-radius-1);
|
||||
justify-content: space-between;
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
|
||||
.config-box-desc {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.config-box-desc-title {
|
||||
color: var(--env-var-color-5);
|
||||
font-size: var(--env-var-font-size-large);
|
||||
font-weight: 700;
|
||||
margin-bottom: var(--env-var-spacing-1);
|
||||
}
|
||||
|
||||
.config-box-desc-text {
|
||||
color: var(--env-var-color-5);
|
||||
font-size: var(--env-var-font-size-medium);
|
||||
.config-box>.MuiStack-root{
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
.config-box>.MuiStack-root:first-of-type{
|
||||
margin-right: var(--env-var-spacing-3);
|
||||
}
|
||||
@@ -1,3 +1,16 @@
|
||||
.MuiButtonBase-root.MuiRadio-root.MuiRadio-colorPrimary.PrivateSwitchBase-root.MuiRadio-root.MuiRadio-colorPrimary.MuiRadio-root.MuiRadio-colorPrimary.css-w5ovia-MuiButtonBase-root-MuiRadio-root {
|
||||
padding-top: 0;
|
||||
.create-monitor-form .custom-radio-button.MuiFormControlLabel-root {
|
||||
padding: 5px;
|
||||
margin: -5px;
|
||||
border-radius: var(--env-var-radius-1);
|
||||
}
|
||||
.create-monitor-form .custom-radio-button.MuiFormControlLabel-root:hover {
|
||||
background-color: var(--env-var-color-13);
|
||||
}
|
||||
.create-monitor-form .custom-radio-button.MuiFormControlLabel-root svg{
|
||||
stroke-width: 0;
|
||||
}
|
||||
|
||||
.custom-radio-button.MuiFormControlLabel-root .MuiButtonBase-root {
|
||||
margin-right: var(--env-var-spacing-1);
|
||||
padding: 0;
|
||||
}
|
||||
@@ -18,28 +18,37 @@
|
||||
* @returns {JSX.Element} - The rendered RadioButton component.
|
||||
*/
|
||||
|
||||
import { FormControlLabel, Radio } from "@mui/material";
|
||||
import React from "react";
|
||||
import "./index.css";
|
||||
import PropTypes from "prop-types";
|
||||
import { FormControlLabel, Radio, Typography } from "@mui/material";
|
||||
import { useTheme } from "@emotion/react";
|
||||
import "./index.css";
|
||||
|
||||
function RadioButton(props) {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<div className="custom-radio-button">
|
||||
<FormControlLabel
|
||||
checked={props.checked}
|
||||
value={props.value}
|
||||
control={<Radio id={props.id} size={props.size} />}
|
||||
onChange={props.onChange}
|
||||
label={
|
||||
<div>
|
||||
<div className="service-check-list-title">{props.title}</div>
|
||||
<div className="service-check-list-desc">{props.desc}</div>
|
||||
</div>
|
||||
}
|
||||
labelPlacement="end"
|
||||
/>
|
||||
</div>
|
||||
<FormControlLabel
|
||||
className="custom-radio-button"
|
||||
checked={props.checked}
|
||||
value={props.value}
|
||||
control={
|
||||
<Radio
|
||||
id={props.id}
|
||||
size={props.size}
|
||||
sx={{ color: theme.palette.secondary.main }}
|
||||
/>
|
||||
}
|
||||
onChange={props.onChange}
|
||||
label={
|
||||
<>
|
||||
<Typography component="p">{props.title}</Typography>
|
||||
<Typography component="h6" mt="2px">
|
||||
{props.desc}
|
||||
</Typography>
|
||||
</>
|
||||
}
|
||||
labelPlacement="end"
|
||||
sx={{ margin: 0, alignItems: "flex-start" }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -107,9 +107,7 @@ const PasswordPanel = () => {
|
||||
</div>
|
||||
<div className="edit-password-form__wrapper">
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
Current password
|
||||
</Typography>
|
||||
<Typography component="h1">Current password</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<PasswordTextField
|
||||
@@ -123,7 +121,7 @@ const PasswordPanel = () => {
|
||||
error={errors[idToName["edit-current-password"]] ? true : false}
|
||||
/>
|
||||
{errors[idToName["edit-current-password"]] ? (
|
||||
<Typography variant="h5" component="p" className="input-error">
|
||||
<Typography component="p" className="input-error">
|
||||
{errors[idToName["edit-current-password"]]}
|
||||
</Typography>
|
||||
) : (
|
||||
@@ -133,9 +131,7 @@ const PasswordPanel = () => {
|
||||
</div>
|
||||
<div className="edit-password-form__wrapper">
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
New password
|
||||
</Typography>
|
||||
<Typography component="h1">New password</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<PasswordTextField
|
||||
@@ -149,7 +145,7 @@ const PasswordPanel = () => {
|
||||
error={errors[idToName["edit-new-password"]] ? true : false}
|
||||
/>
|
||||
{errors[idToName["edit-new-password"]] ? (
|
||||
<Typography variant="h5" component="p" className="input-error">
|
||||
<Typography component="p" className="input-error">
|
||||
{errors[idToName["edit-new-password"]]}
|
||||
</Typography>
|
||||
) : (
|
||||
@@ -159,9 +155,7 @@ const PasswordPanel = () => {
|
||||
</div>
|
||||
<div className="edit-password-form__wrapper">
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
Confirm new password
|
||||
</Typography>
|
||||
<Typography component="h1">Confirm new password</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<PasswordTextField
|
||||
@@ -175,7 +169,7 @@ const PasswordPanel = () => {
|
||||
error={errors[idToName["edit-confirm-password"]] ? true : false}
|
||||
/>
|
||||
{errors[idToName["edit-confirm-password"]] ? (
|
||||
<Typography variant="h5" component="p" className="input-error">
|
||||
<Typography component="p" className="input-error">
|
||||
{errors[idToName["edit-confirm-password"]]}
|
||||
</Typography>
|
||||
) : (
|
||||
|
||||
@@ -152,9 +152,7 @@ const ProfilePanel = () => {
|
||||
<form className="edit-profile-form" noValidate spellCheck="false">
|
||||
<div className="edit-profile-form__wrapper">
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
First name
|
||||
</Typography>
|
||||
<Typography component="h1">First name</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<StringTextField
|
||||
@@ -167,7 +165,7 @@ const ProfilePanel = () => {
|
||||
error={errors[idToName["edit-first-name"]] ? true : false}
|
||||
/>
|
||||
{errors[idToName["edit-first-name"]] ? (
|
||||
<Typography variant="h5" component="p" className="input-error">
|
||||
<Typography component="p" className="input-error">
|
||||
{errors[idToName["edit-first-name"]]}
|
||||
</Typography>
|
||||
) : (
|
||||
@@ -177,9 +175,7 @@ const ProfilePanel = () => {
|
||||
</div>
|
||||
<div className="edit-profile-form__wrapper">
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
Last name
|
||||
</Typography>
|
||||
<Typography component="h1">Last name</Typography>
|
||||
</Stack>
|
||||
<Stack>
|
||||
<StringTextField
|
||||
@@ -192,7 +188,7 @@ const ProfilePanel = () => {
|
||||
error={errors[idToName["edit-last-name"]] ? true : false}
|
||||
/>
|
||||
{errors[idToName["edit-last-name"]] ? (
|
||||
<Typography variant="h5" component="p" className="input-error">
|
||||
<Typography component="p" className="input-error">
|
||||
{errors[idToName["edit-last-name"]]}
|
||||
</Typography>
|
||||
) : (
|
||||
@@ -202,10 +198,8 @@ const ProfilePanel = () => {
|
||||
</div>
|
||||
<div className="edit-profile-form__wrapper">
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
Email
|
||||
</Typography>
|
||||
<Typography variant="h5" component="p">
|
||||
<Typography component="h1">Email</Typography>
|
||||
<Typography component="p">
|
||||
This is your current email address — it cannot be changed.
|
||||
</Typography>
|
||||
</Stack>
|
||||
@@ -221,7 +215,7 @@ const ProfilePanel = () => {
|
||||
disabled={true}
|
||||
/>
|
||||
{errors[idToName["edit-email"]] ? (
|
||||
<Typography variant="h5" component="p" className="input-error">
|
||||
<Typography component="p" className="input-error">
|
||||
{errors[idToName["edit-email"]]}
|
||||
</Typography>
|
||||
) : (
|
||||
@@ -231,10 +225,8 @@ const ProfilePanel = () => {
|
||||
</div>
|
||||
<div className="edit-profile-form__wrapper">
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
Your photo
|
||||
</Typography>
|
||||
<Typography variant="h5" component="p">
|
||||
<Typography component="h1">Your photo</Typography>
|
||||
<Typography component="p">
|
||||
This photo will be displayed in your profile page.
|
||||
</Typography>
|
||||
</Stack>
|
||||
@@ -292,10 +284,8 @@ const ProfilePanel = () => {
|
||||
<form className="delete-profile-form" noValidate spellCheck="false">
|
||||
<div className="delete-profile-form__wrapper">
|
||||
<Stack direction="column" gap="15px">
|
||||
<Typography variant="h4" component="h1">
|
||||
Delete account
|
||||
</Typography>
|
||||
<Typography variant="h5" component="p">
|
||||
<Typography component="h1">Delete account</Typography>
|
||||
<Typography component="p">
|
||||
Note that deleting your account will remove all data from our
|
||||
system. This is permanent and non-recoverable.
|
||||
</Typography>
|
||||
@@ -335,14 +325,10 @@ const ProfilePanel = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Typography id="modal-delete-account" variant="h4" component="h1">
|
||||
<Typography id="modal-delete-account" component="h1">
|
||||
Really delete this account?
|
||||
</Typography>
|
||||
<Typography
|
||||
id="delete-account-confirmation"
|
||||
variant="h5"
|
||||
component="p"
|
||||
>
|
||||
<Typography id="delete-account-confirmation" component="p">
|
||||
If you delete your account, you will no longer be able to sign in,
|
||||
and all of your data will be deleted. Deleting your account is
|
||||
permanent and non-recoverable action.
|
||||
@@ -386,7 +372,7 @@ const ProfilePanel = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Typography id="modal-update-picture" variant="h4" component="h1">
|
||||
<Typography id="modal-update-picture" component="h1">
|
||||
Upload Image
|
||||
</Typography>
|
||||
<ImageField
|
||||
|
||||
@@ -186,13 +186,9 @@ const TeamPanel = () => {
|
||||
return (
|
||||
<TabPanel value="team">
|
||||
<form className="edit-organization-form">
|
||||
<div
|
||||
className="edit-organization-form__wrapper"
|
||||
>
|
||||
<div className="edit-organization-form__wrapper">
|
||||
<Stack>
|
||||
<Typography variant="h4" component="h1">
|
||||
Organization name
|
||||
</Typography>
|
||||
<Typography component="h1">Organization name</Typography>
|
||||
</Stack>
|
||||
<Stack
|
||||
id="org-name-flex-container"
|
||||
@@ -247,7 +243,7 @@ const TeamPanel = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Typography id="modal-edit-org-name" variant="h4" component="h1">
|
||||
<Typography id="modal-edit-org-name" component="h1">
|
||||
Rename this organization?
|
||||
</Typography>
|
||||
<TextField
|
||||
@@ -280,9 +276,7 @@ const TeamPanel = () => {
|
||||
</Modal>
|
||||
<form className="edit-team-form" noValidate spellCheck="false">
|
||||
<div className="edit-team-form__wrapper">
|
||||
<Typography variant="h4" component="h1">
|
||||
Team members
|
||||
</Typography>
|
||||
<Typography component="h1">Team members</Typography>
|
||||
</div>
|
||||
<div className="edit-team-form__wrapper compact">
|
||||
<Stack
|
||||
@@ -488,10 +482,10 @@ const TeamPanel = () => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Typography id="modal-invite-member" variant="h4" component="h1">
|
||||
<Typography id="modal-invite-member" component="h1">
|
||||
Invite new team member
|
||||
</Typography>
|
||||
<Typography id="invite-member-to-team" variant="h5" component="p">
|
||||
<Typography id="invite-member-to-team" component="p">
|
||||
When you add a new team member, they will get access to all
|
||||
monitors.
|
||||
</Typography>
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
import PropTypes from "prop-types";
|
||||
import { Stack, Typography } from "@mui/material";
|
||||
import "./flexibileTextField.css";
|
||||
import React from "react";
|
||||
import { useTheme } from "@emotion/react";
|
||||
|
||||
/**
|
||||
* @param {Object} props - The component props.
|
||||
* @param {string} props.id - The ID of the input field.
|
||||
* @param {string} props.title - The title or label for the input field.
|
||||
* @param {string} props.type - The type of the input field (e.g., 'text', 'password').
|
||||
* @param {string} props.placeholder - The placeholder text for the input field.
|
||||
* @param {string} props.value - The current value of the input field.
|
||||
* @param {function} props.onChange - The function to call when the input field value changes.
|
||||
* @param {string} [props.error] - Optional. Error message to display if there's an error with the input.
|
||||
* @returns {JSX.Element} JSX Element representing the flexible text input field.
|
||||
*/
|
||||
|
||||
const FlexibileTextField = ({
|
||||
id,
|
||||
@@ -8,20 +22,38 @@ const FlexibileTextField = ({
|
||||
placeholder,
|
||||
value,
|
||||
onChange,
|
||||
error,
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
<div className="flexibile-textfield">
|
||||
<div className="flexibile-textfield-title">{title}</div>
|
||||
<Stack className="flexible-textfield" gap={theme.gap.small}>
|
||||
<Typography component="h2">{title}</Typography>
|
||||
<input
|
||||
id={id}
|
||||
type={type}
|
||||
className="flexibile-textfield-input"
|
||||
placeholder={placeholder}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
/>
|
||||
</div>
|
||||
{error ? (
|
||||
<Typography component="p" className="input-error">
|
||||
{error}
|
||||
</Typography>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</Stack>
|
||||
);
|
||||
};
|
||||
|
||||
FlexibileTextField.propTypes = {
|
||||
id: PropTypes.string.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
type: PropTypes.string.isRequired,
|
||||
placeholder: PropTypes.string,
|
||||
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
onChange: PropTypes.func.isRequired,
|
||||
error: PropTypes.string,
|
||||
};
|
||||
|
||||
export default FlexibileTextField;
|
||||
@@ -1,22 +1,30 @@
|
||||
.flexibile-textfield-title {
|
||||
.flexible-textfield{
|
||||
position: relative;
|
||||
}
|
||||
.flexible-textfield h2.MuiTypography-root{
|
||||
color: var(--env-var-color-5);
|
||||
font-size: var(--env-var-font-size-medium);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.flexibile-textfield-input {
|
||||
width: 292.8px;
|
||||
height: 6.8px;
|
||||
padding: var(--env-var-spacing-1);
|
||||
margin-top: 10px;
|
||||
.flexible-textfield h2.MuiTypography-root span{
|
||||
opacity: 0.6;
|
||||
}
|
||||
.flexible-textfield input {
|
||||
min-width: 300px;
|
||||
height: 34px;
|
||||
padding: 0 var(--env-var-spacing-1);
|
||||
border: 1px solid var(--env-var-color-4);
|
||||
border-radius: var(--env-var-radius-1);
|
||||
}
|
||||
|
||||
.flexibile-textfield-input:focus {
|
||||
.flexible-textfield p.MuiTypography-root.input-error {
|
||||
color: var(--env-var-color-24);
|
||||
opacity: 0.8;
|
||||
position: absolute;
|
||||
top: calc(100% + 5px);
|
||||
}
|
||||
.flexible-textfield:has(p.MuiTypography-root.input-error) input{
|
||||
border-color: var(--env-var-color-24);
|
||||
}
|
||||
.flexible-textfield input:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.flexibile-textfield-input::placeholder {
|
||||
color: var(--env-var-color-25);
|
||||
font-size: var(--env-var-font-size-medium);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user