Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ad1fc333e | ||
|
|
8cc58d9e68 | ||
|
|
8794bf428e | ||
|
|
f07197c39f | ||
|
|
e625954b2a | ||
| 90d68492eb | |||
| 4c2cdd9499 | |||
| ff988aa446 | |||
| 62c2d3d99d | |||
| 442489dce2 | |||
| fbc14e854a | |||
| 96d67f0b6a |
@@ -2,11 +2,8 @@ version: '1.0'
|
|||||||
name: pipeline-build-20220901
|
name: pipeline-build-20220901
|
||||||
displayName: pipeline-build
|
displayName: pipeline-build
|
||||||
triggers:
|
triggers:
|
||||||
trigger: manual
|
trigger: auto
|
||||||
push:
|
push:
|
||||||
branches:
|
|
||||||
prefix:
|
|
||||||
- ''
|
|
||||||
tags:
|
tags:
|
||||||
prefix:
|
prefix:
|
||||||
- ''
|
- ''
|
||||||
|
|||||||
15
main.js
15
main.js
@@ -214,7 +214,12 @@ let mainMenu = [
|
|||||||
type: 'separator',
|
type: 'separator',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: ''
|
label: 'Darkmode',
|
||||||
|
accelerator: !isOsx ? 'Ctrl+Shift+D' : 'Shift+Cmd+D',
|
||||||
|
click() {
|
||||||
|
mainWindow.show();
|
||||||
|
mainWindow.webContents.send('darkmode');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
@@ -477,6 +482,14 @@ function createMenu() {
|
|||||||
mainWindow.setMenu(menu);
|
mainWindow.setMenu(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const shouldQuit = app.makeSingleInstance(() => {
|
||||||
|
if (mainWindow) {
|
||||||
|
if (mainWindow.isMinimized()) mainWindow.restore();
|
||||||
|
mainWindow.show();
|
||||||
|
mainWindow.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
shouldQuit && app.quit();
|
||||||
|
|
||||||
const createMainWindow = () => {
|
const createMainWindow = () => {
|
||||||
var mainWindowState = windowStateKeeper({
|
var mainWindowState = windowStateKeeper({
|
||||||
|
|||||||
16
package.json
16
package.json
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "wewechat",
|
"name": "wewechat",
|
||||||
"version": "1.2.1",
|
"version": "1.2.3",
|
||||||
"description": "make weweChat great again!!!",
|
"description": "make weweChat great again!!!",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "yarn build && ./node_modules/.bin/electron ./dist/main.js",
|
||||||
"js-lint": "node node_modules/.bin/eslint .",
|
"js-lint": "node node_modules/.bin/eslint .",
|
||||||
"css-lint": "stylelint --fix src/**/*.css",
|
"css-lint": "stylelint --fix src/**/*.css",
|
||||||
"lint": "yarn css-lint && yarn js-lint",
|
"lint": "yarn css-lint && yarn js-lint",
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
"author": {
|
"author": {
|
||||||
"email": "845541909@qq.com"
|
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitee.com/spark-community-works-collections/wewechat-plus-plus"
|
"url": "https://gitee.com/spark-community-works-collections/wewechat-plus-plus"
|
||||||
@@ -54,10 +54,10 @@
|
|||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"icon": "../resource",
|
"icon": "../resource",
|
||||||
"category": "Chat",
|
"category": "Network",
|
||||||
"executableName": "wewechat",
|
"executableName": "wewechat",
|
||||||
"target": [
|
"target": [
|
||||||
"deb",
|
"deb",
|
||||||
"AppImage"
|
"AppImage"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -75,9 +75,8 @@
|
|||||||
},
|
},
|
||||||
"publish": [
|
"publish": [
|
||||||
{
|
{
|
||||||
"provider": "github",
|
"provider": "generic",
|
||||||
"owner": "riceneeder",
|
"url": "https://gitee.com/spark-community-works-collections/wewechat-plus-plus/raw/master/"
|
||||||
"repo": "weweChat"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -86,6 +85,7 @@
|
|||||||
"axios": "^0.18.0",
|
"axios": "^0.18.0",
|
||||||
"browser-md5-file": "^1.0.0",
|
"browser-md5-file": "^1.0.0",
|
||||||
"classname": "^0.0.0",
|
"classname": "^0.0.0",
|
||||||
|
"darkmode-js": "^1.5.7",
|
||||||
"delegate": "^3.1.3",
|
"delegate": "^3.1.3",
|
||||||
"electron-context-menu": "^0.10.0",
|
"electron-context-menu": "^0.10.0",
|
||||||
"electron-json-storage": "^4.0.2",
|
"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 { Provider } from 'mobx-react';
|
||||||
import { HashRouter } from 'react-router-dom';
|
import { HashRouter } from 'react-router-dom';
|
||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
|
import Darkmode from 'darkmode-js';
|
||||||
|
|
||||||
import './global.css';
|
import './global.css';
|
||||||
import './assets/fonts/icomoon/style.css';
|
import './assets/fonts/icomoon/style.css';
|
||||||
@@ -27,6 +28,11 @@ class App extends Component {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
var navigator = this.refs.navigator;
|
var navigator = this.refs.navigator;
|
||||||
|
const options = {
|
||||||
|
time: '0.5s',
|
||||||
|
mixColor: '#cccccc',
|
||||||
|
};
|
||||||
|
const darkmode = new Darkmode(options);
|
||||||
|
|
||||||
// Hide the tray icon
|
// Hide the tray icon
|
||||||
ipcRenderer.on('hide-tray', () => {
|
ipcRenderer.on('hide-tray', () => {
|
||||||
@@ -130,6 +136,11 @@ class App extends Component {
|
|||||||
ipcRenderer.on('show-errors', (event, args) => {
|
ipcRenderer.on('show-errors', (event, args) => {
|
||||||
stores.snackbar.showMessage(args.message);
|
stores.snackbar.showMessage(args.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Dark mode
|
||||||
|
ipcRenderer.on('darkmode', () => {
|
||||||
|
darkmode.toggle();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
@@ -5,6 +5,13 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>weweChat</title>
|
<title>weweChat</title>
|
||||||
</head>
|
</head>
|
||||||
|
<style>
|
||||||
|
.darkmode-layer {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export default class MessageInput extends Component {
|
|||||||
&& user.length === 1
|
&& user.length === 1
|
||||||
&& user.slice(-1).pop().UserName === this.props.me.UserName
|
&& user.slice(-1).pop().UserName === this.props.me.UserName
|
||||||
) {
|
) {
|
||||||
this.props.showMessage('Can\'t send messages to yourself.');
|
this.props.showMessage('不能向自己发送消息');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ export default class MessageInput extends Component {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (!res) {
|
if (!res) {
|
||||||
await this.props.showMessage(batch ? `Sending message to ${e.NickName} has failed!` : 'Failed to send message.');
|
await this.props.showMessage(batch ? `Sending message to ${e.NickName} has failed!` : '消息发送失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -114,7 +114,7 @@ export default class MessageInput extends Component {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// In batch mode just show the failed message
|
// In batch mode just show the failed message
|
||||||
showMessage('Failed to send image.');
|
showMessage('发送图片失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
border: 0;
|
border: 0;
|
||||||
padding-right: 17px;
|
padding-right: 17px;
|
||||||
background: 0;
|
background: 0;
|
||||||
color: #333;
|
color: #808080;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ export default class Avatar extends Component {
|
|||||||
className="disabledDrag"
|
className="disabledDrag"
|
||||||
src="assets/images/offline.png" />
|
src="assets/images/offline.png" />
|
||||||
|
|
||||||
<h1>Oops, seems like you are offline!</h1>
|
<h1>离线了离线了!</h1>
|
||||||
|
|
||||||
<button onClick={e => window.location.reload()}>Reload</button>
|
<button onClick={e => window.location.reload()}>尝试重新加载</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export default class UserList extends Component {
|
|||||||
return (
|
return (
|
||||||
<li className={classes.notfound}>
|
<li className={classes.notfound}>
|
||||||
<img src="assets/images/crash.png" />
|
<img src="assets/images/crash.png" />
|
||||||
<h3>Can't find any people matching '{searching}'</h3>
|
<h3>没有搜索到 '{searching}'</h3>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -180,7 +180,7 @@ export default class UserList extends Component {
|
|||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
onKeyUp={e => this.navigation(e)}
|
onKeyUp={e => this.navigation(e)}
|
||||||
onInput={e => this.search(e.target.value)}
|
onInput={e => this.search(e.target.value)}
|
||||||
placeholder="Type to Search..."
|
placeholder="输入需要搜索的对象"
|
||||||
ref="input"
|
ref="input"
|
||||||
type="text" />
|
type="text" />
|
||||||
|
|
||||||
|
|||||||
@@ -27,18 +27,18 @@ export default class AddFriend extends Component {
|
|||||||
onCancel={e => close()}
|
onCancel={e => close()}
|
||||||
show={show}>
|
show={show}>
|
||||||
<ModalBody className={classes.container}>
|
<ModalBody className={classes.container}>
|
||||||
Send friend request first
|
发送好友请求
|
||||||
|
|
||||||
<input
|
<input
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
defaultValue={`Hallo, im ${me && me.User.NickName}`}
|
defaultValue={`你好,我是 ${me && me.User.NickName}`}
|
||||||
ref="input"
|
ref="input"
|
||||||
type="text" />
|
type="text" />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button onClick={e => this.addFriend()}>Send</button>
|
<button onClick={e => this.addFriend()}>发送</button>
|
||||||
|
|
||||||
<button onClick={e => close()}>Cancel</button>
|
<button onClick={e => close()}>取消</button>
|
||||||
</div>
|
</div>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export default class AddMember extends Component {
|
|||||||
onCancel={e => this.close()}
|
onCancel={e => this.close()}
|
||||||
show={this.props.show}>
|
show={this.props.show}>
|
||||||
<ModalBody className={classes.container}>
|
<ModalBody className={classes.container}>
|
||||||
Add Members
|
添加群组
|
||||||
|
|
||||||
<div className={classes.avatars}>
|
<div className={classes.avatars}>
|
||||||
{
|
{
|
||||||
@@ -110,10 +110,10 @@ export default class AddMember extends Component {
|
|||||||
<button
|
<button
|
||||||
disabled={!this.state.selected.length}
|
disabled={!this.state.selected.length}
|
||||||
onClick={e => this.add(this.state.selected)}>
|
onClick={e => this.add(this.state.selected)}>
|
||||||
Add
|
添加
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button onClick={e => this.close()}>Cancel</button>
|
<button onClick={e => this.close()}>取消</button>
|
||||||
</div>
|
</div>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export default class BatchSend extends Component {
|
|||||||
<input
|
<input
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
onInput={e => this.search(e.target.value)}
|
onInput={e => this.search(e.target.value)}
|
||||||
placeholder="Batch to send message, Choose one or more user."
|
placeholder="批量发送消息,选择一个或多个用户"
|
||||||
type="text" />
|
type="text" />
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
@@ -126,7 +126,7 @@ export default class BatchSend extends Component {
|
|||||||
(searching && filtered.length === 0) && (
|
(searching && filtered.length === 0) && (
|
||||||
<div className={classes.notfound}>
|
<div className={classes.notfound}>
|
||||||
<img src="assets/images/crash.png" />
|
<img src="assets/images/crash.png" />
|
||||||
<h1>Can't find any people matching '{searching}'</h1>
|
<h1>不能找到 '{searching}'</h1>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,14 +49,14 @@ export default class ConfirmImagePaste extends Component {
|
|||||||
fullscreen={true}
|
fullscreen={true}
|
||||||
show={show}>
|
show={show}>
|
||||||
<ModalBody className={classes.container}>
|
<ModalBody className={classes.container}>
|
||||||
Send image ?
|
发送图片 ?
|
||||||
|
|
||||||
<img src={image} />
|
<img src={image} />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<input onKeyUp={e => this.navigation(e)} id="imageInputHidden" style={{'zIndex': '-1', 'position': 'absolute', 'top': '-20px'}} />
|
<input onKeyUp={e => this.navigation(e)} id="imageInputHidden" style={{'zIndex': '-1', 'position': 'absolute', 'top': '-20px'}} />
|
||||||
<button onClick={e => ok()}>Send</button>
|
<button onClick={e => ok()}>发送</button>
|
||||||
<button onClick={e => cancel()}>Cancel</button>
|
<button onClick={e => cancel()}>取消</button>
|
||||||
</div>
|
</div>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export default class Contacts extends Component {
|
|||||||
<div className={clazz(classes.container, classes.notfound)}>
|
<div className={clazz(classes.container, classes.notfound)}>
|
||||||
<div className={classes.inner}>
|
<div className={classes.inner}>
|
||||||
<img src="assets/images/crash.png" />
|
<img src="assets/images/crash.png" />
|
||||||
<h1>Can't find any people matching '{query}'</h1>
|
<h1>找不到 '{query}'</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export default class Placeholder extends Component {
|
|||||||
className={classes.button}
|
className={classes.button}
|
||||||
href="mailto:var.845541909@qq.com?Subject=WeWeChat%20Feedback"
|
href="mailto:var.845541909@qq.com?Subject=WeWeChat%20Feedback"
|
||||||
target="_blank">
|
target="_blank">
|
||||||
Send Feedback
|
发送反馈
|
||||||
<i className="icon-ion-ios-email-outline" />
|
<i className="icon-ion-ios-email-outline" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -19,8 +19,8 @@ export default class Placeholder extends Component {
|
|||||||
className={classes.button}
|
className={classes.button}
|
||||||
href="https://gitee.com/spark-community-works-collections/wewechat-plus-plus"
|
href="https://gitee.com/spark-community-works-collections/wewechat-plus-plus"
|
||||||
target="_blank">
|
target="_blank">
|
||||||
Fork on Github
|
查看代码
|
||||||
<i className="icon-ion-social-github" />
|
<i className="icon-ion-fork-repo" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: #fff;
|
|
||||||
box-shadow: inset 0 1px 0 0 var(--shadow-color);
|
box-shadow: inset 0 1px 0 0 var(--shadow-color);
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
|
||||||
@@ -78,7 +77,7 @@
|
|||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: 0;
|
background: 0;
|
||||||
color: #333;
|
color: #808080;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
@@ -107,7 +106,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 17px;
|
margin-right: 17px;
|
||||||
width: 166px;
|
width: 166px;
|
||||||
color: rgba(0, 0, 0, .8);
|
color: #808080;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding: 9px 8px;
|
padding: 9px 8px;
|
||||||
font-family: 'Roboto';
|
font-family: 'Roboto';
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default class Forward extends Component {
|
|||||||
onCancel={e => this.close()}
|
onCancel={e => this.close()}
|
||||||
show={this.props.show}>
|
show={this.props.show}>
|
||||||
<ModalBody className={classes.container}>
|
<ModalBody className={classes.container}>
|
||||||
Forward Message
|
转发消息
|
||||||
|
|
||||||
<div className={classes.avatars}>
|
<div className={classes.avatars}>
|
||||||
{
|
{
|
||||||
@@ -100,10 +100,10 @@ export default class Forward extends Component {
|
|||||||
<button
|
<button
|
||||||
disabled={!this.state.selected.length}
|
disabled={!this.state.selected.length}
|
||||||
onClick={e => this.send(this.state.selected)}>
|
onClick={e => this.send(this.state.selected)}>
|
||||||
Send Message
|
发送消息
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button onClick={e => this.close()}>Cancel</button>
|
<button onClick={e => this.close()}>取消</button>
|
||||||
</div>
|
</div>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
font-family: "system-ui";
|
font-family: "system-ui";
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: #777;
|
color: #c3c3c3;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: rgba(255, 255, 255, 1);
|
background: rgba(255, 255, 255, 1);
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ export default class ChatContent extends Component {
|
|||||||
return `
|
return `
|
||||||
<div class="${classes.invalidEmoji}">
|
<div class="${classes.invalidEmoji}">
|
||||||
<div></div>
|
<div></div>
|
||||||
<span>Send an emoji, view it on mobile</span>
|
<span>不支持的emoji,请在其他客户端查看</span>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ export default class ChatContent extends Component {
|
|||||||
console.error('Invalid video message: %o', message);
|
console.error('Invalid video message: %o', message);
|
||||||
|
|
||||||
return `
|
return `
|
||||||
Receive an invalid video message, please see the console output.
|
收到无法解析的视频消息,请参阅控制台输出
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ export default class ChatContent extends Component {
|
|||||||
|
|
||||||
return `
|
return `
|
||||||
<div class="${classes.transfer}">
|
<div class="${classes.transfer}">
|
||||||
<h4>Money Transfer</h4>
|
<h4>转账消息</h4>
|
||||||
<span>💰 ${transfer.money}</span>
|
<span>💰 ${transfer.money}</span>
|
||||||
<p>如需收钱,请打开手机微信确认收款。</p>
|
<p>如需收钱,请打开手机微信确认收款。</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -229,7 +229,7 @@ export default class ChatContent extends Component {
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
return `
|
return `
|
||||||
<div class="${classes.file}" data-id="${message.MsgId}">
|
<div class="${classes.file}" data-id="${message.MsgId}">
|
||||||
|
|
||||||
<img src="assets/images/filetypes/${helper.getFiletypeIcon(file.extension)}" class="disabledDrag" />
|
<img src="assets/images/filetypes/${helper.getFiletypeIcon(file.extension)}" class="disabledDrag" />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -257,7 +257,7 @@ export default class ChatContent extends Component {
|
|||||||
return `
|
return `
|
||||||
<div class="${classes.locationSharing}">
|
<div class="${classes.locationSharing}">
|
||||||
<i class="icon-ion-ios-location"></i>
|
<i class="icon-ion-ios-location"></i>
|
||||||
Location sharing, Please check your phone.
|
位置分享,请查看其他客户端
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@@ -448,7 +448,7 @@ export default class ChatContent extends Component {
|
|||||||
var caniforward = [1, 3, 47, 43, 49 + 6].includes(message.MsgType);
|
var caniforward = [1, 3, 47, 43, 49 + 6].includes(message.MsgType);
|
||||||
var templates = [
|
var templates = [
|
||||||
{
|
{
|
||||||
label: 'Delete',
|
label: '删除',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.deleteMessage(message.MsgId);
|
this.props.deleteMessage(message.MsgId);
|
||||||
}
|
}
|
||||||
@@ -458,7 +458,7 @@ export default class ChatContent extends Component {
|
|||||||
|
|
||||||
if (caniforward) {
|
if (caniforward) {
|
||||||
templates.unshift({
|
templates.unshift({
|
||||||
label: 'Forward',
|
label: '转发',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.showForward(message);
|
this.props.showForward(message);
|
||||||
}
|
}
|
||||||
@@ -468,7 +468,7 @@ export default class ChatContent extends Component {
|
|||||||
if (message.isme
|
if (message.isme
|
||||||
&& message.CreateTime - new Date() < 2 * 60 * 1000) {
|
&& message.CreateTime - new Date() < 2 * 60 * 1000) {
|
||||||
templates.unshift({
|
templates.unshift({
|
||||||
label: 'Recall',
|
label: '撤回',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.recallMessage(message);
|
this.props.recallMessage(message);
|
||||||
}
|
}
|
||||||
@@ -485,7 +485,7 @@ export default class ChatContent extends Component {
|
|||||||
var user = this.props.user;
|
var user = this.props.user;
|
||||||
var menu = new remote.Menu.buildFromTemplate([
|
var menu = new remote.Menu.buildFromTemplate([
|
||||||
{
|
{
|
||||||
label: 'Toggle the conversation',
|
label: '切换对话',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.toggleConversation();
|
this.props.toggleConversation();
|
||||||
}
|
}
|
||||||
@@ -494,7 +494,7 @@ export default class ChatContent extends Component {
|
|||||||
type: 'separator',
|
type: 'separator',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Empty Content',
|
label: '清空聊天内容',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.empty(user);
|
this.props.empty(user);
|
||||||
}
|
}
|
||||||
@@ -503,13 +503,13 @@ export default class ChatContent extends Component {
|
|||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: helper.isTop(user) ? 'Unsticky' : 'Sticky on Top',
|
label: helper.isTop(user) ? '取消置顶' : '聊天置顶',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.sticky(user);
|
this.props.sticky(user);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Delete',
|
label: '删除',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.removeChat(user);
|
this.props.removeChat(user);
|
||||||
}
|
}
|
||||||
@@ -535,7 +535,7 @@ export default class ChatContent extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (counter) {
|
if (counter) {
|
||||||
tips.innerHTML = `You has ${counter} unread messages.`;
|
tips.innerHTML = `你有${counter}个未读消息`;
|
||||||
tips.classList.add(classes.show);
|
tips.classList.add(classes.show);
|
||||||
} else {
|
} else {
|
||||||
tips.classList.remove(classes.show);
|
tips.classList.remove(classes.show);
|
||||||
@@ -573,7 +573,7 @@ export default class ChatContent extends Component {
|
|||||||
let counter = viewport.querySelectorAll(`.${classes.message}.unread`).length;
|
let counter = viewport.querySelectorAll(`.${classes.message}.unread`).length;
|
||||||
|
|
||||||
if (counter) {
|
if (counter) {
|
||||||
tips.innerHTML = `You has ${counter} unread messages.`;
|
tips.innerHTML = `你有${counter}个未读消息`;
|
||||||
tips.classList.add(classes.show);
|
tips.classList.add(classes.show);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
width: 32px;
|
width: 32px;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
z-index: 9;
|
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;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
& .content {
|
& .content {
|
||||||
position: relative;
|
position: relative;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
background: #fff;
|
background: rgba(225, 225, 225, 0.5);
|
||||||
box-shadow: 0 6px 28px 0 rgba(230, 230, 230, 100);
|
box-shadow: 0 6px 28px 0 rgba(230, 230, 230, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -538,7 +538,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
& .content {
|
& .content {
|
||||||
background: #7ebef8;
|
background: rgba(0, 0, 200, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
& p {
|
& p {
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default class Chats extends Component {
|
|||||||
showContextMenu(user) {
|
showContextMenu(user) {
|
||||||
var menu = new remote.Menu.buildFromTemplate([
|
var menu = new remote.Menu.buildFromTemplate([
|
||||||
{
|
{
|
||||||
label: 'Send Message',
|
label: '发送消息',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.chatTo(user);
|
this.props.chatTo(user);
|
||||||
}
|
}
|
||||||
@@ -65,19 +65,19 @@ export default class Chats extends Component {
|
|||||||
type: 'separator'
|
type: 'separator'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: helper.isTop(user) ? 'Unsticky' : 'Sticky on Top',
|
label: helper.isTop(user) ? '取消置顶' : '聊天置顶',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.sticky(user);
|
this.props.sticky(user);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Delete',
|
label: '删除',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.removeChat(user);
|
this.props.removeChat(user);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Mark as Read',
|
label: '标为已读',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.markedRead(user.UserName);
|
this.props.markedRead(user.UserName);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ export default class SearchBar extends Component {
|
|||||||
onFocus={e => this.filter(e.target.value)}
|
onFocus={e => this.filter(e.target.value)}
|
||||||
onInput={e => this.filter(e.target.value)}
|
onInput={e => this.filter(e.target.value)}
|
||||||
onKeyUp={e => this.navigation(e)}
|
onKeyUp={e => this.navigation(e)}
|
||||||
placeholder="Search ..."
|
placeholder="搜索 ..."
|
||||||
ref="search"
|
ref="search"
|
||||||
type="text" />
|
type="text" />
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
height: calc(100vh - 100px);
|
height: calc(100vh - 100px);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background: rgba(255, 255, 255, .8);
|
|
||||||
box-shadow: inset 0 1px 0 0 #eaedea;
|
box-shadow: inset 0 1px 0 0 #eaedea;
|
||||||
filter: blur(0);
|
filter: blur(0);
|
||||||
transition: .2s;
|
transition: .2s;
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ export default class Layout extends Component {
|
|||||||
|
|
||||||
<i className="icon-ion-ios-cloud-upload-outline" />
|
<i className="icon-ion-ios-cloud-upload-outline" />
|
||||||
|
|
||||||
<h2>Drop your file here</h2>
|
<h2>将文件拖到此处</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ export default class Login extends Component {
|
|||||||
src={this.props.avatar} />
|
src={this.props.avatar} />
|
||||||
}
|
}
|
||||||
|
|
||||||
<p>Scan successful</p>
|
<p>扫码成功</p>
|
||||||
<p>Confirm login on mobile WeChat</p>
|
<p>请在手机微信上确认登陆</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export default class Members extends Component {
|
|||||||
(searching && filtered.length === 0) && (
|
(searching && filtered.length === 0) && (
|
||||||
<div className={classes.notfound}>
|
<div className={classes.notfound}>
|
||||||
<img src="assets/images/crash.png" />
|
<img src="assets/images/crash.png" />
|
||||||
<h1>Can't find any people matching '{searching}'</h1>
|
<h1>找不到 '{searching}'</h1>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,10 +114,10 @@ export default class NewChat extends Component {
|
|||||||
<button
|
<button
|
||||||
disabled={!this.state.selected.length}
|
disabled={!this.state.selected.length}
|
||||||
onClick={e => this.chat()}>
|
onClick={e => this.chat()}>
|
||||||
Chat
|
发送消息
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button onClick={e => this.close()}>Cancel</button>
|
<button onClick={e => this.close()}>取消</button>
|
||||||
</div>
|
</div>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
.container {
|
.container {
|
||||||
background: #fff;
|
background: rgba(142, 142, 142, 0.6);
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -172,7 +172,14 @@ export default class Settings extends Component {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.column}>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 12px 17px 0;
|
padding: 12px 17px 0;
|
||||||
font-family: 'Helvetica Neue';
|
font-family: 'Helvetica Neue';
|
||||||
color: #000;
|
color: #808080;
|
||||||
|
|
||||||
& h2 {
|
& h2 {
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class UserInfo extends Component {
|
|||||||
});
|
});
|
||||||
this.toggleEdit(false);
|
this.toggleEdit(false);
|
||||||
} else {
|
} else {
|
||||||
this.props.showMessage('Failed to set remark name.');
|
this.props.showMessage('设置备注失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ class UserInfo extends Component {
|
|||||||
color: buttonColor,
|
color: buttonColor,
|
||||||
opacity: .6,
|
opacity: .6,
|
||||||
}}>
|
}}>
|
||||||
{helper.isChatRoom(UserName) || isFriend ? 'Send Message' : 'Add Friend'}
|
{helper.isChatRoom(UserName) || isFriend ? '发送消息' : '添加好友'}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ class UserInfo extends Component {
|
|||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
defaultValue={RemarkName}
|
defaultValue={RemarkName}
|
||||||
onKeyPress={e => this.handleEnter(e)}
|
onKeyPress={e => this.handleEnter(e)}
|
||||||
placeholder="Type the remark name"
|
placeholder="设置备注"
|
||||||
ref="input"
|
ref="input"
|
||||||
type="text" />
|
type="text" />
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user