From 6b106eb77ffc3f4a39c8d08af3c4352a1b5a4ec7 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Thu, 17 Nov 2022 14:02:54 +0300 Subject: [PATCH 1/4] tokens view colors --- frontend/pages/account/tokens.js | 3 ++- frontend/src/components/TokenRequest.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/pages/account/tokens.js b/frontend/pages/account/tokens.js index 9fb0ef53..6beb7215 100644 --- a/frontend/pages/account/tokens.js +++ b/frontend/pages/account/tokens.js @@ -72,7 +72,7 @@ const Tokens = () => { - + New API access token @@ -85,6 +85,7 @@ const Tokens = () => { { API key label: { Date: Thu, 17 Nov 2022 14:07:20 +0300 Subject: [PATCH 2/4] themes instead props --- frontend/pages/subscriptions.js | 2 +- frontend/src/Theme/Button/index.js | 25 +++++++ frontend/src/Theme/theme.js | 1 + frontend/src/components/ForgotPassword.js | 39 +--------- frontend/src/components/NewDashboardName.js | 3 +- frontend/src/components/NewSubscription.js | 62 ++++------------ frontend/src/components/SignIn.js | 62 ++-------------- frontend/src/components/SignUp.js | 81 ++------------------- 8 files changed, 61 insertions(+), 214 deletions(-) diff --git a/frontend/pages/subscriptions.js b/frontend/pages/subscriptions.js index ecfb469a..d61f2a3c 100644 --- a/frontend/pages/subscriptions.js +++ b/frontend/pages/subscriptions.js @@ -63,7 +63,7 @@ const Subscriptions = () => { { }; }; +const variantPlainOrange = () => { + return { + alignItems: "center", + justifyContent: "center", + border: "solid transparent", + borderRadius: "30px", + variant: "solid", + fontSize: ["md", "md", "lg", "lg", "xl", "xl"], + textColor: "white", + bg: "#F56646", + fontWeight: "700", + padding: "10px 30px", + _hover: { + backgroundColor: "#F4532F", + }, + _focus: { + backgroundColor: "#F4532F", + }, + _active: { + backgroundColor: "#F4532F", + }, + }; +}; + const Button = { // 1. We can update the base styles baseStyle: () => ({ @@ -183,6 +207,7 @@ const Button = { link: variantLink, orangeAndBlue: variantOrangeAndBlue, whiteOnOrange: variantWhiteOnOrange, + plainOrange: variantPlainOrange, }, }; export default Button; diff --git a/frontend/src/Theme/theme.js b/frontend/src/Theme/theme.js index 0cb302e0..5e1cfc10 100644 --- a/frontend/src/Theme/theme.js +++ b/frontend/src/Theme/theme.js @@ -184,6 +184,7 @@ const theme = extendTheme({ black: { 100: "#333399", 200: "#111442", + 300: "#1A1D22", }, }, }); diff --git a/frontend/src/components/ForgotPassword.js b/frontend/src/components/ForgotPassword.js index 87bd7863..253dc968 100644 --- a/frontend/src/components/ForgotPassword.js +++ b/frontend/src/components/ForgotPassword.js @@ -28,24 +28,7 @@ const ForgotPassword = ({ toggleModal }) => { { diff --git a/frontend/src/components/NewDashboardName.js b/frontend/src/components/NewDashboardName.js index 8985a7f9..34894189 100644 --- a/frontend/src/components/NewDashboardName.js +++ b/frontend/src/components/NewDashboardName.js @@ -58,12 +58,11 @@ const NewDashboardName = (props) => { <> - Name: + Name: setName(e.target.value)} placeholder={placeholder} diff --git a/frontend/src/components/NewSubscription.js b/frontend/src/components/NewSubscription.js index 6b1c646a..9c4aee0a 100644 --- a/frontend/src/components/NewSubscription.js +++ b/frontend/src/components/NewSubscription.js @@ -166,7 +166,7 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => { isTruncated maxW="60px" fontSize="sm" - bgColor="#1A1D22" + bgColor="black.300" > @@ -175,13 +175,7 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => { placeholder="What do you want to subscribe to" isTruncated fontSize="sm" - bg="#1A1D22" - _hover={{ - backgroundColor: "#1A1D22", - }} - _focus={{ - backgroundColor: "#1A1D22", - }} + variant="bw" {...getInputProps()} > @@ -192,12 +186,12 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => { w="100%" m={0} p={0} - bg="#1A1D22" + bg="black.300" _hover={{ - backgroundColor: "#1A1D22", + backgroundColor: "black.300", }} _focus={{ - backgroundColor: "#1A1D22", + backgroundColor: "black.300", }} {...getToggleButtonProps({})} aria-label={"toggle menu"} @@ -212,7 +206,7 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => { direction="column" className="menuListTim" {...getMenuProps()} - bgColor="#1A1D22" + bgColor="black.300" borderRadius="md" boxShadow="lg" pos="absolute" @@ -297,7 +291,7 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => { border="1px solid white" borderRadius="7px" > - + { { border="1px solid white" borderRadius="7px" > - + { { )} {type && ( - + {!isModal ? ( { > { icon={} /> { type="input" placeholder="color" name="color" - variant="outline" - backgroundColor="#1A1D22" - _hover={{ - backgroundColor: "#1A1D22", - }} - _focus={{ - backgroundColor: "#1A1D22", - }} + variant="bw" ref={register({ required: "color is required!" })} value={color} onChange={() => null} @@ -471,12 +438,11 @@ const _NewSubscription = ({ onClose, setIsLoading, isModal, initialValue }) => { styles={{ default: { card: { - background: "#1A1D22", + background: "black.300", border: "1px solid white", }, triangle: { borderBottomColor: "white", - // border: "1px solid white", }, }, }} diff --git a/frontend/src/components/SignIn.js b/frontend/src/components/SignIn.js index f8ac9176..335526aa 100644 --- a/frontend/src/components/SignIn.js +++ b/frontend/src/components/SignIn.js @@ -17,7 +17,7 @@ import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants"; const SignIn = ({ toggleModal }) => { const { handleSubmit, errors, register } = useForm(); const { login, isLoading, data } = useLogin(); - const [showPassword, togglePassword] = useState(false); + const [showPassword, setShowPassword] = useState(false); useEffect(() => { if (!data) { @@ -43,29 +43,12 @@ const SignIn = ({ toggleModal }) => { @@ -80,31 +63,14 @@ const SignIn = ({ toggleModal }) => { - togglePassword(!showPassword)}> + setShowPassword(!showPassword)}> @@ -125,26 +91,12 @@ const SignIn = ({ toggleModal }) => { diff --git a/frontend/src/components/SignUp.js b/frontend/src/components/SignUp.js index 9aeb5560..41ee6dfc 100644 --- a/frontend/src/components/SignUp.js +++ b/frontend/src/components/SignUp.js @@ -17,7 +17,7 @@ import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants"; const SignUp = ({ toggleModal }) => { const { handleSubmit, errors, register } = useForm(); const { signUp, isLoading, isSuccess } = useSignUp(); - const [showPassword, togglePassword] = useState(false); + const [showPassword, setShowPassword] = useState(false); useEffect(() => { if (isSuccess) { @@ -41,29 +41,12 @@ const SignUp = ({ toggleModal }) => { @@ -79,24 +62,7 @@ const SignUp = ({ toggleModal }) => { { - togglePassword(!showPassword)}> + setShowPassword(!showPassword)}> @@ -148,26 +97,12 @@ const SignUp = ({ toggleModal }) => { From 86102c90c77eb6535cf6e1ea0d3a6c80fe164c50 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Thu, 17 Nov 2022 17:49:45 +0300 Subject: [PATCH 3/4] themes --- frontend/src/Theme/Input/index.js | 10 +++++----- frontend/src/Theme/theme.js | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/Theme/Input/index.js b/frontend/src/Theme/Input/index.js index e91ec47e..afe0faa4 100644 --- a/frontend/src/Theme/Input/index.js +++ b/frontend/src/Theme/Input/index.js @@ -27,19 +27,19 @@ const bwVariant = () => { border: "1px solid white", borderRadius: "7px", color: "white", - backgroundColor: "#1A1D22", + backgroundColor: "black.300", errorBorderColor: "#EE8686", _hover: { - backgroundColor: "#1A1D22", + backgroundColor: "black.300", }, _focus: { - backgroundColor: "#1A1D22", + backgroundColor: "black.300", }, _placeholder: { color: "#CDCDCD" }, _autofill: { - backgroundColor: "#1A1D22", + backgroundColor: "black.300", textFillColor: "white", - boxShadow: "0 0 0px 1000px #1A1D22 inset", + boxShadow: "0 0 0px 1000px black.300 inset", transition: "background-color 5000s ease-in-out 0s", }, }, diff --git a/frontend/src/Theme/theme.js b/frontend/src/Theme/theme.js index 5e1cfc10..5cabd994 100644 --- a/frontend/src/Theme/theme.js +++ b/frontend/src/Theme/theme.js @@ -165,6 +165,7 @@ const theme = extendTheme({ 700: "#fd7835", 800: "#fd671b", 900: "#FD5602", + 1000: "#F56646", }, green: { @@ -185,6 +186,7 @@ const theme = extendTheme({ 100: "#333399", 200: "#111442", 300: "#1A1D22", + 400: "#292929", }, }, }); From 9a8961e3e3076ffbd727e4ad6cff5d58f9afb095 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Thu, 17 Nov 2022 18:31:46 +0300 Subject: [PATCH 4/4] dashboard edit --- frontend/pages/dashboard/[dashboardId].js | 3 +- frontend/src/components/AutoCompleter.js | 25 ++++++++------ frontend/src/components/CheckboxGrouped.js | 2 +- frontend/src/components/NewDashboardChart.js | 34 ++++++++----------- .../core/providers/OverlayProvider/index.js | 6 ++-- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/frontend/pages/dashboard/[dashboardId].js b/frontend/pages/dashboard/[dashboardId].js index 80f2b610..9be63c88 100644 --- a/frontend/pages/dashboard/[dashboardId].js +++ b/frontend/pages/dashboard/[dashboardId].js @@ -160,7 +160,8 @@ const Analytics = () => { }) } size="md" - colorScheme="blue" + color="orange.1000" + borderColor="1000" variant="outline" icon={} /> diff --git a/frontend/src/components/AutoCompleter.js b/frontend/src/components/AutoCompleter.js index 464ce719..e8a5d313 100644 --- a/frontend/src/components/AutoCompleter.js +++ b/frontend/src/components/AutoCompleter.js @@ -53,8 +53,13 @@ const AutoCompleter = ({ return ( - + - + {" "}