From 12d45ced848a6ca0ee7fef4edb6e4bbabea7867e Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 4 May 2022 10:14:59 -0400 Subject: [PATCH 1/4] Support dark-mode logo --- app/soapbox/features/ui/components/navbar.tsx | 7 ++++++- app/soapbox/normalizers/soapbox/soapbox_config.ts | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/soapbox/features/ui/components/navbar.tsx b/app/soapbox/features/ui/components/navbar.tsx index c6d810f0cf..25085f6d75 100644 --- a/app/soapbox/features/ui/components/navbar.tsx +++ b/app/soapbox/features/ui/components/navbar.tsx @@ -23,6 +23,7 @@ const Navbar = () => { // In demo mode, use the Soapbox logo const logo = settings.get('demo') ? require('images/soapbox-logo.svg') : soapboxConfig.logo; + const logoDarkMode = soapboxConfig.logoDarkMode; const onOpenSidebar = () => dispatch(openSidebar()); @@ -47,7 +48,11 @@ const Navbar = () => { > {logo ? ( - Logo + Logo + {logoDarkMode && ( + Logo + )} + ) : ( diff --git a/app/soapbox/normalizers/soapbox/soapbox_config.ts b/app/soapbox/normalizers/soapbox/soapbox_config.ts index dd9d771a44..e37a4faad0 100644 --- a/app/soapbox/normalizers/soapbox/soapbox_config.ts +++ b/app/soapbox/normalizers/soapbox/soapbox_config.ts @@ -82,6 +82,7 @@ export const CryptoAddressRecord = ImmutableRecord({ export const SoapboxConfigRecord = ImmutableRecord({ appleAppId: null, logo: '', + logoDarkMode: null, banner: '', brandColor: '', // Empty accentColor: '', From 1a9b0be3abebf781daee0c9413c77f2310eb4b5f Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 4 May 2022 10:19:09 -0400 Subject: [PATCH 2/4] Improve dark-mode support for Emoji Picker --- app/styles/emoji_picker.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/styles/emoji_picker.scss b/app/styles/emoji_picker.scss index 3b7f2bd3ad..f1a3ea40d2 100644 --- a/app/styles/emoji_picker.scss +++ b/app/styles/emoji_picker.scss @@ -13,7 +13,7 @@ } .emoji-mart-bar { - border: 0 solid #e5e7eb; + @apply border-0 border-solid border-gray-200 dark:border-slate-700; } .emoji-mart-bar:first-child { @@ -77,7 +77,7 @@ } .emoji-mart-search input { - @apply text-sm pr-9 block w-full border-gray-300 dark:border-gray-600 rounded-full focus:ring-primary-500 focus:border-primary-500; + @apply text-sm pr-9 block w-full border-gray-300 dark:bg-slate-800 dark:border-gray-600 rounded-full focus:ring-primary-500 focus:border-primary-500; &::-moz-focus-inner { border: 0; From a987b5f2966cdb22c55d10904cebd5cf2a617c10 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 4 May 2022 10:50:53 -0400 Subject: [PATCH 3/4] Improve dark-mode --- app/soapbox/components/list.tsx | 4 ++-- .../components/ui/button/useButtonStyles.ts | 2 +- app/soapbox/components/ui/menu/menu.css | Bin 817 -> 817 bytes app/soapbox/components/ui/select/select.tsx | 2 +- app/soapbox/components/ui/tabs/tabs.tsx | 2 +- .../features/account/components/header.js | Bin 24190 -> 24266 bytes app/soapbox/features/notifications/index.js | Bin 7381 -> 7382 bytes .../features/security/mfa/enable_otp_form.tsx | 5 ++--- .../security/mfa/otp_confirm_form.tsx | 4 ++-- 9 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/soapbox/components/list.tsx b/app/soapbox/components/list.tsx index 404fb8aa5e..3adc81c38f 100644 --- a/app/soapbox/components/list.tsx +++ b/app/soapbox/components/list.tsx @@ -37,8 +37,8 @@ const ListItem: React.FC = ({ label, hint, children, onClick }) => { return ( diff --git a/app/soapbox/components/ui/button/useButtonStyles.ts b/app/soapbox/components/ui/button/useButtonStyles.ts index f670d028e2..2e92b33a65 100644 --- a/app/soapbox/components/ui/button/useButtonStyles.ts +++ b/app/soapbox/components/ui/button/useButtonStyles.ts @@ -21,7 +21,7 @@ const useButtonStyles = ({ 'border-transparent text-white bg-primary-600 hover:bg-primary-700 focus:ring-primary-500 focus:ring-2 focus:ring-offset-2', secondary: 'border-transparent text-primary-700 bg-primary-100 hover:bg-primary-200 focus:ring-primary-500 focus:ring-2 focus:ring-offset-2', - ghost: 'shadow-none border-gray-200 text-gray-700 bg-white focus:ring-primary-500 focus:ring-2 focus:ring-offset-2', + ghost: 'shadow-none border-gray-200 text-gray-700 bg-white dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200 focus:ring-primary-500 focus:ring-2 focus:ring-offset-2', accent: 'border-transparent text-white bg-accent-500 hover:bg-accent-300 focus:ring-pink-500 focus:ring-2 focus:ring-offset-2', danger: 'border-transparent text-danger-700 bg-danger-100 hover:bg-danger-200 focus:ring-danger-500 focus:ring-2 focus:ring-offset-2', transparent: 'border-transparent text-gray-800 backdrop-blur-sm bg-white/75 hover:bg-white/80', diff --git a/app/soapbox/components/ui/menu/menu.css b/app/soapbox/components/ui/menu/menu.css index ca619a7bed2518ad71c4b751088b52379c544955..cb72cd70245569e40c2902d9461ad064e60f7cc8 100644 GIT binary patch delta 15 WcmdnUwvlav7BjoKfq^wwEf)YIEd#ay delta 15 WcmdnUwvlav7Bjn((props, ref) => { return (