From 18dc02c700a34dca483637e9359feae19c26a737 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Thu, 16 Dec 2021 18:39:44 +0530 Subject: [PATCH] Fix mxid colors for dark theme Signed-off-by: Ajay Bura --- src/app/atoms/avatar/Avatar.jsx | 2 +- src/app/atoms/avatar/Avatar.scss | 2 +- src/app/organisms/welcome/Welcome.jsx | 2 +- src/app/templates/auth/Auth.jsx | 12 ++++++------ src/app/templates/client/Client.jsx | 2 +- src/index.scss | 19 +++++++++++++++++++ src/util/colorMXID.js | 11 ++++++++++- 7 files changed, 39 insertions(+), 11 deletions(-) diff --git a/src/app/atoms/avatar/Avatar.jsx b/src/app/atoms/avatar/Avatar.jsx index 0c84f6b0..d3663997 100644 --- a/src/app/atoms/avatar/Avatar.jsx +++ b/src/app/atoms/avatar/Avatar.jsx @@ -32,7 +32,7 @@ function Avatar({ iconSrc !== null ? : text !== null && ( - + {twemojify([...text][0])} ) diff --git a/src/app/atoms/avatar/Avatar.scss b/src/app/atoms/avatar/Avatar.scss index 9df00276..8c561c17 100644 --- a/src/app/atoms/avatar/Avatar.scss +++ b/src/app/atoms/avatar/Avatar.scss @@ -45,7 +45,7 @@ border-radius: inherit; .text { - color: var(--tc-primary-high); + color: var(--bg-surface); } } } \ No newline at end of file diff --git a/src/app/organisms/welcome/Welcome.jsx b/src/app/organisms/welcome/Welcome.jsx index 3ffd05c4..f339df31 100644 --- a/src/app/organisms/welcome/Welcome.jsx +++ b/src/app/organisms/welcome/Welcome.jsx @@ -10,7 +10,7 @@ function Welcome() {
Cinny logo - Welcome to Cinny + Welcome to Cinny Yet another matrix client
diff --git a/src/app/templates/auth/Auth.jsx b/src/app/templates/auth/Auth.jsx index af11d3f0..127965d6 100644 --- a/src/app/templates/auth/Auth.jsx +++ b/src/app/templates/auth/Auth.jsx @@ -193,7 +193,7 @@ function Login({ loginFlow, baseUrl }) { return ( <>
- Login + Login {isPassword && ( } {process.type === 'm.login.email.identity' && }
- {!isDisabled && Register} + {!isDisabled && Register} {isDisabled && {registerInfo.error}}
{!isDisabled && ( @@ -537,7 +537,7 @@ function Auth() {
- Cinny + Cinny
@@ -584,7 +584,7 @@ function Recaptcha({ message, sitekey, onChange }) { return (
- {message} + {message}
@@ -601,7 +601,7 @@ function Terms({ url, onSubmit }) {
{ e.preventDefault(); onSubmit(); }}>
- Agree with terms + Agree with terms
In order to complete registration, you need to agree to the terms and conditions.
@@ -626,7 +626,7 @@ function EmailVerify({ email, onContinue }) { return (
- Verify email + Verify email
{'Please check your email '} diff --git a/src/app/templates/client/Client.jsx b/src/app/templates/client/Client.jsx index 3bb6055b..837724fb 100644 --- a/src/app/templates/client/Client.jsx +++ b/src/app/templates/client/Client.jsx @@ -49,7 +49,7 @@ function Client() { {loadingMsg}
- Cinny + Cinny
); diff --git a/src/index.scss b/src/index.scss index 9aa8c4da..3377445c 100644 --- a/src/index.scss +++ b/src/index.scss @@ -74,6 +74,15 @@ --ic-caution-normal: rgba(255, 179, 0, 80%); --ic-danger-normal: rgba(240, 71, 71, 0.7); + /* user mxid colors */ + --mx-uc-1: hsl(208, 66%, 53%); + --mx-uc-2: hsl(302, 49%, 45%); + --mx-uc-3: hsl(163, 97%, 36%); + --mx-uc-4: hsl(343, 75%, 61%); + --mx-uc-5: hsl(24, 100%, 59%); + --mx-uc-6: hsl(181, 63%, 47%); + --mx-uc-7: hsl(242, 89%, 65%); + --mx-uc-8: hsl(94, 65%, 50%); /* system icon size | -ic-[size]: value */ --ic-large: 38px; @@ -229,6 +238,16 @@ /* system icons | --ic-[background type]-[priority]: value */ --ic-surface-normal: rgba(255, 255, 255, 84%); --ic-primary-normal: #ffffff; + + /* user mxid colors */ + --mx-uc-1: hsl(208, 100%, 58%); + --mx-uc-2: hsl(301, 100%, 60%); + --mx-uc-3: hsl(163, 93%, 41%); + --mx-uc-4: hsl(343, 91%, 66%); + --mx-uc-5: hsl(24, 100%, 67%); + --mx-uc-6: hsl(181, 100%, 50%); + --mx-uc-7: hsl(243, 100%, 74%); + --mx-uc-8: hsl(94, 66%, 50%); /* shadow and overlay */ --bg-overlay: rgba(0, 0, 0, 50%); diff --git a/src/util/colorMXID.js b/src/util/colorMXID.js index 54eec64a..4745120c 100644 --- a/src/util/colorMXID.js +++ b/src/util/colorMXID.js @@ -1,6 +1,15 @@ // https://github.com/cloudrac3r/cadencegq/blob/master/pug/mxid.pug -const colors = ['#368bd6', '#ac3ba8', '#03b381', '#e64f7a', '#ff812d', '#2dc2c5', '#5c56f5', '#74d12c']; +const colors = [ + 'var(--mx-uc-1)', + 'var(--mx-uc-2)', + 'var(--mx-uc-3)', + 'var(--mx-uc-4)', + 'var(--mx-uc-5)', + 'var(--mx-uc-6)', + 'var(--mx-uc-7)', + 'var(--mx-uc-8)', +]; function hashCode(str) { let hash = 0; let i;