Skip to content

Commit e262f2a

Browse files
Peter XiePeter Xie
authored andcommitted
v0.8.12
1 parent 8e94bcf commit e262f2a

10 files changed

Lines changed: 107 additions & 34 deletions

File tree

app/imap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ class imapPeer extends Event.EventEmitter {
10261026
newWriteImap() {
10271027
this.wImap = new qtGateImapwrite(this.imapData, this.writeBox);
10281028
this.wImap.once('end', err => {
1029-
saveLog(`this.wImap.once end ! [${err.message}]`);
1029+
saveLog(`this.wImap.once end ! [${err && err.message ? err.message : null}]`);
10301030
this.wImap = null;
10311031
if (!this.doingDestroy)
10321032
return this.newWriteImap();

app/imap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ export class imapPeer extends Event.EventEmitter {
11621162
this.wImap = new qtGateImapwrite ( this.imapData, this.writeBox )
11631163

11641164
this.wImap.once ( 'end', err => {
1165-
saveLog ( `this.wImap.once end ! [${ err.message }]` )
1165+
saveLog ( `this.wImap.once end ! [${ err && err.message ? err.message : null }]` )
11661166
this.wImap = null
11671167
if ( ! this.doingDestroy )
11681168
return this.newWriteImap ()

app/public/scripts/home.js

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,11 @@ const infoDefine = [
569569
conformButtom: '验 证',
570570
formatError: ['内容格式错误,请复制从“-----BEGIN PGP MESSAGE----- (开始,一直到)-----END PGP MESSAGE-----” 结束的完整内容,粘贴在此输入框中。',
571571
'提供的内容不能被解密,请确认这是在您收到的最后一封从QTGate发送过来的激活信。如果还是没法完成激活,请删除您的密钥重新生成和设定。',
572-
'QTGate未连接错误,请退出QTGate重新启动!', '无效激活码!系统已经重新发送新的激活Email,请检查邮箱重做激活。', '您的QTGate看上去有问题, 请删除您的密钥,重新设置您的QTGate!',
573-
'QTGate系统故障,请稍后再试。', '您当天的数据通讯量达到上限,请等待明天再试或升级用户类型', '用来通讯的Email设定有错误,请检查IMAP设定后重试,或此Email类型QTGate不支持',
572+
'QTGate未连接错误,请退出QTGate重新启动!',
573+
'无效激活码!QTGate系统已重新发送新的激活Email,并斷開與您的連接。请退出QTGate重新啟動QTGate後,检查您的邮箱重做激活。',
574+
'您的QTGate看上去有问题, 请删除您的密钥,重新设置您的QTGate!',
575+
'QTGate系统故障,请稍后再试。',
576+
'您当天的数据通讯量达到上限,请等待明天再试或升级用户类型', '用来通讯的Email设定有错误,请检查IMAP设定后重试,或此Email类型QTGate不支持',
574577
'您所选区域不能够连结,请稍候再试'],
575578
activeing: '正在通讯中'
576579
},
@@ -1114,7 +1117,8 @@ const infoDefine = [
11141117
conformButtom: '検 証',
11151118
formatError: ['フォーマットエラー、コピーするのは「-----BEGIN PGP MESSAGE-----」から「-----END PGP MESSAGE-----」まで全ての内容をしてください。',
11161119
'この内容で暗号化解除ができませんでした。鍵ペアEmailアカンウトメールボックス再検査し、QTGateから最後のを選んでください。または鍵ペアを削除して、鍵ペア再発行してください。',
1117-
'QTGateに接続していません、QTGateを退出してもう一回起動してください。', '検証できません!QTGate新たな検証をQTGateアカンウトメールボックスに届きますので、再検証をください。',
1120+
'QTGateに接続していません、QTGateを退出してもう一回起動してください。',
1121+
'検証できません!QTGateシステムは接続を切断しました、新たな検証をQTGateアカンウトメールボックスに届きます、まずQTGate再起動してから、再検証をください。',
11181122
'あなたのQTGateは問題があります、鍵ペアを削除して一から再セットアップしてください。', 'QTGateシステムは故障があります、後からもう一度試しにしてください',
11191123
'あなたの今日データ通信はリミットになっていますので、明日まで待ってください。またはユーザー種類をアップグレードをしてください',
11201124
'通信用IMAPの設定にエラーがあるか又はそのタープのIMAPアカンウトがQTGateサポートしません。よくチェックしてもう一回試しにしてください。',
@@ -1514,7 +1518,8 @@ const infoDefine = [
15141518
conformButtom: 'Conform',
15151519
formatError: ['Format error! Copy all content from [-----BEGIN PGP MESSAGE-----] ... to [-----END PGP MESSAGE-----]. Paste into this text box.',
15161520
'Oops. This may not decrypt. Find the lasest mail from QTGate in your key pair email mailbox. Or delete this key pair and rebuild new key pair please.',
1517-
'QTGate disconnect error!. Please exit and restart QTGate.', 'This secret verification code was invalid. A new verification email was sent to your mail box. Please check your email.',
1521+
'QTGate disconnect error!. Please exit and restart QTGate.',
1522+
'This secret verification code was invalid. QTGate disconnected. A new verification email was sent to your mail box. Please restart QTGate and check your email. Do validate again!',
15181523
'Your QTGate looks have problem, Please delete your key pair and do setup again from first!', 'QTGate system looks have problem, Please try again late.',
15191524
`Your data transfer is limit today, please try again tomorrow or upgrade your user type.`,
15201525
'Selected region has unavailable, try again later.'],
@@ -1916,10 +1921,13 @@ const infoDefine = [
19161921
bottom1_1: '此致',
19171922
bottom1_2: 'QTGate團隊',
19181923
conformButtom: '驗 證',
1919-
formatError: ['內容格式錯誤。複制內容從“-----BEGIN PGP MESSAGE----- ( 開始,一直到 )----- END PGP MESSAGE-----” 結束的完整內容,粘貼到此輸入框中',
1920-
'提供的內容不能被解密,請確認這是在您收到的最後一封從QTGate發送過來的激活信。如果還是沒法完成激活,請刪除您的密鑰重新生成和設定。',
1921-
'QTGate未連接錯誤,請退出QTGate重新啟動!', '無效激活碼!系統已經重新發送新的激活Email,請檢查郵箱重做激活。', '您的QTGate看上去有問題, 請刪除您的密鑰,重新設置您的QTGate!',
1922-
'QTGate系統故障,請稍後再試。', '您當天的數據通信量達到上限,請等待明天再試或升級用戶類型', '用來通訊的Email設定有錯誤,請檢查IMAP設定後重試,或此Email類型不被QTGate支持',
1924+
formatError: ['內容格式錯誤,請複制從“-----BEGIN PGP MESSAGE----- (開始,一直到)-----END PGP MESSAGE-----” 結束的完整內容,粘貼在此輸入框中。 ',
1925+
'提供的內容不能被解密,請確認這是在您收到的最後一封從QTGate發送過來的激活信。如果還是沒法完成激活,請刪除您的密鑰重新生成和設定。 ',
1926+
'QTGate未連接錯誤,請退出QTGate重新啟動! ',
1927+
'無效激活碼! QTGate系統已重新發送新的激活Email,並斷開與您的連接。請退出QTGate重新啟動QTGate後,檢查您的郵箱重做激活。 ',
1928+
'您的QTGate看上去有問題, 請刪除您的密鑰,重新設置您的QTGate! ',
1929+
'QTGate系統故障,請稍後再試。 ',
1930+
'您當天的數據通訊量達到上限,請等待明天再試或升級用戶類型', '用來通訊的Email設定有錯誤,請檢查IMAP設定後重試,或此Email類型QTGate不支持',
19231931
'您所選區域不能夠連結,請稍候再試'],
19241932
activeing: '正在通訊中'
19251933
},
@@ -2623,6 +2631,7 @@ var view_layout;
26232631
constructor() {
26242632
this.overflowShow = ko.observable(false);
26252633
this.CancelCreateKeyPairSent = false;
2634+
this.modalContent = ko.observable('');
26262635
this.menu = Menu;
26272636
this.infoDefine = infoDefine;
26282637
this.documentReady = ko.observable(false);
@@ -2909,8 +2918,12 @@ var view_layout;
29092918
socketIo.on('config', config => {
29102919
this.config(config);
29112920
});
2912-
socketIo.on('checkActiveEmailError', (err, status) => {
2921+
socketIo.on('checkActiveEmailError', err => {
29132922
if (err !== null && err > -1) {
2923+
if (err === 3 || err === 4) {
2924+
this.modalContent(infoDefine[this.languageIndex()].emailConform.formatError[err]);
2925+
return $('.ui.basic.modal').modal('show');
2926+
}
29142927
this.conformTextError(true);
29152928
this.conformTextErrorNumber(err);
29162929
this.QTGateConnecting(2);
@@ -2952,6 +2965,9 @@ var view_layout;
29522965
}
29532966
*/
29542967
if (!this.keyPair().verified) {
2968+
if (data.qtGateConnecting === 6) {
2969+
return this.connectQTGateShow(true);
2970+
}
29552971
this.showActiveMail(true);
29562972
const uu = this.emailPool().findIndex(n => { return n.uuid === data.qtgateConnectImapAccount; });
29572973
this.qtgateImapAccount(uu);
@@ -3397,7 +3413,16 @@ var view_layout;
33973413
this.checkActiveEmailError(false);
33983414
this.checkingActiveEmail(true);
33993415
this.QTGateConnecting(4);
3400-
return socketIo.emit('checkActiveEmailSubmit', this.conformText());
3416+
const u = Buffer.from(this.conformText());
3417+
let text = this.conformText();
3418+
// Outlook Mail
3419+
if (u.indexOf('-----BEGIN PGP MESSAGE----- Version: GnuPG v1 ') > -1) {
3420+
text = text.replace(/-----BEGIN PGP MESSAGE----- Version: GnuPG v1 /, '-----BEGIN__PGP__MESSAGE-----\r\nVersion:__GnuPG__v1\r\n\r\n');
3421+
text = text.replace(/-----END PGP MESSAGE-----/, '-----END__PGP__MESSAGE-----');
3422+
text = text.replace(/ /g, '\r\n');
3423+
text = text.replace(/__/g, ' ');
3424+
}
3425+
return socketIo.emit('checkActiveEmailSubmit', text);
34013426
}
34023427
connectQTGate() {
34033428
this.connectQTGateShow(true);
@@ -3520,6 +3545,9 @@ var view_layout;
35203545
this.disconnecting(false);
35213546
});
35223547
}
3548+
exit() {
3549+
socketIo.emit('exit');
3550+
}
35233551
}
35243552
view_layout.view = view;
35253553
})(view_layout || (view_layout = {}));

0 commit comments

Comments
 (0)