Skip to content

Commit

Permalink
upgrade to v2.9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ericliang committed Apr 25, 2022
1 parent bc4e514 commit f93a632
Show file tree
Hide file tree
Showing 15 changed files with 86 additions and 23 deletions.
10 changes: 10 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ Maxim-PC Changelog

[美信拓扑](https://www.maximtop.com/) ,一键启用多云架构的即时通讯云服务

### v2.9.10 20220425
1. Fix Bug: 修复显示好友信息的bug。
2. Fix Bug: 联系人信息未被获取时返回空对象。
3. Fix Bug: 禁用polling。
4. Fix Bug: 用户登陆退出后增加页面刷新功能,修复新登录用户可能获取之前登陆用户联系人缓存信息。
5. 增加获取登陆的方法。
6. 增加群组禁言功能。
7. 针对sendRosterMessage和sendGroupMessage方法增加返回消息id的操作。
8. 用户头像、群组头像及消息附近上传时增加回调方法。

### v2.9.9 20210811

1. 收取历史消息不需要额外通知;
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 美信拓扑IM PC版
# 蓝莺IM PC 版

[美信拓扑](https://www.maximtop.com/),一键启用多云架构的即时通讯云服务
蓝莺IM,是由[美信拓扑](https://www.maximtop.com/)团队研发的新一代即时通讯云服务,SDK设计简单集成方便,服务采用云原生技术和多云架构,私有云也可按月付费。

美信拓扑 IM 为美信拓扑云服务的 DemoApp,方便 App 开发者体验和使用 IM SDK,可以直接[在线试用](https://chat-h5.maximtop.com)也可以在官网[下载页面](https://www.maximtop.com/downloads/)选择试用所有客户端。
蓝莺IM APP 为方便体验试用蓝莺 IMSDK 的 DemoApp。开发者可直接[在线试用](https://chat-h5.maximtop.com)也可在官网[下载页面](https://www.maximtop.com/downloads/)选择试用所有客户端。

[![Scc Count Badge](https://sloc.xyz/github/maxim-top/maxim-pc/?category=total&avg-wage=1)](https://github.com/maxim-top/maxim-pc/) [![Scc Count Badge](https://sloc.xyz/github/maxim-top/maxim-pc/?category=code&avg-wage=1)](https://github.com/maxim-top/maxim-pc/)

Expand Down Expand Up @@ -32,3 +32,6 @@ yarn win
打开文件 `./src/renderer/App.vue`, 将默认 AppID: welovemaxim 更改为你的应用AppID,此 AppID 为在[美信拓扑后台](https://console.maximtop.com/)创建应用后获取。

了解更多信息可以阅读[在线文档](https://www.maximtop.com/docs/),或者在本仓库提问,好好玩 :)

-- --
**蓝莺IM 专业SDK,私有云按月付费**
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^3.2.0",
"devtron": "^1.4.0",
"electron": ">=9.4.0",
"electron": "18.1.0",
"electron-builder": "^22.2.0",
"electron-debug": "^3.0.1",
"element-ui": "^2.12.0",
Expand Down Expand Up @@ -69,7 +69,7 @@
"vue-eslint-parser": "^6.0.4",
"vue-loader": "^15.8.3",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.7",
"webpack-dev-server": "^3.8.2",
Expand Down Expand Up @@ -102,8 +102,10 @@
"release": "build",
"typesync": "typesync --ignoredeps=dev && npm install",
"package": "electron-builder --mac --config=_scripts/config.js",
"win": "rm -rf dist && npm run pack && electron-builder --win --config=_scripts/config.js",
"mac": "rm -rf dist && npm run pack && electron-builder --mac --config=_scripts/config.js",
"win": "rm -rf dist && npm run pack && electron-builder --win --x64 --config=_scripts/config.js",
"win-arm64": "rm -rf dist && npm run pack && electron-builder --win --arm64 --config=_scripts/config.js",
"mac": "rm -rf dist && npm run pack && electron-builder --mac --x64 --config=_scripts/config.js",
"mac-arm64": "rm -rf dist && npm run pack && electron-builder --mac --arm64 --config=_scripts/config.js",
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
Expand All @@ -113,5 +115,5 @@
"all": "node .electron-vue/build.js && electron-builder",
"w": "node .electron-vue/build.js"
},
"version": "2.9.9"
"version": "2.9.10"
}
1 change: 1 addition & 0 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function createWindow () {
webPreferences: {
nodeIntegration: true,
nodeIntegrationInWorker: false,
contextIsolation: false,
webSecurity: false,
},
show: false,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/im/floo-2.0.0.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/renderer/ui/chatting/content/group/chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ export default {
this.reloadMessage(message);
});
this.$store.getters.im.on('onReceiveHistoryMsg', (messages) => {
this.$store.getters.im.on('onReceiveHistoryMsg', ({ next }) => {
this.queryingHistory = false;
this.$store.dispatch('content/actionAppendMessage', {
history: true,
messages: messages.messages,
next: messages.next
next
});
!this.getMessages.length && this.scroll();
});
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/ui/chatting/content/group/info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ export default {
.asyncFileUpload({
file,
toType: 'groupAvatar',
group_id: this.getSid
group_id: this.getSid,
processCallback: function (res) {
console.log('fileChangeHandler groupAvatar file upload percent :' + 100 * (res.loaded / res.total));
}
})
.then((res) => {
this.$refs.fileRef.value = '';
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/ui/chatting/content/group/inputer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ export default {
fileType: this.fileType,
to_id: this.getSid,
toType: 'chat',
chatType: 'group'
chatType: 'group',
processCallback: function (res) {
console.log('fileChangeHandler group chat file upload percent :' + 100 * (res.loaded / res.total));
}
})
.then((res) => {
const fileInfo = {
Expand Down
7 changes: 3 additions & 4 deletions src/renderer/ui/chatting/content/roster/chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ export default {
this.reloadMessage(message);
});
im.on('onReceiveHistoryMsg', (messages) => {
im.on('onReceiveHistoryMsg', ({ next }) => {
this.queryingHistory = false;
this.$store.dispatch('content/actionAppendMessage', {
history: true,
messages: messages.messages,
next: messages.next
next
});
!this.getMessages.length && this.scroll();
this.scroll();
});
im.on('onMessageStatusChanged', ({ mid }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ui/chatting/content/roster/info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
this.$store.getters.im.on('onRosterInfoUpdate', (ids) => {
if (ids.has(this.getSid)) {
this.refreshUserInfo(newSid);
this.refreshUserInfo(this.getSid);
}
});
},
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/ui/chatting/content/roster/inputer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ export default {
fileType: this.fileType,
to_id: this.getSid,
toType: 'chat',
chatType: 'roster'
chatType: 'roster',
processCallback: function (res) {
console.log('fileChangeHandler roster chat file upload percent :' + Math.floor(100 * (res.loaded / res.total)));
}
})
.then((res) => {
const fileInfo = {
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/ui/chatting/content/setting/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ export default {
this.$store.getters.im.sysManage
.asyncFileUpload({
file,
toType: 'rosterAvatar'
toType: 'rosterAvatar',
processCallback: function (res) {
console.log('fileChangeHandler rosterAvatar file upload percent :' + 100 * (res.loaded / res.total));
}
})
.then((res) => {
this.$refs.fileRef.value = '';
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ui/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default {
case 'action':
if ('relogin' == desc) {
console.log('Token失效,尝试自动登录中');
const info = window.localStorage.getItem('maxim_logininfo') || {};
const info = this.getLoginInfo();
if (info.name && autoLoginTimes < AUTO_LOGIN_TIMES_MAX) {
console.log('Token失效,尝试自动登录中:', autoLoginTimes);
setTimeout(() => {
Expand Down
37 changes: 37 additions & 0 deletions src/renderer/ui/layers/groupsetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
<i :class="['r', groupInfo.msg_mute_mode ? 'switcher_on' : 'switcher_off']" @click="switchTouched(5)"></i>
</span>
</p>

<p>
<span class="sl">全员禁言</span>
<span class="sr">
<i :class="['r', isGroupBanAll() ? 'switcher_on' : 'switcher_off']" @click="switchTouched(6)"></i>
</span>
</p>
</div>
<div class="group_setting_group">
<div class="category">
Expand Down Expand Up @@ -344,6 +351,28 @@ export default {
this.groupInfo.msg_mute_mode = this.groupInfo.msg_mute_mode ? 0 : 2;
});
} //
if (index === 6) {
//全员禁言
if (this.isGroupBanAll()) {
this.im.groupManage
.asyncUnBanAll({
group_id: this.getSid
})
.then(() => {
this.groupInfo.ban_expire_time = 0;
});
} else {
this.im.groupManage
.asyncBanAll({
group_id: this.getSid,
duration: -1
})
.then((res) => {
this.groupInfo.ban_expire_time = res.ban_expire_time;
});
}
} //
},
//////
clickGroupsettingCloseHandler() {
Expand Down Expand Up @@ -594,6 +623,14 @@ export default {
this.selIdList = [];
this.requireMember();
});
},
isGroupBanAll() {
const banExpireTime = this.groupInfo.ban_expire_time;
if (!banExpireTime) {
return false;
}
return banExpireTime < 0 || new Date().getTime() < banExpireTime;
}
//methods finish
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/ui/store/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ const actions = {
allMessages = allMessages.concat(newMessages.slice(i, newMessages.length));
}

if (j < newMessages.length) {
if (j < oldMessages.length) {
allMessages = allMessages.concat(oldMessages.slice(i, oldMessages.length));
}
context.commit('setMessage', allMessages);
Expand Down

0 comments on commit f93a632

Please sign in to comment.