From f07197c39f7f47d083aa913d50d5acc23f329153 Mon Sep 17 00:00:00 2001 From: Riceneeder <86492950+Riceneeder@users.noreply.github.com> Date: Sat, 3 Sep 2022 10:07:48 +0800 Subject: [PATCH] v1.2.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v1.2.3 增添darkmode,调整优化界面、颜色,以适应darkmode Signed-off-by: Riceneeder <86492950+Riceneeder@users.noreply.github.com> --- main.js | 7 ++++++- package.json | 7 ++++--- src/app.js | 11 +++++++++++ src/js/components/MessageInput/style.css | 2 +- src/js/pages/Footer/Settings.js | 4 ++-- src/js/pages/Footer/style.css | 5 ++--- src/js/pages/Header/style.css | 2 +- src/js/pages/Home/ChatContent/style.css | 6 +++--- src/js/pages/Layout.css | 1 - src/js/pages/NewChat/style.css | 2 +- src/js/pages/Settings/index.js | 9 ++++++++- src/js/pages/Settings/style.css | 2 +- 12 files changed, 40 insertions(+), 18 deletions(-) diff --git a/main.js b/main.js index af24f19..e865bd6 100644 --- a/main.js +++ b/main.js @@ -214,7 +214,12 @@ let mainMenu = [ type: 'separator', }, { - label: '' + label: 'Darkmode', + accelerator: !isOsx ? 'Ctrl+Shift+D' : 'Shift+Cmd+D', + click() { + mainWindow.show(); + mainWindow.webContents.send('darkmode'); + } }, { type: 'separator', diff --git a/package.json b/package.json index 55d8ac1..e3fc0e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wewechat", - "version": "1.2.1", + "version": "1.2.3", "description": "make weweChat great again!!!", "main": "main.js", "scripts": { @@ -23,7 +23,7 @@ "author": { "email": "845541909@qq.com" }, -"homepage": "https://gitee.com/spark-community-works-collections/wewechat-plus-plus/README.md", + "homepage": "https://gitee.com/spark-community-works-collections/wewechat-plus-plus/README.md", "repository": { "type": "git", "url": "https://gitee.com/spark-community-works-collections/wewechat-plus-plus" @@ -57,7 +57,7 @@ "category": "Chat", "executableName": "wewechat", "target": [ - "deb", + "deb", "AppImage" ] }, @@ -86,6 +86,7 @@ "axios": "^0.18.0", "browser-md5-file": "^1.0.0", "classname": "^0.0.0", + "darkmode-js": "^1.5.7", "delegate": "^3.1.3", "electron-context-menu": "^0.10.0", "electron-json-storage": "^4.0.2", diff --git a/src/app.js b/src/app.js index 19e21c0..9d275e6 100644 --- a/src/app.js +++ b/src/app.js @@ -4,6 +4,7 @@ import { render } from 'react-dom'; import { Provider } from 'mobx-react'; import { HashRouter } from 'react-router-dom'; import { ipcRenderer } from 'electron'; +import Darkmode from 'darkmode-js'; import './global.css'; import './assets/fonts/icomoon/style.css'; @@ -27,6 +28,11 @@ class App extends Component { componentDidMount() { var navigator = this.refs.navigator; + const options = { + time: '0.5s', + mixColor: '#cccccc', + }; + const darkmode = new Darkmode(options); // Hide the tray icon ipcRenderer.on('hide-tray', () => { @@ -130,6 +136,11 @@ class App extends Component { ipcRenderer.on('show-errors', (event, args) => { stores.snackbar.showMessage(args.message); }); + + // Dark mode + ipcRenderer.on('darkmode', () => { + darkmode.toggle(); + }); } render() { diff --git a/src/js/components/MessageInput/style.css b/src/js/components/MessageInput/style.css index 2cb80f5..7c782f5 100644 --- a/src/js/components/MessageInput/style.css +++ b/src/js/components/MessageInput/style.css @@ -14,7 +14,7 @@ border: 0; padding-right: 17px; background: 0; - color: #333; + color: #808080; font-size: 14px; outline: 0; } diff --git a/src/js/pages/Footer/Settings.js b/src/js/pages/Footer/Settings.js index 323da96..4cd98b3 100644 --- a/src/js/pages/Footer/Settings.js +++ b/src/js/pages/Footer/Settings.js @@ -19,8 +19,8 @@ export default class Placeholder extends Component { className={classes.button} href="https://gitee.com/spark-community-works-collections/wewechat-plus-plus" target="_blank"> - Fork on Github - + Fork on Gitee + ); diff --git a/src/js/pages/Footer/style.css b/src/js/pages/Footer/style.css index 5628b65..41a82fb 100644 --- a/src/js/pages/Footer/style.css +++ b/src/js/pages/Footer/style.css @@ -7,7 +7,6 @@ .footer { position: relative; - background: #fff; box-shadow: inset 0 1px 0 0 var(--shadow-color); z-index: 9; @@ -78,7 +77,7 @@ line-height: 60px; border: 0; background: 0; - color: #333; + color: #808080; font-size: 14px; outline: 0; } @@ -107,7 +106,7 @@ position: relative; margin-right: 17px; width: 166px; - color: rgba(0, 0, 0, .8); + color: #808080; font-size: 14px; padding: 9px 8px; font-family: 'Roboto'; diff --git a/src/js/pages/Header/style.css b/src/js/pages/Header/style.css index 4f25a84..3bc8cdd 100644 --- a/src/js/pages/Header/style.css +++ b/src/js/pages/Header/style.css @@ -8,7 +8,7 @@ font-family: "system-ui"; font-weight: normal; width: 100%; - color: #777; + color: #c3c3c3; text-align: center; background: rgba(255, 255, 255, 1); -webkit-user-select: none; diff --git a/src/js/pages/Home/ChatContent/style.css b/src/js/pages/Home/ChatContent/style.css index 2335636..e0b37b0 100644 --- a/src/js/pages/Home/ChatContent/style.css +++ b/src/js/pages/Home/ChatContent/style.css @@ -114,7 +114,7 @@ width: 32px; border-radius: 0; z-index: 9; - box-shadow: 0 0 10px 0 rgba(0, 0, 0, .5); + box-shadow: 0 0 10px 0 rgba(225, 225, 225, 0.5); cursor: pointer; } @@ -165,7 +165,7 @@ & .content { position: relative; max-width: 100%; - background: #fff; + background: rgba(225, 225, 225, 0.5); box-shadow: 0 6px 28px 0 rgba(230, 230, 230, 100); } @@ -538,7 +538,7 @@ } & .content { - background: #7ebef8; + background: rgba(0, 0, 200, 0.5); } & p { diff --git a/src/js/pages/Layout.css b/src/js/pages/Layout.css index c27058b..a0aaacd 100644 --- a/src/js/pages/Layout.css +++ b/src/js/pages/Layout.css @@ -3,7 +3,6 @@ height: calc(100vh - 100px); overflow: hidden; overflow-y: auto; - background: rgba(255, 255, 255, .8); box-shadow: inset 0 1px 0 0 #eaedea; filter: blur(0); transition: .2s; diff --git a/src/js/pages/NewChat/style.css b/src/js/pages/NewChat/style.css index 449321c..6c61395 100644 --- a/src/js/pages/NewChat/style.css +++ b/src/js/pages/NewChat/style.css @@ -1,6 +1,6 @@ .container { - background: #fff; + background: rgba(142, 142, 142, 0.6); height: 100vh; width: 100vw; display: flex; diff --git a/src/js/pages/Settings/index.js b/src/js/pages/Settings/index.js index 72de178..c5d73f7 100644 --- a/src/js/pages/Settings/index.js +++ b/src/js/pages/Settings/index.js @@ -172,7 +172,14 @@ export default class Settings extends Component {
+ v1.2.3 增添darkmode,调整优化界面、颜色,以适应darkmode
+ v1.2.2 添加单例运行,在后台时在启动器中启动会拉到前台而不是再启动一个wewechat,更多的汉化
+ v1.2.1 汉化
+ v1.2.0 Make weweChat great again!!! Fix uos support
+