Skip to content

Commit dff7476

Browse files
peterpeter
authored andcommitted
v2.0.8
1 parent f1fd455 commit dff7476

File tree

8 files changed

+63
-35
lines changed

8 files changed

+63
-35
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
## Download ダウンロード 下載
88

9-
### [The latest 最新版 v2.0.2](https://github.com/QTGate/QTGate-Desktop-Client/releases/latest/)
9+
### [The latest 最新版 v2.0.8](https://github.com/QTGate/QTGate-Desktop-Client/releases/latest/)
1010

11-
[windows32](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.2/CoNET.Setup.2.0.2.ia32.exe)
11+
[windows32](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.8/CoNET.Setup.2.0.8.ia32.exe)
1212

13-
[windows64](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.2/CoNET.Setup.2.0.2.exe)
13+
[windows64](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.8/CoNET.Setup.2.0.8.exe)
1414

15-
[MacOS](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.2/CoNET-2.0.2.dmg)
15+
[MacOS](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.8/CoNET-2.0.8.dmg)
1616

17-
[Linux deb](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.2/CoNET_2.0.2_amd64.deb)
17+
[Linux deb](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.8/CoNET_2.0.8_amd64.deb)
1818

19-
[Linux pacman](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.2/CoNET-2.0.2.pacman)
19+
[Linux pacman](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.8/CoNET-2.0.8.pacman)
2020

2121
[WInXP or npm install](https://github.com/QTGate/QTGate-Desktop-Client/wiki/WInXP%E4%BB%A5%E5%8F%8ANPM%E7%92%B0%E5%A2%83%E4%B8%8B%E5%AE%89%E8%A3%9DCoNET)
2222

app/localWebServer.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,23 +294,29 @@ export default class localServer {
294294
requestSerial: Crypto.randomBytes(8).toString( 'hex' )
295295
}
296296

297+
298+
299+
297300
return this.sendRequest ( socket, com, ( err: number, res: QTGateAPIRequestCommand ) => {
298301
// no error
299302
if ( err ) {
303+
socket.emit ( 'QTGateGatewayConnectRequest', err )
300304
return console.log ( `on QTGateGatewayConnectRequest CoNETConnectCalss.request return error`, err )
301305
}
302306
if ( res.error < 0 ) {
303307

304308
const arg: IConnectCommand[] = this.connectCommand = res.Args
305-
console.log ( JSON.stringify ( res.Args ))
306-
this.makeOpnConnect ( arg )
307309

310+
this.makeOpnConnect ( arg )
308311
return socket.emit ( 'QTGateGatewayConnectRequest', null, this.connectCommand )
312+
309313
}
314+
315+
return socket.emit ( 'QTGateGatewayConnectRequest', res.error )
310316

311-
saveLog ( `connectRequest res.error [${ res.error }]`)
312317
})
313318

319+
314320
}
315321

316322
// iOPN connect

app/public/scripts/CoGate.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class coGateRegion {
120120
}
121121
}
122122

123-
public QTGateGatewayConnectRequestCallBack ( error, connectCommand: IConnectCommand[] ) {
123+
public QTGateGatewayConnectRequestCallBack ( error, connectCommand: IConnectCommand ) {
124124
clearTimeout ( this.doingProcessBarTime )
125125
this.CoGateConnerting ( false )
126126

@@ -131,13 +131,16 @@ class coGateRegion {
131131
this.error ( error )
132132
return
133133
}
134-
const data1 = connectCommand[0]
135-
if ( data1 ) {
136-
this.localHostIP ( data1.localServerIp[0] )
137-
this.QTGateLocalProxyPort ( data1.localServerPort )
138-
//this.QTTransferData ( data1.transferData )
139-
return this.QTConnectData ( data1 )
134+
135+
if ( connectCommand.error > -1 ) {
136+
return this.error ( connectCommand.error )
140137
}
138+
const data1 = connectCommand[0]
139+
this.localHostIP ( data1.localServerIp[0] )
140+
this.QTGateLocalProxyPort ( data1.localServerPort )
141+
//this.QTTransferData ( data1.transferData )
142+
return this.QTConnectData ( data1 )
143+
141144
}
142145

143146
public QTGateGatewayConnectRequest () {

app/public/scripts/home.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ var view_layout;
250250
this.AppList = ko.observable(false);
251251
this.CoGateRegionStoped = ko.observable(false);
252252
this.imapData = null;
253-
this.newVersion = ko.observable('');
253+
this.newVersion = ko.observable(null);
254254
this.socketListen();
255255
}
256256
systemError() {
@@ -349,11 +349,11 @@ var view_layout;
349349
if (!json) {
350350
return;
351351
}
352-
const localVersion = 'v' + config.version;
353-
if (json.tag_name <= localVersion) {
354-
return;
352+
const localVersion = config.version;
353+
json.tag_name = /^v/i.test(json.tag_name) ? json.tag_name.substr(1) : json.tag_name;
354+
if (cmpVersions(localVersion, json.tag_name) < 0) {
355+
self.newVersion(json.tag_name);
355356
}
356-
self.newVersion(json.tag_name);
357357
});
358358
return self.initConfig(config);
359359
});

app/public/scripts/home.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ module view_layout {
271271
public AppList = ko.observable ( false )
272272
public CoGateRegionStoped = ko.observable ( false )
273273
public imapData: IinputData = null
274-
public newVersion = ko.observable ( '' )
274+
public newVersion = ko.observable ( null )
275275

276276
public systemError () {
277277
this.modalContent ( infoDefine[ this.languageIndex() ].emailConform.formatError [ 10 ] )
@@ -388,11 +388,13 @@ module view_layout {
388388
if ( ! json ) {
389389
return
390390
}
391-
const localVersion = 'v'+config.version
392-
if ( json.tag_name <= localVersion ) {
393-
return
391+
const localVersion = config.version
392+
json.tag_name = /^v/i.test( json.tag_name ) ? json.tag_name.substr ( 1 ) : json.tag_name
393+
394+
if ( cmpVersions ( localVersion, json.tag_name ) < 0 ) {
395+
self.newVersion ( json.tag_name )
394396
}
395-
self.newVersion ( json.tag_name )
397+
396398

397399
})
398400
return self.initConfig ( config )

app/public/scripts/siteShare.ts

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ const planArray = [
188188
showButton: ko.observable ( false ),
189189
features: [{
190190
title: ['代理区域','エリア','Region','代理區域'],
191-
detail: ['巴黎','パリ','Paris','巴黎'],
191+
detail: ['欧洲2区域','ヨーロッパ 2 エリア','2 regions in Europe','歐洲2區域'],
192192
},{
193193
title: ['服务器','サーバー','Server','伺服器'],
194194
detail: ['共享','共有','Share','共享'],
@@ -567,7 +567,7 @@ const infoDefine = [
567567

568568
linuxUpdate:{
569569
newVersionDownload: '点击这里下载并安装',
570-
step1: '下载新版本',
570+
step1: '请更新版本:',
571571
step2: '授权新版本CoNET为可执行文件',
572572
step2J1:'/images/linuxUpdate1_tw.jpg',
573573
step2J2:'/images/linuxUpdate2_tw.jpeg',
@@ -1365,7 +1365,7 @@ const infoDefine = [
13651365

13661366
linuxUpdate:{
13671367
newVersionDownload: 'クリックしてダウンロードとインストール',
1368-
step1:'ダウンロードニューバージョン',
1368+
step1:'最新バージョンにアップデート:',
13691369
step2: 'CoNETを実行ファイルに許可与える。',
13701370
step2J1:'/images/linuxUpdate1_jp.jpg',
13711371
step2J2:'/images/linuxUpdate2_jp.jpg',
@@ -2060,7 +2060,7 @@ const infoDefine = [
20602060

20612061
linuxUpdate:{
20622062
newVersionDownload: 'click here to download and install!',
2063-
step1:'Download latest CoNET version.',
2063+
step1:'Update new CoNET: ',
20642064
step2: 'Allow executing file as program',
20652065
step2J1:'/images/linuxUpdate1.jpg',
20662066
step2J2:'/images/linuxUpdate2.jpeg',
@@ -2700,7 +2700,7 @@ const infoDefine = [
27002700

27012701
linuxUpdate: {
27022702
newVersionDownload: '點擊這裡下載並安裝',
2703-
step1:'下載新版本',
2703+
step1:'請更新版本: ',
27042704
step2: '授權新版本CoNET為可執行文件',
27052705
step2J1:'/images/linuxUpdate1_tw.jpg',
27062706
step2J2:'/images/linuxUpdate2_tw.jpeg',
@@ -2979,6 +2979,23 @@ const linkClick = function ( url: string ) {
29792979
return window.open ( url, '_blank')
29802980
}
29812981

2982+
function cmpVersions ( a: string, b: string ) {
2983+
let diff
2984+
const regExStrip0 = /(\.0+)+$/
2985+
const segmentsA = a.replace( regExStrip0, '').split('.')
2986+
const segmentsB = b.replace( regExStrip0, '').split('.')
2987+
const l = Math.min ( segmentsA.length, segmentsB.length )
2988+
2989+
for ( let i = 0; i < l; i++ ) {
2990+
diff = parseInt ( segmentsA[i], 10 ) - parseInt ( segmentsB[i], 10 )
2991+
if ( diff ) {
2992+
return diff
2993+
}
2994+
}
2995+
return segmentsA.length - segmentsB.length;
2996+
}
2997+
2998+
29822999
const socketIo = io ({ reconnectionAttempts: 5, timeout: 500, autoConnect: true })
29833000
const QTGateRegionsSetup: IQTGateRegionsSetup[] = [
29843001
{

app/views/home/index.pug

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ block jumbotron1
4747
<!-- ko if: newVersion -->
4848
a( href = "https://github.com/QTGate/QTGate-Desktop-Client" target="_blank")
4949
i.icon.setting.big.loading.red
50-
span( data-bind="text: infoDefine[ $root.languageIndex() ].linuxUpdate.step1 " style="color: white;")
50+
span( data-bind="text: infoDefine[ $root.languageIndex() ].linuxUpdate.step1 + newVersion ()" style="color: white;")
5151
<!-- /ko -->
5252
<!-- /ko -->
5353

@@ -401,7 +401,7 @@ block jumbotron1
401401
<!-- /ko -->
402402

403403

404-
<!-- ko if: error() && error() > -1 -->
404+
<!-- ko if: error() > -1 -->
405405
.ui.segment.red.error
406406
.ui.warning.message
407407
i.close.icon( data-bind="click: function () { closeErrMessage() }")

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "conet",
3-
"version": "2.0.2",
3+
"version": "2.0.8",
44
"license": "MIT",
55
"description": "CoNET platform",
66
"scripts": {
@@ -69,7 +69,7 @@
6969
"jquery": "^3.3.1",
7070
"net-ping": "^1.2.3",
7171
"node-uuid": "^1.4.8",
72-
"nodemailer": "^4.6.6",
72+
"nodemailer": "^4.6.7",
7373
"openpgp": "^3.0.11",
7474
"portastic": "^1.0.1",
7575
"pug": "^2.0.3",

0 commit comments

Comments
 (0)