8 Commits

Author SHA1 Message Date
Riceneeder
8cc58d9e68 !9 v1.2.3
Merge pull request !9 from Riceneeder/dev;
v1.2.3 增添darkmode,调整优化界面、颜色,以适应darkmode
2022-09-03 02:48:28 +00:00
Riceneeder
8794bf428e Merge branch 'master' of gitee.com:spark-community-works-collections/wewechat-plus-plus into dev
Signed-off-by: Riceneeder <845541909@qq.com>
2022-09-03 02:18:10 +00:00
Riceneeder
f07197c39f v1.2.3
v1.2.3 增添darkmode,调整优化界面、颜色,以适应darkmode

Signed-off-by: Riceneeder <86492950+Riceneeder@users.noreply.github.com>
2022-09-03 10:07:48 +08:00
Riceneeder
e625954b2a !8 1.2.2
Merge pull request !8 from shenmo/auto-4915358-master-5d4eb191
2022-09-02 13:09:19 +00:00
90d68492eb single 2022-09-02 14:18:11 +08:00
4c2cdd9499 single 2022-09-02 14:08:16 +08:00
ff988aa446 single 2022-09-02 14:02:41 +08:00
62c2d3d99d single 2022-09-02 13:59:05 +08:00
12 changed files with 48 additions and 29 deletions

26
main.js
View File

@@ -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',
@@ -331,8 +336,6 @@ let avatarCache = {};
let avatarPlaceholder = `${__dirname}/src/assets/images/user-fallback.png`;
const icon = `${__dirname}/src/assets/images/dock.png`;
async function getIcon(cookies, userid, src) {
var cached = avatarCache[userid];
var icon;
@@ -479,20 +482,19 @@ function createMenu() {
mainWindow.setMenu(menu);
}
}
// 实现单例,在启动第二个实例后,激活主窗口,然后退出第二个实例
const shouldQuit = app.makeSingleInstance(() => {
if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore()
mainWindow.focus()
if (mainWindow.isMinimized()) mainWindow.restore();
mainWindow.show();
mainWindow.focus();
}
})
shouldQuit && app.quit()
});
shouldQuit && app.quit();
const createMainWindow = () => {
var mainWindowState = windowStateKeeper({
defaultWidth: 1300,
defaultHeight: 700,
defaultWidth: 745,
defaultHeight: 450,
});
mainWindow = new BrowserWindow({
@@ -714,6 +716,7 @@ const createMainWindow = () => {
mainWindow.webContents.setUserAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8');
createMenu();
};
app.setName(pkg.name);
app.dock && app.dock.setIcon(icon);
@@ -722,7 +725,6 @@ app.on('before-quit', () => {
// Fix issues #14
forceQuit = true;
});
app.on('activate', e => {
if (!mainWindow.isVisible()) {
mainWindow.show();

View File

@@ -1,6 +1,6 @@
{
"name": "wewechat",
"version": "1.2.2",
"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",

View File

@@ -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() {

View File

@@ -14,7 +14,7 @@
border: 0;
padding-right: 17px;
background: 0;
color: #333;
color: #808080;
font-size: 14px;
outline: 0;
}

View File

@@ -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
<i className="icon-ion-social-github" />
Fork on Gitee
<i className="icon-ion-fork-repo" />
</a>
</div>
);

View File

@@ -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';

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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;

View File

@@ -1,6 +1,6 @@
.container {
background: #fff;
background: rgba(142, 142, 142, 0.6);
height: 100vh;
width: 100vw;
display: flex;

View File

@@ -172,7 +172,14 @@ export default class Settings extends Component {
</ul>
</div>
<div className={classes.column}>
<h2>TODO:</h2>
<h2>更新记录:</h2>
<p>
v1.2.3 增添darkmode调整优化界面颜色以适应darkmode<br />
v1.2.2 添加单例运行在后台时在启动器中启动会拉到前台而不是再启动一个wewechat更多的汉化<br />
v1.2.1 汉化<br />
v1.2.0 Make weweChat great again!!! Fix uos support
</p>
</div>
</div>
);

View File

@@ -4,7 +4,7 @@
justify-content: space-between;
padding: 12px 17px 0;
font-family: 'Helvetica Neue';
color: #000;
color: #808080;
& h2 {
font-weight: 300;