Compare commits
12 Commits
1.2.0-1
...
auto-49153
| Author | SHA1 | Date | |
|---|---|---|---|
| c4703eb5ba | |||
| c8c60e693f | |||
| f2aa5bdcf2 | |||
| 442489dce2 | |||
| fbc14e854a | |||
| 96d67f0b6a | |||
| 223edaf650 | |||
| 9e9cd47a6f | |||
| 7b396be00b | |||
| b119fab5a4 | |||
| fe92afef48 | |||
| 295b455e50 |
@@ -7,10 +7,6 @@ triggers:
|
|||||||
tags:
|
tags:
|
||||||
prefix:
|
prefix:
|
||||||
- ''
|
- ''
|
||||||
pr:
|
|
||||||
branches:
|
|
||||||
prefix:
|
|
||||||
- ''
|
|
||||||
stages:
|
stages:
|
||||||
- name: stage-82deebcf
|
- name: stage-82deebcf
|
||||||
displayName: 构建
|
displayName: 构建
|
||||||
|
|||||||
76
.workflow/pipeline-build-pr-20220902.yml
Normal file
76
.workflow/pipeline-build-pr-20220902.yml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
version: '1.0'
|
||||||
|
name: pipeline-build-pr-20220902
|
||||||
|
displayName: pipeline-build-pr
|
||||||
|
triggers:
|
||||||
|
trigger: auto
|
||||||
|
pr:
|
||||||
|
branches:
|
||||||
|
prefix:
|
||||||
|
- ''
|
||||||
|
stages:
|
||||||
|
- name: stage-82deebcf
|
||||||
|
displayName: 构建
|
||||||
|
strategy: naturally
|
||||||
|
trigger: auto
|
||||||
|
executor: []
|
||||||
|
steps:
|
||||||
|
- step: build@nodejs
|
||||||
|
name: build_nodejs
|
||||||
|
displayName: Nodejs 构建
|
||||||
|
nodeVersion: 16.14.2
|
||||||
|
commands:
|
||||||
|
- '# 设置NPM源,提升安装速度'
|
||||||
|
- npm config set registry https://registry.npmmirror.com
|
||||||
|
- npm i yarn -g
|
||||||
|
- 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_mirror "https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/"
|
||||||
|
- mkdir -p /root/.cache/electron-builder/app-builder/
|
||||||
|
- mkdir ../release
|
||||||
|
- ELECTRON_BUILDER_BINARIES_MIRROR =https://registry.npmmirror.com/binary.html?path=electron-builder-binaries/
|
||||||
|
- '###'
|
||||||
|
- mkdir -p /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
||||||
|
- WORK_DIR=`pwd`
|
||||||
|
- cd /root/.cache/electron-builder/app-builder/app-builder-v0.6.1-x64
|
||||||
|
- '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 '
|
||||||
|
- cd $WORK_DIR
|
||||||
|
- '###'
|
||||||
|
- mkdir -p /root/.cache/electron-builder/appimage/appimage-9.0.5
|
||||||
|
- cd /root/.cache/electron-builder/appimage/appimage-9.0.5
|
||||||
|
- wget https://code.gitlink.org.cn/shenmo7192/electron-releases/raw/branch/master/appimage-9.0.5.7z
|
||||||
|
- 7z x appimage-9.0.5.7z
|
||||||
|
- cd $WORK_DIR
|
||||||
|
- '###'
|
||||||
|
- '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 '
|
||||||
|
- 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
|
||||||
|
- cd $WORK_DIR
|
||||||
|
- '###'
|
||||||
|
- yarn
|
||||||
|
- yarn package-linux
|
||||||
|
- mv ../release ./release
|
||||||
|
- rm -r ./release/linux-unpacked
|
||||||
|
artifacts:
|
||||||
|
- name: BUILD_ARTIFACT
|
||||||
|
path:
|
||||||
|
- ./release
|
||||||
|
caches: []
|
||||||
|
notify: []
|
||||||
|
strategy:
|
||||||
|
retry: '0'
|
||||||
|
- name: stage-cd5d9e5b
|
||||||
|
displayName: 上传制品
|
||||||
|
strategy: naturally
|
||||||
|
trigger: auto
|
||||||
|
executor: []
|
||||||
|
steps:
|
||||||
|
- step: publish@general_artifacts
|
||||||
|
name: publish_general_artifacts
|
||||||
|
displayName: 上传制品
|
||||||
|
dependArtifact: BUILD_ARTIFACT
|
||||||
|
artifactName: output
|
||||||
|
notify: []
|
||||||
|
strategy:
|
||||||
|
retry: '0'
|
||||||
19
main.js
19
main.js
@@ -203,7 +203,7 @@ let mainMenu = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '显示群聊',
|
label: '显示聊天列表',
|
||||||
accelerator: !isOsx ? 'Ctrl+Shift+M' : 'Shift+Cmd+M',
|
accelerator: !isOsx ? 'Ctrl+Shift+M' : 'Shift+Cmd+M',
|
||||||
click() {
|
click() {
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
@@ -331,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;
|
||||||
@@ -477,11 +479,20 @@ function createMenu() {
|
|||||||
mainWindow.setMenu(menu);
|
mainWindow.setMenu(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 实现单例,在启动第二个实例后,激活主窗口,然后退出第二个实例
|
||||||
|
const shouldQuit = app.makeSingleInstance(() => {
|
||||||
|
if (mainWindow) {
|
||||||
|
if (mainWindow.isMinimized()) mainWindow.restore()
|
||||||
|
mainWindow.focus()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
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({
|
||||||
@@ -703,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);
|
||||||
|
|
||||||
@@ -712,6 +722,7 @@ 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();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wewechat",
|
"name": "wewechat",
|
||||||
"version": "1.2.0-1",
|
"version": "1.2.2",
|
||||||
"description": "make weweChat great again!!!",
|
"description": "make weweChat great again!!!",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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,7 +100,7 @@ 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()}>Cancel</button>
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user