From b3aa559465c752fc4505a8cd2f10110c596bf50f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2?= Date: Mon, 4 Oct 2021 11:24:07 +0200 Subject: [PATCH] fix: improved dark theme changed cards background color, and fixed editor on full screen mode. also fixed theme switch. --- package.json | 2 +- src/App.css | 49 ++++++++++++++++++++++++---- src/App.js | 6 ++-- src/components/context/appContext.js | 7 ++-- src/components/infobar/stats.js | 3 +- 5 files changed, 50 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 52276d9..b361781 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "patterns": [ "src" ], - "extensions": "js,jsx" + "extensions": "js,jsx,css" } }, "scripts": { diff --git a/src/App.css b/src/App.css index 56ac6c7..2cdd973 100644 --- a/src/App.css +++ b/src/App.css @@ -127,9 +127,12 @@ } .dark .card { - background-color: #272727; + background-color: #272727!important; +} +.dark .labels { + color: #fff; + background-color: #121212; } - .dark .search .ant-input, .dark .search .ant-btn { background-color: rgba(255, 255, 255, 0.1); color: #fff !important; @@ -144,7 +147,7 @@ } .dark .ant-select-selection-item { - background-color: #272727 !important; + background-color: rgb(94, 94, 94) !important; border: #272727 !important; color: #fff; } @@ -158,7 +161,7 @@ background: #272727 !important; } -.dark .ant-select-selection-item-remove, .dark .ant-progress-circle .ant-progress-text, .dark .ant-radio-wrapper, .dark .ant-tabs, .dark .editor-toolbar button { +.dark .ant-select-selection-item-remove, .dark .ant-progress-circle .ant-progress-text, .dark .ant-radio-wrapper,.dark .ant-checkbox-wrapper, .dark .ant-tabs, .dark .editor-toolbar button { color: #fff !important; } @@ -167,10 +170,42 @@ background: #272727 !important; } -.dark .react-kanban-column, .dark .news-feed { - background-color: #5e5e5e !important; +.dark .react-kanban-column { + background-color: #121212!important; +} +.dark .news-feed{ + background-color: #121212!important; + border: none; } - .dark h2, .dark a { color: #fff !important +} +.dark .ant-tag{ + background-color: #5e5e5e; + border-color: #5e5e5e !important; + color: #fff !important; +} +.dark .ant-select-item-option{ + background-color: #473f46!important; + color : #fff; +} +.dark .ant-select-item-option-active{ + background-color: #5e5e5e !important; +} +.ant-select-item-option-active:not(.ant-select-item-option-disabled) { + background-color: #f5f5f5 !important; + color: #5e5e5e !important; +} +.dark .CodeMirror-wrap, .dark .cm-link, .dark .editor-preview{ + background-color: #121212!important; + color : #fff !important; +} + +.CodeMirror-fullscreen{ + z-index: 9999 !important; +} + +.dark .editor-toolbar.fullscreen { + background-color: #121212!important; + color: #fff!important; } \ No newline at end of file diff --git a/src/App.js b/src/App.js index ad5a4a3..7e1f247 100644 --- a/src/App.js +++ b/src/App.js @@ -16,8 +16,7 @@ import Github from './components/misc/github'; import Todo from './components/todo'; import 'simplebar/dist/simplebar.min.css'; -const { TabPane } = Tabs; - +const { TabPane } = Tabs; const App = () => { return ( @@ -51,8 +50,7 @@ const App = () => {
- - +
diff --git a/src/components/context/appContext.js b/src/components/context/appContext.js index ba0b611..a0555a7 100644 --- a/src/components/context/appContext.js +++ b/src/components/context/appContext.js @@ -6,12 +6,13 @@ export const AppContext = React.createContext(null) export function AppProvider({ children, ...rest }) { let currentTheme = "light"; const [history, setHistory] = useState([]) - const [theme, setTheme] = useState(currentTheme) + const [theme, setTheme] = useState(false) useEffect(() => { chrome.storage.local.get('theme', (thm) => { - setTheme(thm.theme ? thm.theme : currentTheme) - document.body.classList.add(thm.theme ? thm.theme : currentTheme); + let tm = thm.theme ? thm.theme : currentTheme + setTheme(tm) + document.body.classList.add(tm); }); }, []) diff --git a/src/components/infobar/stats.js b/src/components/infobar/stats.js index f00cde8..a7bbeae 100644 --- a/src/components/infobar/stats.js +++ b/src/components/infobar/stats.js @@ -11,7 +11,6 @@ const Stats = () => { const [previousCpuInfo,setPreviousCpuInfo]= useState(false) const {theme,switchTeme } = useApp() - // load memory and cpu usage from chrome apis const loadData = () => { chrome.system.memory.getInfo(function (info) { @@ -57,7 +56,7 @@ const Stats = () => { - + :