diff --git a/src/app/components/elements/SlateEditor.scss b/src/app/components/elements/SlateEditor.scss index c8939d557ff63d8ee239dd38f011c6eea53bd946..f619394b3a6a028d6f188709634d65e02e9d31d6 100644 --- a/src/app/components/elements/SlateEditor.scss +++ b/src/app/components/elements/SlateEditor.scss @@ -1,14 +1,13 @@ .SlateEditor > div[contenteditable="true"] { min-height: 12rem; - //@include themify($themes) { - // background-color: themed('moduleBackgroundColor'); - //} + @include themify($themes) { + color: themed('textColorPrimary'); + background-color: themed('moduleBackgroundColor'); + border: themed('border'); + } - color: #000; - background-color: #ffffff; border-radius: 3px; - border: 1px solid #cacaca; padding: 0.5rem; } diff --git a/src/app/components/elements/VisualEditor.scss b/src/app/components/elements/VisualEditor.scss index 27600ad5b74828eb1c714ae3e999460a2a7f8bee..9cd687c7e737680c1b0112b2b64d794a0d67ca5a 100644 --- a/src/app/components/elements/VisualEditor.scss +++ b/src/app/components/elements/VisualEditor.scss @@ -7,4 +7,31 @@ min-height: 200px; } } + + > div { + @include themify($themes) { + background-color: themed('moduleBackgroundColor') !important; + border-color: themed('border') !important; + color: themed('textColorPrimary') !important; + } + } + + :global(.public-DraftEditor-content) { + @include themify($themes) { + color: themed('textColorPrimary') !important; + background-color: themed('moduleBackgroundColor') !important; + } + } + + :global(.public-DraftEditorPlaceholder-root) { + @include themify($themes) { + color: themed('textColorSecondary') !important; + } + } + + :global(.public-DraftStyleDefault-block) { + @include themify($themes) { + color: themed('textColorPrimary'); + } + } } diff --git a/src/app/components/modules/ConnectedSidePanel/index.jsx b/src/app/components/modules/ConnectedSidePanel/index.jsx index 2bd106b95589c59370b09b166499236cc19b7ce5..dc3c7b6ee6ae4b93d24c9cb40ff875ee9f8da8e2 100644 --- a/src/app/components/modules/ConnectedSidePanel/index.jsx +++ b/src/app/components/modules/ConnectedSidePanel/index.jsx @@ -7,6 +7,7 @@ const mapStateToProps = (state, ownProps) => { visible: state.user.get('show_side_panel'), current: state.user.get('current'), username: state.user.getIn(['current', 'username']), + nightmodeEnabled: state.app.getIn(['user_preferences', 'nightmode']), ...ownProps, }; }; diff --git a/src/app/components/modules/Header/index.jsx b/src/app/components/modules/Header/index.jsx index b08471aab0566fd7921b99c868ab19959b0974e3..abf69dbad1185ea57ac4de3fab5dbb1a87247906 100644 --- a/src/app/components/modules/Header/index.jsx +++ b/src/app/components/modules/Header/index.jsx @@ -213,7 +213,7 @@ class Header extends React.Component { link: '#', icon: 'eye', onClick: toggleNightmode, - value: tt('g.toggle_nightmode'), + value: nightmodeEnabled ? tt('g.light_mode') : tt('g.dark_mode'), }, { link: wallet_link, icon: 'wallet', value: tt('g.wallet') }, { diff --git a/src/app/components/modules/SidePanel/index.jsx b/src/app/components/modules/SidePanel/index.jsx index 82c6575aab3d82e131e8e8c3308bc56c390d7790..d517a6afd09c6060757fd38cd728bee777e1ebca 100644 --- a/src/app/components/modules/SidePanel/index.jsx +++ b/src/app/components/modules/SidePanel/index.jsx @@ -9,7 +9,7 @@ import Icon from 'app/components/elements/Icon'; import { Link } from 'react-router'; const SidePanel = ({ - alignment, visible, hideSidePanel, username, walletUrl, toggleNightmode + alignment, visible, hideSidePanel, username, walletUrl, toggleNightmode, nightmodeEnabled }) => { if (process.env.BROWSER) { if (visible) { @@ -71,7 +71,7 @@ const SidePanel = ({ }, */ { - label: tt('g.toggle_nightmode'), + label: nightmodeEnabled ? tt('g.light_mode') : tt('g.dark_mode'), link: '/', onClick: toggleNightmode, }, @@ -168,6 +168,7 @@ SidePanel.propTypes = { hideSidePanel: PropTypes.func.isRequired, username: PropTypes.string, toggleNightmode: PropTypes.func.isRequired, + nightmodeEnabled: PropTypes.bool, }; SidePanel.defaultProps = { diff --git a/src/app/locales/en.json b/src/app/locales/en.json index 79e33b1f303643b384a3e90bae33ea5a7df34a78..2421cfd4c38c39566d9bc51374b35915c5401387 100644 --- a/src/app/locales/en.json +++ b/src/app/locales/en.json @@ -143,6 +143,8 @@ "to": " to ", "topics": "Topics", "toggle_nightmode": "Night Mode", + "dark_mode": "Dark Mode", + "light_mode": "Light Mode", "all_tags": "All posts", "all_tags_mobile": "All posts", "transfer": "Transfer ", diff --git a/src/app/locales/ja.json b/src/app/locales/ja.json index e7d759893d01f6e335b90100a0cac1f7237b36cc..a55496a3e94878f2545f857085a91487fb9cd636 100644 --- a/src/app/locales/ja.json +++ b/src/app/locales/ja.json @@ -102,6 +102,8 @@ "to": " 宛先:", "topics": "トピック", "toggle_nightmode": "ナイトモード切替", + "dark_mode": "ダークモード", + "light_mode": "ライトモード", "all_tags": "すべてのタグ", "transfer": "送信 ", "trending_topics": "トレンドトピック", diff --git a/src/app/locales/pl.json b/src/app/locales/pl.json index cc26af4a1c6e63dbac9691dfa9800c6502279176..d81efea3ec6f2cfc62c767415c13af0e1de050f5 100644 --- a/src/app/locales/pl.json +++ b/src/app/locales/pl.json @@ -136,6 +136,8 @@ "to": "do", "topics": "Tematy", "toggle_nightmode": "Tryb nocny", + "dark_mode": "Tryb ciemny", + "light_mode": "Tryb jasny", "all_tags": "Wszystkie wpisy", "all_tags_mobile": "Wszystkie wpisy", "transfer": "Prześlij", diff --git a/src/app/locales/zh.json b/src/app/locales/zh.json index c75238738baf7981d7111824b49955037b3181f0..0a5e8479766f1beafdd0a6ea6a94bac5b20ec77b 100644 --- a/src/app/locales/zh.json +++ b/src/app/locales/zh.json @@ -101,7 +101,8 @@ "to": "至", "topics": "主题", "toggle_nightmode": "切换夜间模式", - + "dark_mode": "深色模式", + "light_mode": "浅色模式", "all_tags": "所有标签", "transfer": "转账", "trending_topics": "热门话题",