Skip to content

Commit 2d5b743

Browse files
peterpeter
authored andcommitted
v2.0.9
1 parent dff7476 commit 2d5b743

File tree

11 files changed

+199
-166
lines changed

11 files changed

+199
-166
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

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

11+
[Android, 安卓](https://github.com/QTGate/CoNETPlatform-Android)
12+
1113
[windows32](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.8/CoNET.Setup.2.0.8.ia32.exe)
1214

1315
[windows64](https://github.com/QTGate/QTGate-Desktop-Client/releases/download/v2.0.8/CoNET.Setup.2.0.8.exe)

app/CoNET.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,9 @@ interface twitter_post {
418418
truncated: boolean
419419
user: Twitter_verify_credentials
420420
tweetCountSummary: tweetCountSummary
421+
showUser: KnockoutObservable < boolean >
422+
CoNET_totalTwitter: number
423+
CoNET_currentTwitter: number
421424
}
422425

423426

app/localWebServer.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export default class localServer {
215215

216216
private sendRequest ( socket: SocketIO.Socket, cmd: QTGateAPIRequestCommand, CallBack ) {
217217
if ( !this.openPgpKeyOption) {
218-
console.log ( `sendrequest keypair error! !this.config [${ !this.config }] !this.keyPair[${ !this.keyPair }] !this.keyPair.passwordOK [${ !this.keyPair.passwordOK }]`)
218+
console.log ( `sendrequest keypair error! !this.config [${ !this.config }] !this.keyPair[${ !this.keyPair }]`)
219219
return CallBack (1)
220220
}
221221
if ( !this.CoNETConnectCalss ) {
@@ -420,22 +420,16 @@ export default class localServer {
420420
CallBack1()
421421
saveLog (`on checkActiveEmailSubmit`)
422422
if ( ! text || ! text.length || !/^-----BEGIN PGP MESSAGE-----/.test ( text )) {
423-
socket.emit ('checkActiveEmailSubmit', 0 )
423+
socket.emit ( 'checkActiveEmailSubmit', 0 )
424424
return saveLog ( `checkActiveEmailSubmit, no text.length ! [${ text }]` )
425425
}
426426

427-
if ( text.indexOf ('-----BEGIN PGP MESSAGE----- Version: GnuPG v1 ') > -1 ) {
428-
text = text.replace (/-----BEGIN PGP MESSAGE----- Version: GnuPG v1 /,'-----BEGIN__PGP__MESSAGE-----\r\nVersion:__GnuPG__v1\r\n\r\n')
429-
text = text.replace (/-----END PGP MESSAGE-----/, '-----END__PGP__MESSAGE-----')
430-
text = text.replace (/ /g, '\r\n')
431-
text = text.replace ( /__/g, ' ')
432-
}
433-
434427

435428
return Tool.decryptoMessage ( this.openPgpKeyOption, text, ( err, data ) => {
436429
if ( err ) {
437430
socket.emit ('checkActiveEmailSubmit', 1 )
438-
return saveLog ( `checkActiveEmailSubmit, decryptoMessage error [${ err.message ? err.message : null }]` )
431+
432+
return saveLog ( `checkActiveEmailSubmit, decryptoMessage error [${ err.message ? err.message : null }]\n${text}` )
439433
}
440434
let pass = null
441435
try {
@@ -1311,6 +1305,7 @@ export default class localServer {
13111305

13121306

13131307
this.listenAfterTwitterLogin ( socket )
1308+
13141309
if ( this.twitterDataInit ) {
13151310
return socket.emit ( 'password', null, this.twitterData )
13161311
}
@@ -1359,6 +1354,8 @@ export default class localServer {
13591354

13601355
}
13611356

1357+
1358+
13621359
constructor( private cmdResponse: ( cmd: QTGateAPIRequestCommand ) => void, test: boolean ) {
13631360

13641361
this.expressServer.set ( 'views', Path.join ( __dirname, 'views' ))
@@ -1373,8 +1370,15 @@ export default class localServer {
13731370
})
13741371

13751372
this.expressServer.get ( '/twitter', ( req, res ) => {
1376-
console.log (`get twitter`)
1377-
res.render( 'twitter', { title: 'CoNET for Twitter' })
1373+
console.log ( `get twitter`)
1374+
if ( !this.config.keypair || !this.config.keypair.publicKey || !this.CoNETConnectCalss ) {
1375+
1376+
return res.render( 'home', { title: 'home', proxyErr: false })
1377+
1378+
}
1379+
1380+
res.render( 'twitter', { title: 'CoNET for Twitter' })
1381+
13781382
})
13791383

13801384
this.expressServer.get ( '/proxyErr', ( req, res ) => {

app/public/css/page.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,10 @@ body {
109109
margin: 3em;
110110
}
111111
.CoContent {
112-
width: 100%;
112+
width: 95%;
113113
position: relative;
114-
transition: opacity 0.4s ease-in;
114+
transition: opacity 0.4s ease-in;
115+
margin: auto;
115116
}
116117
.loginCards {
117118
margin: 0px auto!important;
@@ -401,6 +402,10 @@ ul.plan-features {
401402
max-width:530px;
402403
}
403404
}
405+
406+
407+
408+
404409
.flapLeft, .flapeRight {
405410
position: relative;
406411
cursor: pointer;

app/public/scripts/CoGate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class CoGateClass {
358358
})
359359
})
360360

361-
socketIo.on ( 'QTGateGatewayConnectRequest', function ( err, cmd: IConnectCommand[], ) {
361+
socketIo.on ( 'QTGateGatewayConnectRequest', function ( err, cmd: IConnectCommand, ) {
362362

363363
if ( ! self.CoGateRegion() ) {
364364
let uuu: coGateRegion = null

app/public/scripts/imapForm.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,21 @@ class keyPairSign {
181181
} else {
182182
self.conformButtom ( true )
183183
}
184-
185184
})
186185
}
187186

188187
public checkActiveEmailSubmit () {
189188
const self = this
190189
this.conformTextError ( false )
191190
this.activeing ( true )
192-
return socketIo.emit11 ( 'checkActiveEmailSubmit', this.conformText(), function ( err, req: QTGateAPIRequestCommand ) {
191+
192+
let text = this.conformText()
193+
if ( / /.test ( text )) {
194+
text = text.replace (/ PGP MESSAGE/g, '__PGP__MESSAGE').replace (/ /g, '\r\n').replace (/__/g, ' ')
195+
text = text.replace (/ MESSAGE-----/,' MESSAGE-----\r\n')
196+
}
197+
198+
return socketIo.emit11 ( 'checkActiveEmailSubmit', text, function ( err, req: QTGateAPIRequestCommand ) {
193199
self.activeing ( false )
194200
if ( err !== null && err > -1 || req && req.error != null && req.error > -1 ) {
195201
self.conformTextErrorNumber ( err !== null && err > -1 ? err :

app/public/scripts/twitter.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ module twitter_layout {
444444
if ( index > -1 ) {
445445
this.currentTimelines.splice ( index, 1 )
446446
}
447+
data.showUser = ko.observable ( false )
447448
data.QTGate_created_at = ko.computed( function () {
448449
return getTimeFromCreate( data.created_at, self )
449450
})
@@ -490,6 +491,7 @@ module twitter_layout {
490491
data.favoritedLoader_ko = ko.observable ( false )
491492
this.currentTimelines.push ( data )
492493
$('.row.ui.shape').shape()
494+
$('.ui.sidebar.twitterTimes').sidebar('toggle')
493495
return this.currentTimelines.sort ( function ( a, b ) {
494496
return b.id - a.id
495497
})

app/tools/initSystem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ export const testPing = ( hostIp: string, CallBack ) => {
826826

827827
session.close ()
828828
if ( err ) {
829-
console.log (`session.pingHost ERROR, ${ err.message }`)
829+
console.log ( `session.pingHost ERROR, ${ err.message }`)
830830
return next ( err )
831831
}
832832
const ping = rcvd.getTime () - sent.getTime ()

app/views/home/index.pug

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ block jumbotron1
273273
<!-- /ko -->
274274
//- if: CoNETConnect
275275
<!-- /ko -->
276-
277-
section.CoContent.content( data-bind = " if: CoGate()" style = "margin-top: 4em;")
276+
<!-- ko if: CoGate -->
277+
section.CoContent.content( style = "margin-top: 4em;")
278278
<!-- ko if: CoGateClass -->
279279
<!-- ko with: CoGateClass -->
280280
<!-- ko if: showCards && ! CoGateAccount() && !CoGateRegion() -->
@@ -838,7 +838,7 @@ block jumbotron1
838838

839839
<!-- /ko -->
840840
<!-- /ko -->
841-
841+
<!-- /ko -->
842842
//- AppList
843843
<!-- ko if: AppList() && !CoGate() && keyPair() && keyPair().verified -->
844844
section.AppList.CoContent.content

0 commit comments

Comments
 (0)