Skip to content

Commit

Permalink
Merge pull request trazyn#144 from trazyn/dev
Browse files Browse the repository at this point in the history
v1.1.6
  • Loading branch information
trazyn authored Jul 23, 2018
2 parents 48eede7 + fa28a02 commit 919ad19
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 72 deletions.
20 changes: 6 additions & 14 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ API from [https://web.wechat.com/](https://web.wechat.com/)
Download the last version on the [website](https://github.com/trazyn/weweChat/releases/latest) or below.

#### Mac(10.9+)
[Download](https://github.com/trazyn/weweChat/releases/download/v1.1.5/wewechat-1.1.5-mac.dmg) the `.dmg` file.
[Download](https://github.com/trazyn/weweChat/releases/download/v1.1.6/wewechat-1.1.6-mac.dmg) the `.dmg` file.
Or use [Homebrew-Cask](https://caskroom.github.io/):
```
$ brew cask install wewechat
Expand All @@ -49,22 +49,22 @@ Other linux distribution please download `.AppImage` packages.

Install deb package for Debian / Ubuntu:
```
$ sudo dpkg -i wewechat-1.1.5-amd64.deb
$ sudo dpkg -i wewechat-1.1.6-amd64.deb
```

Install rpm package for Centos / RHEL:
```
$ sudo yum localinstall wewechat-1.1.5-x86_64.rpm
$ sudo yum localinstall wewechat-1.1.6-x86_64.rpm
```

Install AppImage package for other linux distribution:
```
$ chmod u+x wewechat-1.1.5-x86_64.AppImage
$ ./wewechat-1.1.5-x86_64.AppImage
$ chmod u+x wewechat-1.1.6-x86_64.AppImage
$ ./wewechat-1.1.6-x86_64.AppImage
```

#### Windows
[Download](https://github.com/trazyn/weweChat/releases/download/v1.1.5/wewechat-1.1.5-win-setup.exe) the `.exe` file.
[Download](https://github.com/trazyn/weweChat/releases/download/v1.1.6/wewechat-1.1.6-win-setup.exe) the `.exe` file.

## Screenshot
![preview](https://raw.githubusercontent.com/trazyn/weweChat/master/screenshots/0.png)
Expand Down Expand Up @@ -146,12 +146,10 @@ Preferences | <kbd>Cmd</kbd> <kbd>,</kbd>
- [x] Keep online
- [x] Logout
- [x] Autosart at login
- [ ] Theme
- [x] Send image from clipboard
- [x] Drag to send file
- [x] Batch send message
- [ ] Mention a user
- [ ] Chat bot

### FAQ
- ~~`Mac` 上如何修改图标,请参考 #39(另外问下,有没屌大的或者胸大的帮忙设计一个图标啊)~~
Expand All @@ -160,9 +158,3 @@ Preferences | <kbd>Cmd</kbd> <kbd>,</kbd>

### License
MIT License

#### If you like my works you can buy me a coffee
<span>
<img src="https://github.com/trazyn/ieaseMusic/blob/master/resource/alipay.JPG" width="300" />
<img src="https://github.com/trazyn/ieaseMusic/blob/master/resource/wechat.JPG" width="300" />
</span>
2 changes: 0 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,6 @@ async function getIcon(cookies, userid, src) {
responseType: 'arraybuffer',
headers: {
Cookie: cookies,
Host: 'wx2.qq.com',
Referer: 'https://wx2.qq.com/',
'User-Agent': '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',
},
});
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wewechat",
"version": "1.1.5",
"version": "1.1.6",
"description": "Unofficial WeChat client built with React, MobX and Electron.",
"main": "main.js",
"scripts": {
Expand Down Expand Up @@ -81,7 +81,6 @@
]
},
"dependencies": {
"@exponent/electron-cookies": "^2.0.0",
"auto-launch": "^5.0.1",
"axios": "^0.18.0",
"browser-md5-file": "^1.0.0",
Expand Down
Binary file modified resource/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resource/16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resource/24x24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resource/256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resource/32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resource/48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resource/64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resource/96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resource/icon.icns
Binary file not shown.
5 changes: 0 additions & 5 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React, { Component } from 'react';
import { render } from 'react-dom';
import { Provider } from 'mobx-react';
import { HashRouter } from 'react-router-dom';
import ElectronCookies from '@exponent/electron-cookies';
import { ipcRenderer } from 'electron';

import './global.css';
Expand All @@ -12,10 +11,6 @@ import 'utils/albumcolors';
import getRoutes from './js/routes';
import stores from './js/stores';

ElectronCookies.enable({
origin: 'https://wx2.qq.com',
});

class App extends Component {
async componentWillMount() {
if (window.navigator.onLine) {
Expand Down
Binary file modified src/assets/images/dock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 1 addition & 36 deletions src/js/pages/Settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,39 +29,9 @@ import helper from 'utils/helper';

user: stores.session.user,
logout: stores.session.logout,
plugins: stores.settings.plugins,
}))
@observer
export default class Settings extends Component {
renderPlugins(plugins) {
return plugins.map((e, index) => {
return (
<div
className={classes.plugin}
key={index}>
<img src={e.icon} />

<div className={classes.detail}>
<p>
<span>{e.name}</span>
<span className={classes.version}>{e.version}</span>
</p>
<p>
<a
href={e.link}
target="_bank">
View on Github
</a>
</p>
<div className={classes.description}>{e.description}</div>
</div>

<Switch defaultChecked={e.enabled} />
</div>
);
});
}

choiceDownloadDir() {
this.refs.downloads.click();
}
Expand Down Expand Up @@ -90,7 +60,6 @@ export default class Settings extends Component {
setRemeberConversation,
showRedIcon,
setShowRedIcon,
plugins,
user,
} = this.props;

Expand Down Expand Up @@ -203,11 +172,7 @@ export default class Settings extends Component {
</ul>
</div>
<div className={classes.column}>
<h2>Plugins</h2>

{
this.renderPlugins(plugins)
}
<h2>TODO:</h2>
</div>
</div>
);
Expand Down
12 changes: 7 additions & 5 deletions src/js/stores/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function resolveMessage(message) {
let parts = message.Content.split(':<br/>');
let location = helper.parseKV(message.OriContent);

location.image = `${axios.defaults.baseURL}${parts[(isChatRoom && !message.isme) ? 2 : 1]}`.replace(/\/+/g, '/');
location.image = `${axios.defaults.baseURL}${parts[1]}`.replace(/\/+/g, '/');
location.href = message.Url;

message.location = location;
Expand All @@ -39,7 +39,7 @@ async function resolveMessage(message) {

case 34:
// Voice
let voice = helper.parseKV(content);
let voice = {};
voice.src = `${axios.defaults.baseURL}cgi-bin/mmwebwx-bin/webwxgetvoice?&msgid=${message.MsgId}&skey=${auth.skey}`;
message.voice = voice;
break;
Expand Down Expand Up @@ -80,12 +80,13 @@ async function resolveMessage(message) {
switch (message.AppMsgType) {
case 2000:
// Transfer
let { value } = helper.parseXml(message.Content, 'des');
let res = helper.parseXml(message.Content, 'des');
let value = (res.value || {}).des;

message.MsgType += 2000;
message.transfer = {
desc: value.des,
money: +value.match(/[\d.]+元/)[0].slice(0, -1),
desc: value,
money: +(value.match(/[\d.]+元/)[0].slice(0, -1)),
};
break;

Expand Down Expand Up @@ -136,6 +137,7 @@ async function resolveMessage(message) {
break;

case 10002:
// Recall message
let text = isChatRoom ? message.Content.split(':<br/>').slice(-1).pop() : message.Content;
let { value } = helper.parseXml(text, ['replacemsg', 'msgid']);

Expand Down
8 changes: 0 additions & 8 deletions src/js/stores/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ class Settings {
@observable remeberConversation = false;
@observable showRedIcon = true;
@observable downloads = '';
@observable plugins = [{
name: 'Message Backup',
link: 'https://github.com/trazyn',
description: 'Curabitur lobortis id lorem id bibendum. Ut id consectetur magna. Quisque volutpat augue enim, pulvinar lobortis nibh lacinia at. Vestibulum nec erat ut mi sollicitudin porttitor id sit amet risus. Nam tempus vel odio vitae aliquam. In imperdiet eros id lacus vestibulum vestibulum. Suspendisse fermentum sem sagittis ante venenatis egestas quis vel justo. Maecenas semper suscipit nunc, sed aliquam sapien convallis eu. Nulla ut turpis in diam dapibus consequat.',
version: '1.0.1',
icon: 'https://lh6.ggpht.com/k7Z4J1IIXXJnC2NRnFfJNlkn7kZge4Zx-Yv5uqYf4222tx74wXDzW24OvOxlcpw0KcQ=w300',
enabled: true,
}];

@action setAlwaysOnTop(alwaysOnTop) {
self.alwaysOnTop = alwaysOnTop;
Expand Down

0 comments on commit 919ad19

Please sign in to comment.