Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cc58d9e68 | ||
|
|
8794bf428e | ||
|
|
f07197c39f | ||
|
|
e625954b2a | ||
| 90d68492eb | |||
| 4c2cdd9499 | |||
| ff988aa446 | |||
| 62c2d3d99d | |||
| 442489dce2 | |||
| fbc14e854a | |||
| 96d67f0b6a |
@@ -2,11 +2,8 @@ version: '1.0'
|
||||
name: pipeline-build-20220901
|
||||
displayName: pipeline-build
|
||||
triggers:
|
||||
trigger: manual
|
||||
trigger: auto
|
||||
push:
|
||||
branches:
|
||||
prefix:
|
||||
- ''
|
||||
tags:
|
||||
prefix:
|
||||
- ''
|
||||
|
||||
15
main.js
15
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',
|
||||
@@ -477,6 +482,14 @@ function createMenu() {
|
||||
mainWindow.setMenu(menu);
|
||||
}
|
||||
}
|
||||
const shouldQuit = app.makeSingleInstance(() => {
|
||||
if (mainWindow) {
|
||||
if (mainWindow.isMinimized()) mainWindow.restore();
|
||||
mainWindow.show();
|
||||
mainWindow.focus();
|
||||
}
|
||||
});
|
||||
shouldQuit && app.quit();
|
||||
|
||||
const createMainWindow = () => {
|
||||
var mainWindowState = windowStateKeeper({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wewechat",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.3",
|
||||
"description": "make weweChat great again!!!",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
@@ -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",
|
||||
|
||||
11
src/app.js
11
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() {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
border: 0;
|
||||
padding-right: 17px;
|
||||
background: 0;
|
||||
color: #333;
|
||||
color: #808080;
|
||||
font-size: 14px;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -78,7 +78,7 @@ export default class Forward extends Component {
|
||||
onCancel={e => this.close()}
|
||||
show={this.props.show}>
|
||||
<ModalBody className={classes.container}>
|
||||
Forward Message
|
||||
转发消息
|
||||
|
||||
<div className={classes.avatars}>
|
||||
{
|
||||
@@ -100,7 +100,7 @@ export default class Forward extends Component {
|
||||
<button
|
||||
disabled={!this.state.selected.length}
|
||||
onClick={e => this.send(this.state.selected)}>
|
||||
Send Message
|
||||
发送消息
|
||||
</button>
|
||||
|
||||
<button onClick={e => this.close()}>Cancel</button>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -448,7 +448,7 @@ export default class ChatContent extends Component {
|
||||
var caniforward = [1, 3, 47, 43, 49 + 6].includes(message.MsgType);
|
||||
var templates = [
|
||||
{
|
||||
label: 'Delete',
|
||||
label: '删除',
|
||||
click: () => {
|
||||
this.props.deleteMessage(message.MsgId);
|
||||
}
|
||||
@@ -458,7 +458,7 @@ export default class ChatContent extends Component {
|
||||
|
||||
if (caniforward) {
|
||||
templates.unshift({
|
||||
label: 'Forward',
|
||||
label: '转发',
|
||||
click: () => {
|
||||
this.props.showForward(message);
|
||||
}
|
||||
@@ -468,7 +468,7 @@ export default class ChatContent extends Component {
|
||||
if (message.isme
|
||||
&& message.CreateTime - new Date() < 2 * 60 * 1000) {
|
||||
templates.unshift({
|
||||
label: 'Recall',
|
||||
label: '撤回',
|
||||
click: () => {
|
||||
this.props.recallMessage(message);
|
||||
}
|
||||
@@ -494,7 +494,7 @@ export default class ChatContent extends Component {
|
||||
type: 'separator',
|
||||
},
|
||||
{
|
||||
label: 'Empty Content',
|
||||
label: '清空聊天内容',
|
||||
click: () => {
|
||||
this.props.empty(user);
|
||||
}
|
||||
@@ -503,13 +503,13 @@ export default class ChatContent extends Component {
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: helper.isTop(user) ? 'Unsticky' : 'Sticky on Top',
|
||||
label: helper.isTop(user) ? '取消置顶' : '聊天置顶',
|
||||
click: () => {
|
||||
this.props.sticky(user);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
label: '删除',
|
||||
click: () => {
|
||||
this.props.removeChat(user);
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -56,7 +56,7 @@ export default class Chats extends Component {
|
||||
showContextMenu(user) {
|
||||
var menu = new remote.Menu.buildFromTemplate([
|
||||
{
|
||||
label: 'Send Message',
|
||||
label: '发送消息',
|
||||
click: () => {
|
||||
this.props.chatTo(user);
|
||||
}
|
||||
@@ -65,19 +65,19 @@ export default class Chats extends Component {
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: helper.isTop(user) ? 'Unsticky' : 'Sticky on Top',
|
||||
label: helper.isTop(user) ? '取消置顶' : '聊天置顶',
|
||||
click: () => {
|
||||
this.props.sticky(user);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Delete',
|
||||
label: '删除',
|
||||
click: () => {
|
||||
this.props.removeChat(user);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Mark as Read',
|
||||
label: '标为已读',
|
||||
click: () => {
|
||||
this.props.markedRead(user.UserName);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
.container {
|
||||
background: #fff;
|
||||
background: rgba(142, 142, 142, 0.6);
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
display: flex;
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
justify-content: space-between;
|
||||
padding: 12px 17px 0;
|
||||
font-family: 'Helvetica Neue';
|
||||
color: #000;
|
||||
color: #808080;
|
||||
|
||||
& h2 {
|
||||
font-weight: 300;
|
||||
|
||||
@@ -210,7 +210,7 @@ class UserInfo extends Component {
|
||||
color: buttonColor,
|
||||
opacity: .6,
|
||||
}}>
|
||||
{helper.isChatRoom(UserName) || isFriend ? 'Send Message' : 'Add Friend'}
|
||||
{helper.isChatRoom(UserName) || isFriend ? '发送消息' : '添加好友'}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user