Compare commits
3 Commits
master
...
auto-49153
Author | SHA1 | Date | |
---|---|---|---|
c4703eb5ba | |||
c8c60e693f | |||
f2aa5bdcf2 |
@ -24,7 +24,7 @@ stages:
|
|||||||
- npm i yarn -g
|
- npm i yarn -g
|
||||||
- yarn config set registry "https://registry.npmmirror.com"
|
- yarn config set registry "https://registry.npmmirror.com"
|
||||||
- yarn config set electron_builder_binaries_mirror "https://npmmirror.com/mirrors/electron-builder-binaries/"
|
- yarn config set electron_builder_binaries_mirror "https://npmmirror.com/mirrors/electron-builder-binaries/"
|
||||||
- yarn config set electron_mirror "https://ghproxy.com/https://github.com/Riceneeder/electron-releases/raw/master/"
|
- yarn config set electron_mirror "https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/"
|
||||||
- mkdir -p /root/.cache/electron-builder/app-builder/
|
- mkdir -p /root/.cache/electron-builder/app-builder/
|
||||||
- mkdir ../release
|
- mkdir ../release
|
||||||
- ELECTRON_BUILDER_BINARIES_MIRROR =https://registry.npmmirror.com/binary.html?path=electron-builder-binaries/
|
- ELECTRON_BUILDER_BINARIES_MIRROR =https://registry.npmmirror.com/binary.html?path=electron-builder-binaries/
|
||||||
@ -32,19 +32,19 @@ stages:
|
|||||||
- mkdir -p /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
- mkdir -p /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
||||||
- WORK_DIR=`pwd`
|
- WORK_DIR=`pwd`
|
||||||
- cd /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
- cd /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
||||||
- 'wget https://ghproxy.com/https://github.com/Riceneeder/electron-releases/raw/master/fpm-1.9.3-2.3.1-linux-x86_64.7z'
|
- 'wget https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/app-builder-v0.6.1-linux-x64.7z '
|
||||||
- '7z x app-builder-v0.6.1-linux-x64.7z '
|
- '7z x app-builder-v0.6.1-linux-x64.7z '
|
||||||
- cd $WORK_DIR
|
- cd $WORK_DIR
|
||||||
- '###'
|
- '###'
|
||||||
- mkdir -p /root/.cache/electron-builder/appimage/appimage-9.0.5
|
- mkdir -p /root/.cache/electron-builder/appimage/appimage-9.0.5
|
||||||
- cd /root/.cache/electron-builder/appimage/appimage-9.0.5
|
- cd /root/.cache/electron-builder/appimage/appimage-9.0.5
|
||||||
- wget https://ghproxy.com/https://github.com/Riceneeder/electron-releases/raw/master/appimage-9.0.5.7z
|
- wget https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/appimage-9.0.5.7z
|
||||||
- 7z x appimage-9.0.5.7z
|
- 7z x appimage-9.0.5.7z
|
||||||
- cd $WORK_DIR
|
- cd $WORK_DIR
|
||||||
- '###'
|
- '###'
|
||||||
- 'mkdir -p /root/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64 '
|
- 'mkdir -p /root/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64 '
|
||||||
- 'cd /root/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64 '
|
- 'cd /root/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64 '
|
||||||
- wget https://ghproxy.com/https://github.com/Riceneeder/electron-releases/raw/master/fpm-1.9.3-2.3.1-linux-x86_64.7z
|
- wget https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/fpm-1.9.3-2.3.1-linux-x86_64.7z
|
||||||
- 7z x fpm-1.9.3-2.3.1-linux-x86_64.7z
|
- 7z x fpm-1.9.3-2.3.1-linux-x86_64.7z
|
||||||
- cd $WORK_DIR
|
- cd $WORK_DIR
|
||||||
- '###'
|
- '###'
|
||||||
|
@ -24,7 +24,7 @@ stages:
|
|||||||
- npm i yarn -g
|
- npm i yarn -g
|
||||||
- yarn config set registry "https://registry.npmmirror.com"
|
- yarn config set registry "https://registry.npmmirror.com"
|
||||||
- yarn config set electron_builder_binaries_mirror "https://npmmirror.com/mirrors/electron-builder-binaries/"
|
- yarn config set electron_builder_binaries_mirror "https://npmmirror.com/mirrors/electron-builder-binaries/"
|
||||||
- yarn config set electron_mirror "https://ghproxy.com/https://github.com/Riceneeder/electron-releases/raw/master/"
|
- yarn config set electron_mirror "https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/"
|
||||||
- mkdir -p /root/.cache/electron-builder/app-builder/
|
- mkdir -p /root/.cache/electron-builder/app-builder/
|
||||||
- mkdir ../release
|
- mkdir ../release
|
||||||
- ELECTRON_BUILDER_BINARIES_MIRROR =https://registry.npmmirror.com/binary.html?path=electron-builder-binaries/
|
- ELECTRON_BUILDER_BINARIES_MIRROR =https://registry.npmmirror.com/binary.html?path=electron-builder-binaries/
|
||||||
@ -32,19 +32,19 @@ stages:
|
|||||||
- mkdir -p /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
- mkdir -p /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
||||||
- WORK_DIR=`pwd`
|
- WORK_DIR=`pwd`
|
||||||
- cd /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
- cd /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
||||||
- 'wget https://ghproxy.com/https://github.com/Riceneeder/electron-releases/raw/master/app-builder-v0.6.1-linux-x64.7z '
|
- 'wget https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/app-builder-v0.6.1-linux-x64.7z '
|
||||||
- '7z x app-builder-v0.6.1-linux-x64.7z '
|
- '7z x app-builder-v0.6.1-linux-x64.7z '
|
||||||
- cd $WORK_DIR
|
- cd $WORK_DIR
|
||||||
- '###'
|
- '###'
|
||||||
- mkdir -p /root/.cache/electron-builder/appimage/appimage-9.0.5
|
- mkdir -p /root/.cache/electron-builder/appimage/appimage-9.0.5
|
||||||
- cd /root/.cache/electron-builder/appimage/appimage-9.0.5
|
- cd /root/.cache/electron-builder/appimage/appimage-9.0.5
|
||||||
- wget https://ghproxy.com/https://github.com/Riceneeder/electron-releases/raw/master/appimage-9.0.5.7z
|
- wget https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/appimage-9.0.5.7z
|
||||||
- 7z x appimage-9.0.5.7z
|
- 7z x appimage-9.0.5.7z
|
||||||
- cd $WORK_DIR
|
- cd $WORK_DIR
|
||||||
- '###'
|
- '###'
|
||||||
- 'mkdir -p /root/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64 '
|
- 'mkdir -p /root/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64 '
|
||||||
- 'cd /root/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64 '
|
- 'cd /root/.cache/electron-builder/fpm/fpm-1.9.3-2.3.1-linux-x86_64 '
|
||||||
- wget https://ghproxy.com/https://github.com/Riceneeder/electron-releases/raw/master/fpm-1.9.3-2.3.1-linux-x86_64.7z
|
- wget https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/fpm-1.9.3-2.3.1-linux-x86_64.7z
|
||||||
- 7z x fpm-1.9.3-2.3.1-linux-x86_64.7z
|
- 7z x fpm-1.9.3-2.3.1-linux-x86_64.7z
|
||||||
- cd $WORK_DIR
|
- cd $WORK_DIR
|
||||||
- '###'
|
- '###'
|
||||||
|
71
CHANGELOG.MD
Normal file
71
CHANGELOG.MD
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# 1.1.4
|
||||||
|
|
||||||
|
### 2017-09-22
|
||||||
|
|
||||||
|
#### Improvements
|
||||||
|
- 发送消息后滚动到对话窗口最下面
|
||||||
|
|
||||||
|
#### Bug fixed
|
||||||
|
- 修复 #34 快速`enter`时会重复发送消息
|
||||||
|
- 修复点击状态栏小图标展开菜单后,收到消息后重新创建小图标导致程序退出的问题
|
||||||
|
|
||||||
|
# 1.1.3
|
||||||
|
|
||||||
|
### 2017-09-19
|
||||||
|
|
||||||
|
#### Bug fixed
|
||||||
|
- #36 #34 优化内存使用,修复由于1.1.1显示头像到菜单栏,接收新消息时刷新菜单中会话列表,重复创建nativeImage导致GC无法及时回收所造成内存占用过高
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1.2
|
||||||
|
|
||||||
|
### 2017-09-18
|
||||||
|
|
||||||
|
#### Improvements
|
||||||
|
- 增加自动更新
|
||||||
|
|
||||||
|
|
||||||
|
# 1.1.1
|
||||||
|
|
||||||
|
### 2017-09-14
|
||||||
|
|
||||||
|
#### Improvements
|
||||||
|
- 增加用户头像到菜单栏
|
||||||
|
|
||||||
|
#### Bug fixed
|
||||||
|
- 修复登出时网络错误,导致未提示客户端已离线
|
||||||
|
|
||||||
|
### 2017-09-12
|
||||||
|
#29 替换`html`为对应`emoji`
|
||||||
|
|
||||||
|
### 2017-09-11
|
||||||
|
#28 在 windows 和 linux 上不显示菜单
|
||||||
|
|
||||||
|
### 2017-09-10
|
||||||
|
|
||||||
|
#### Bug fixed
|
||||||
|
- 联系人列表只显示好友,不显示临时联系人
|
||||||
|
|
||||||
|
### 2017-09-08
|
||||||
|
|
||||||
|
#### Improvements
|
||||||
|
- 添加文件助手, #27
|
||||||
|
|
||||||
|
#### Bug fixed
|
||||||
|
- 修改样式,防止文字信息内容过长
|
||||||
|
|
||||||
|
### 2017-09-07
|
||||||
|
|
||||||
|
#### Improvements
|
||||||
|
- 调整表情框表情大小
|
||||||
|
- 聊天窗口用户名取消换行
|
||||||
|
|
||||||
|
#### Feature
|
||||||
|
- 多文件拖拽发送
|
||||||
|
|
||||||
|
#### Bug fixed
|
||||||
|
- 仅在聊天开启时允许文件拖拽
|
||||||
|
- 修复手机端消息同步客户端错误
|
||||||
|
- 修复图片加载失败使用错误`src`进行回滚导致客户端卡死的问题
|
136
main.js
136
main.js
@ -1,14 +1,16 @@
|
|||||||
|
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import tmp from 'tmp';
|
import tmp from 'tmp';
|
||||||
import { app, powerMonitor, BrowserWindow, Tray, Menu, ipcMain, clipboard, shell, nativeImage, Notification } from 'electron';
|
import { app, powerMonitor, BrowserWindow, Tray, Menu, ipcMain, clipboard, shell, nativeImage, dialog } from 'electron';
|
||||||
import windowStateKeeper from 'electron-window-state';
|
import windowStateKeeper from 'electron-window-state';
|
||||||
import AutoLaunch from 'auto-launch';
|
import AutoLaunch from 'auto-launch';
|
||||||
|
import { autoUpdater } from 'electron-updater';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
import pkg from './package.json';
|
import pkg from './package.json';
|
||||||
|
|
||||||
let forceQuit = false;
|
let forceQuit = false;
|
||||||
|
let downloading = false;
|
||||||
let mainWindow;
|
let mainWindow;
|
||||||
let tray;
|
let tray;
|
||||||
let settings = {};
|
let settings = {};
|
||||||
@ -26,17 +28,6 @@ let mainMenu = [
|
|||||||
{
|
{
|
||||||
label: `About ${pkg.name}`,
|
label: `About ${pkg.name}`,
|
||||||
selector: 'orderFrontStandardAboutPanel:',
|
selector: 'orderFrontStandardAboutPanel:',
|
||||||
click() {
|
|
||||||
let note = new Notification({
|
|
||||||
title: 'WeweChat',
|
|
||||||
subtitle: 'about',
|
|
||||||
icon: `${__dirname}/src/assets/images/dock.png`,
|
|
||||||
body: `Made with 💖 by trazyn.\nRevise with 🔥 By Riceneeder\nversion: ${pkg.version}`,
|
|
||||||
silent: true,
|
|
||||||
closeButtonText: '了解了'
|
|
||||||
});
|
|
||||||
note.show();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '首选项...',
|
label: '首选项...',
|
||||||
@ -148,7 +139,7 @@ let mainMenu = [
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '聊天列表',
|
label: '群聊',
|
||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
label: 'Loading...',
|
label: 'Loading...',
|
||||||
@ -156,12 +147,15 @@ let mainMenu = [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '联系人',
|
label: '私聊',
|
||||||
submenu: [
|
submenu: [
|
||||||
{
|
{
|
||||||
label: 'Loading...',
|
label: 'Loading...',
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '编辑',
|
label: '编辑',
|
||||||
@ -220,12 +214,7 @@ let mainMenu = [
|
|||||||
type: 'separator',
|
type: 'separator',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Darkmode',
|
label: ''
|
||||||
accelerator: !isOsx ? 'Ctrl+Shift+D' : 'Shift+Cmd+D',
|
|
||||||
click() {
|
|
||||||
mainWindow.show();
|
|
||||||
mainWindow.webContents.send('darkmode');
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
@ -342,6 +331,8 @@ let avatarCache = {};
|
|||||||
let avatarPlaceholder = `${__dirname}/src/assets/images/user-fallback.png`;
|
let avatarPlaceholder = `${__dirname}/src/assets/images/user-fallback.png`;
|
||||||
const icon = `${__dirname}/src/assets/images/dock.png`;
|
const icon = `${__dirname}/src/assets/images/dock.png`;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function getIcon(cookies, userid, src) {
|
async function getIcon(cookies, userid, src) {
|
||||||
var cached = avatarCache[userid];
|
var cached = avatarCache[userid];
|
||||||
var icon;
|
var icon;
|
||||||
@ -381,6 +372,22 @@ async function getIcon(cookies, userid, src) {
|
|||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkForUpdates() {
|
||||||
|
if (downloading) {
|
||||||
|
dialog.showMessageBox({
|
||||||
|
type: 'info',
|
||||||
|
buttons: ['OK'],
|
||||||
|
title: pkg.name,
|
||||||
|
message: `Downloading...`,
|
||||||
|
detail: `Please leave the app open, the new version is downloading. You'll receive a new dialog when downloading is finished.`
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
autoUpdater.checkForUpdates();
|
||||||
|
}
|
||||||
|
|
||||||
function updateTray(unread = 0) {
|
function updateTray(unread = 0) {
|
||||||
if (!isOsx) {
|
if (!isOsx) {
|
||||||
// Always show the tray icon on windows
|
// Always show the tray icon on windows
|
||||||
@ -472,19 +479,20 @@ function createMenu() {
|
|||||||
mainWindow.setMenu(menu);
|
mainWindow.setMenu(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 实现单例,在启动第二个实例后,激活主窗口,然后退出第二个实例
|
||||||
const shouldQuit = app.makeSingleInstance(() => {
|
const shouldQuit = app.makeSingleInstance(() => {
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
if (mainWindow.isMinimized()) mainWindow.restore();
|
if (mainWindow.isMinimized()) mainWindow.restore()
|
||||||
mainWindow.show();
|
mainWindow.focus()
|
||||||
mainWindow.focus();
|
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
shouldQuit && app.quit();
|
|
||||||
|
shouldQuit && app.quit()
|
||||||
|
|
||||||
const createMainWindow = () => {
|
const createMainWindow = () => {
|
||||||
var mainWindowState = windowStateKeeper({
|
var mainWindowState = windowStateKeeper({
|
||||||
defaultWidth: 745,
|
defaultWidth: 1300,
|
||||||
defaultHeight: 450,
|
defaultHeight: 700,
|
||||||
});
|
});
|
||||||
|
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
@ -662,7 +670,7 @@ const createMainWindow = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on('open-image', async(event, args) => {
|
ipcMain.on('open-image', async(event, args) => {
|
||||||
var filename = `${imagesCacheDir}/img_${args.dataset.id}.jpg`;
|
var filename = `${imagesCacheDir}/img_${args.dataset.id}`;
|
||||||
|
|
||||||
fs.writeFileSync(filename, args.base64.replace(/^data:image\/png;base64,/, ''), 'base64');
|
fs.writeFileSync(filename, args.base64.replace(/^data:image\/png;base64,/, ''), 'base64');
|
||||||
shell.openItem(filename);
|
shell.openItem(filename);
|
||||||
@ -687,15 +695,15 @@ const createMainWindow = () => {
|
|||||||
isSuspend = true;
|
isSuspend = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (isOsx) {
|
if (isOsx) {
|
||||||
// app.setAboutPanelOptions({
|
app.setAboutPanelOptions({
|
||||||
// applicationName: pkg.name,
|
applicationName: pkg.name,
|
||||||
// applicationVersion: pkg.version,
|
applicationVersion: pkg.version,
|
||||||
// copyright: 'Made with 💖 by trazyn. \n https://github.com/trazyn/weweChat \nRevise By Riceneeder \n https://gitee.com/spark-community-works-collections/wewechat-plus-plus',
|
copyright: 'Made with 💖 by trazyn. \n https://github.com/trazyn/weweChat \nRevise By Riceneeder \n https://gitee.com/spark-community-works-collections/wewechat-plus-plus',
|
||||||
// credits: `With the invaluable help of: \n web.wechat.com`,
|
credits: `With the invaluable help of: \n web.wechat.com`,
|
||||||
// version: pkg.version
|
version: pkg.version
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
|
|
||||||
[imagesCacheDir, voicesCacheDir].map(e => {
|
[imagesCacheDir, voicesCacheDir].map(e => {
|
||||||
if (!fs.existsSync(e)) {
|
if (!fs.existsSync(e)) {
|
||||||
@ -706,7 +714,6 @@ 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');
|
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();
|
createMenu();
|
||||||
};
|
};
|
||||||
|
|
||||||
app.setName(pkg.name);
|
app.setName(pkg.name);
|
||||||
app.dock && app.dock.setIcon(icon);
|
app.dock && app.dock.setIcon(icon);
|
||||||
|
|
||||||
@ -715,8 +722,61 @@ app.on('before-quit', () => {
|
|||||||
// Fix issues #14
|
// Fix issues #14
|
||||||
forceQuit = true;
|
forceQuit = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
app.on('activate', e => {
|
app.on('activate', e => {
|
||||||
if (!mainWindow.isVisible()) {
|
if (!mainWindow.isVisible()) {
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
autoUpdater.on('update-not-available', e => {
|
||||||
|
dialog.showMessageBox({
|
||||||
|
type: 'info',
|
||||||
|
buttons: ['OK'],
|
||||||
|
title: pkg.name,
|
||||||
|
message: `${pkg.name} is up to date :)`,
|
||||||
|
detail: `${pkg.name} ${pkg.version} is currently the newest version available, It looks like you're already rocking the latest version!`
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('Update not available.');
|
||||||
|
});
|
||||||
|
|
||||||
|
autoUpdater.on('update-available', e => {
|
||||||
|
downloading = true;
|
||||||
|
checkForUpdates();
|
||||||
|
});
|
||||||
|
|
||||||
|
autoUpdater.on('error', err => {
|
||||||
|
dialog.showMessageBox({
|
||||||
|
type: 'error',
|
||||||
|
buttons: ['Cancel update'],
|
||||||
|
title: pkg.name,
|
||||||
|
message: `Failed to update ${pkg.name} :(`,
|
||||||
|
detail: `An error occurred in retrieving update information, Please try again later.`,
|
||||||
|
});
|
||||||
|
|
||||||
|
downloading = false;
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
|
||||||
|
autoUpdater.on('update-downloaded', info => {
|
||||||
|
var { releaseNotes, releaseName } = info;
|
||||||
|
var index = dialog.showMessageBox({
|
||||||
|
type: 'info',
|
||||||
|
buttons: ['Restart', 'Later'],
|
||||||
|
title: pkg.name,
|
||||||
|
message: `The new version has been downloaded. Please restart the application to apply the updates.`,
|
||||||
|
detail: `${releaseName}\n\n${releaseNotes}`
|
||||||
|
});
|
||||||
|
downloading = false;
|
||||||
|
|
||||||
|
if (index === 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
autoUpdater.quitAndInstall();
|
||||||
|
setTimeout(() => {
|
||||||
|
mainWindow = null;
|
||||||
|
app.quit();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
22
package.json
22
package.json
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "wewechat",
|
"name": "wewechat",
|
||||||
"version": "1.2.5",
|
"version": "1.2.2",
|
||||||
"description": "make weweChat great again!!!",
|
"description": "make weweChat great again!!!",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "yarn build && ./node_modules/.bin/electron ./dist/main.js",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"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"
|
||||||
@ -57,13 +57,8 @@
|
|||||||
"category": "Chat",
|
"category": "Chat",
|
||||||
"executableName": "wewechat",
|
"executableName": "wewechat",
|
||||||
"target": [
|
"target": [
|
||||||
{
|
"deb",
|
||||||
"target": "deb",
|
"AppImage"
|
||||||
"arch":[
|
|
||||||
"x64",
|
|
||||||
"arm64"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
@ -80,8 +75,9 @@
|
|||||||
},
|
},
|
||||||
"publish": [
|
"publish": [
|
||||||
{
|
{
|
||||||
"provider": "generic",
|
"provider": "github",
|
||||||
"url": "https://gitee.com/spark-community-works-collections/wewechat-plus-plus/raw/master/"
|
"owner": "riceneeder",
|
||||||
|
"repo": "weweChat"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -90,7 +86,6 @@
|
|||||||
"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",
|
||||||
@ -130,6 +125,7 @@
|
|||||||
"css-loader": "^1.0.0",
|
"css-loader": "^1.0.0",
|
||||||
"electron": "^2.0.16",
|
"electron": "^2.0.16",
|
||||||
"electron-builder": "^19.56.2",
|
"electron-builder": "^19.56.2",
|
||||||
|
"electron-updater": "^3.0.1",
|
||||||
"eslint": "^5.1.0",
|
"eslint": "^5.1.0",
|
||||||
"eslint-config-standard": "^11.0.0",
|
"eslint-config-standard": "^11.0.0",
|
||||||
"eslint-config-standard-react": "^6.0.0",
|
"eslint-config-standard-react": "^6.0.0",
|
||||||
|
11
src/app.js
11
src/app.js
@ -4,7 +4,6 @@ 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';
|
||||||
@ -28,11 +27,6 @@ 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', () => {
|
||||||
@ -136,11 +130,6 @@ 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() {
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 14 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 15 KiB |
@ -5,13 +5,6 @@
|
|||||||
<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('不能向自己发送消息');
|
this.props.showMessage('Can\'t send messages to yourself.');
|
||||||
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!` : '消息发送失败');
|
await this.props.showMessage(batch ? `Sending message to ${e.NickName} has failed!` : 'Failed to send message.');
|
||||||
}
|
}
|
||||||
|
|
||||||
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('发送图片失败');
|
showMessage('Failed to send image.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
border: 0;
|
border: 0;
|
||||||
padding-right: 17px;
|
padding-right: 17px;
|
||||||
background: 0;
|
background: 0;
|
||||||
color: #808080;
|
color: #333;
|
||||||
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>离线了离线了!</h1>
|
<h1>Oops, seems like you are offline!</h1>
|
||||||
|
|
||||||
<button onClick={e => window.location.reload()}>尝试重新加载</button>
|
<button onClick={e => window.location.reload()}>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>没有搜索到 '{searching}'</h3>
|
<h3>Can't find any people matching '{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="输入需要搜索的对象"
|
placeholder="Type to Search..."
|
||||||
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={`你好,我是 ${me && me.User.NickName}`}
|
defaultValue={`Hallo, im ${me && me.User.NickName}`}
|
||||||
ref="input"
|
ref="input"
|
||||||
type="text" />
|
type="text" />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button onClick={e => this.addFriend()}>发送</button>
|
<button onClick={e => this.addFriend()}>Send</button>
|
||||||
|
|
||||||
<button onClick={e => close()}>取消</button>
|
<button onClick={e => close()}>Cancel</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()}>取消</button>
|
<button onClick={e => this.close()}>Cancel</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="批量发送消息,选择一个或多个用户"
|
placeholder="Batch to send message, Choose one or more user."
|
||||||
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>不能找到 '{searching}'</h1>
|
<h1>Can't find any people matching '{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()}>发送</button>
|
<button onClick={e => ok()}>Send</button>
|
||||||
<button onClick={e => cancel()}>取消</button>
|
<button onClick={e => cancel()}>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>找不到 '{query}'</h1>
|
<h1>Can't find any people matching '{query}'</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -9,9 +9,9 @@ export default class Placeholder extends Component {
|
|||||||
<div className={classes.settings}>
|
<div className={classes.settings}>
|
||||||
<a
|
<a
|
||||||
className={classes.button}
|
className={classes.button}
|
||||||
href="mailto: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-fork-repo" />
|
<i className="icon-ion-social-github" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
.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;
|
||||||
|
|
||||||
@ -77,7 +78,7 @@
|
|||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
border: 0;
|
border: 0;
|
||||||
background: 0;
|
background: 0;
|
||||||
color: #808080;
|
color: #333;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
@ -106,7 +107,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin-right: 17px;
|
margin-right: 17px;
|
||||||
width: 166px;
|
width: 166px;
|
||||||
color: #808080;
|
color: rgba(0, 0, 0, .8);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding: 9px 8px;
|
padding: 9px 8px;
|
||||||
font-family: 'Roboto';
|
font-family: 'Roboto';
|
||||||
|
@ -103,7 +103,7 @@ export default class Forward extends Component {
|
|||||||
发送消息
|
发送消息
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button onClick={e => this.close()}>取消</button>
|
<button onClick={e => this.close()}>Cancel</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: #c3c3c3;
|
color: #777;
|
||||||
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>不支持的emoji,请在其他客户端查看</span>
|
<span>Send an emoji, view it on mobile</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>转账消息</h4>
|
<h4>Money Transfer</h4>
|
||||||
<span>💰 ${transfer.money}</span>
|
<span>💰 ${transfer.money}</span>
|
||||||
<p>如需收钱,请打开手机微信确认收款。</p>
|
<p>如需收钱,请打开手机微信确认收款。</p>
|
||||||
</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>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -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: '切换对话',
|
label: 'Toggle the conversation',
|
||||||
click: () => {
|
click: () => {
|
||||||
this.props.toggleConversation();
|
this.props.toggleConversation();
|
||||||
}
|
}
|
||||||
@ -535,7 +535,7 @@ export default class ChatContent extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (counter) {
|
if (counter) {
|
||||||
tips.innerHTML = `你有${counter}个未读消息`;
|
tips.innerHTML = `You has ${counter} unread messages.`;
|
||||||
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 = `你有${counter}个未读消息`;
|
tips.innerHTML = `You has ${counter} unread messages.`;
|
||||||
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(225, 225, 225, 0.5);
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, .5);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,7 +165,7 @@
|
|||||||
& .content {
|
& .content {
|
||||||
position: relative;
|
position: relative;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
background: rgba(225, 225, 225, 0.5);
|
background: #fff;
|
||||||
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: rgba(0, 0, 200, 0.5);
|
background: #7ebef8;
|
||||||
}
|
}
|
||||||
|
|
||||||
& p {
|
& p {
|
||||||
|
@ -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="搜索 ..."
|
placeholder="Search ..."
|
||||||
ref="search"
|
ref="search"
|
||||||
type="text" />
|
type="text" />
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
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>将文件拖到此处</h2>
|
<h2>Drop your file here</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>扫码成功</p>
|
<p>Scan successful</p>
|
||||||
<p>请在手机微信上确认登陆</p>
|
<p>Confirm login on mobile WeChat</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>找不到 '{searching}'</h1>
|
<h1>Can't find any people matching '{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()}>取消</button>
|
<button onClick={e => this.close()}>Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
.container {
|
.container {
|
||||||
background: rgba(142, 142, 142, 0.6);
|
background: #fff;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -135,7 +135,6 @@ export default class Settings extends Component {
|
|||||||
<span>记住上次的聊天内容</span>
|
<span>记住上次的聊天内容</span>
|
||||||
<Switch
|
<Switch
|
||||||
checked={rememberConversation}
|
checked={rememberConversation}
|
||||||
disabled={true}
|
|
||||||
id="rememberConversation"
|
id="rememberConversation"
|
||||||
onChange={e => setRememberConversation(e.target.checked)} />
|
onChange={e => setRememberConversation(e.target.checked)} />
|
||||||
</label>
|
</label>
|
||||||
@ -173,18 +172,7 @@ export default class Settings extends Component {
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.column}>
|
<div className={classes.column}>
|
||||||
<h2>更新记录:</h2>
|
<h2>TODO:</h2>
|
||||||
|
|
||||||
<p>
|
|
||||||
v1.2.5 修复翻译;纠正反馈邮箱;禁用‘记住上次聊天内容’,此功能等待修复<br />
|
|
||||||
v1.2.4 更多的翻译;为darkmode添加过渡动画;删去不必要的代码,去除自动检查更新;修改托盘图标让其更加明显<br />
|
|
||||||
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<br />
|
|
||||||
<hr />
|
|
||||||
<strong>Riceneeder: 本人不会React且较为业余,此项目除重大bug外不再更新,有能力者可提PR或联系星火的shenmo参与项目</strong>
|
|
||||||
</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: #808080;
|
color: #000;
|
||||||
|
|
||||||
& 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('设置备注失败');
|
this.props.showMessage('Failed to set remark name.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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="设置备注"
|
placeholder="Type the remark name"
|
||||||
ref="input"
|
ref="input"
|
||||||
type="text" />
|
type="text" />
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user