Skip to content

Commit

Permalink
* add QT bat file
Browse files Browse the repository at this point in the history
* backup simplify to folder selection dialog
  • Loading branch information
RyuMaster committed Jan 8, 2019
1 parent b8c409f commit ce807fa
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 19 deletions.
9 changes: 9 additions & 0 deletions daemon/chim_mainQT.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@echo off
setlocal EnableExtensions EnableDelayedExpansion
cls

tasklist|find /i "xaya-qt.exe" >NUL
if errorlevel 1 xaya-qt.exe -wallet=vault.dat -wallet=game.dat -server -rpcallowip=127.0.0.1 -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubhashblock=tcp://127.0.0.1:28332 -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 -zmqpubgameblocks=tcp://127.0.0.1:28332
goto :eof


9 changes: 9 additions & 0 deletions daemon/chim_mainQTX86.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@echo off
setlocal EnableExtensions EnableDelayedExpansion
cls

tasklist|find /i "xaya-qt.exe" >NUL
if errorlevel 1 xaya-qt86.exe -wallet=vault.dat -wallet=game.dat -server -rpcallowip=127.0.0.1 -zmqpubhashtx=tcp://127.0.0.1:28332 -zmqpubhashblock=tcp://127.0.0.1:28332 -zmqpubrawblock=tcp://127.0.0.1:28332 -zmqpubrawtx=tcp://127.0.0.1:28332 -zmqpubgameblocks=tcp://127.0.0.1:28332
goto :eof


29 changes: 22 additions & 7 deletions src/app/settings/settings.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,12 @@ export class SettingsComponent {
this.clearPathShedule = false;
this.dirpath = filePath;
this.cdr.detectChanges();

if(this.isDoubleByte(this.dirpath))
{
swal(this.translate.instant('SOVERVIEW.ERROR'), this.translate.instant('SSETTINGS.UNICODE'), "error");
return;
}

});

Expand All @@ -184,21 +190,22 @@ export class SettingsComponent {

backUpWallet(type)
{
window.require('electron').remote.dialog.showSaveDialog({title: this.translate.instant('SSETTINGS.SELBUDIST'), defaultPath: '~/vault.dat', filters: [{name: 'Wallet Data', extensions: ['dat']}]}, (filePath) =>
window.require('electron').remote.dialog.showOpenDialog({title: this.translate.instant('SSETTINGS.SELBUDIST'), properties: ['openDirectory']}, (filePath) =>
{

if (filePath === undefined)
{
swal(this.translate.instant('SOVERVIEW.ERROR'), this.translate.instant('SSETTINGS.NOFILESEL'), "error");
return;
}


this.globalService.walletBackUp(filePath, 0);

filePath = filePath.replace(".dat","[game].dat");
let fpCp = filePath;
fpCp += "/vault.dat";
this.globalService.walletBackUp(fpCp, 0);

this.globalService.walletBackUp(filePath, 1);
let fpCp2 = filePath;
fpCp2 += "/game.dat";
this.globalService.walletBackUp(fpCp2, 1);

});
}
Expand Down Expand Up @@ -330,6 +337,12 @@ export class SettingsComponent {
}
}

isDoubleByte(str)
{
var hasMoreThanAscii = /^[\u0000-\u007f]*$/.test(str);
return !hasMoreThanAscii;
}

updateSettingsDetails()
{

Expand All @@ -346,6 +359,8 @@ export class SettingsComponent {
this.dirpath = "";
}



if(this.currentTestnet != this.testnet)
{
if(this.testnet == true)
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "设置已保存。您的钱包现在将自动关闭,请重启。"
"NEEDRESTART" : "设置已保存。您的钱包现在将自动关闭,请重启。",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "发送地址",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "Einstellungen gespeichert. Ihr Wallet schließt sich jetzt automatisch, bitte starten Sie neu."
"NEEDRESTART" : "Einstellungen gespeichert. Ihr Wallet schließt sich jetzt automatisch, bitte starten Sie neu.",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": " Sende-Adressen",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"CTORPC" : "Conectarse a RPC en el puerto ",
"CONNECTED" : "Conectado",
"PERROR": "Error de Permisos",
"ENCRYPTWARN" : "Por favor, encripta tu Cartera Segura"
"ENCRYPTWARN" : "Por favor, encripta tu Cartera Segura",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SSETTINGS": {
"CONNECTIONSETTINGS": "Configuración de Conexión",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/gb.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "Settings Saved. Your wallet will close automatically now, please restart."
"NEEDRESTART" : "Settings Saved. Your wallet will close automatically now, please restart.",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "Sending Addresses",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "Postavke Spremljene. Vaš novčanik će se zatvoriti automatski sada, molimo Vas ponovo pokrenite."
"NEEDRESTART" : "Postavke Spremljene. Vaš novčanik će se zatvoriti automatski sada, molimo Vas ponovo pokrenite.",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "Adresa Slanja",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "Pengaturan disimpan. Dompet Anda akan tertutup secara otomatis saat ini, harap hidupkan ulang."
"NEEDRESTART" : "Pengaturan disimpan. Dompet Anda akan tertutup secara otomatis saat ini, harap hidupkan ulang.",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "Alamat Pengiriman",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "Impostazioni Salvate. Il portafoglio si chiuderà automaticamente, per favore riavvialo manualmente."
"NEEDRESTART" : "Impostazioni Salvate. Il portafoglio si chiuderà automaticamente, per favore riavvialo manualmente.",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "Indirizzi d'Invio",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/jp.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "設定が保存されました。あなたのウォレットは自動的に閉じます。再起動してください。"
"NEEDRESTART" : "設定が保存されました。あなたのウォレットは自動的に閉じます。再起動してください。",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "送信アドレス",
Expand Down
Binary file modified src/assets/i18n/kr.json
Binary file not shown.
3 changes: 2 additions & 1 deletion src/assets/i18n/ph.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "Nasaved na ang iyong Settings. Ang inyong wallet ay otomatikong magsasara na ngayon, pakiusap i-restart na."
"NEEDRESTART" : "Nasaved na ang iyong Settings. Ang inyong wallet ay otomatikong magsasara na ngayon, pakiusap i-restart na.",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "Magpapadala na Addresses",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "Configurações guardadas. A sua carteira irá fechar-se automaticamente agora, por favor re-inicie."
"NEEDRESTART" : "Configurações guardadas. A sua carteira irá fechar-se automaticamente agora, por favor re-inicie.",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "Endereços de Envio",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "Настройки сохранены, теперь кошелёк выключится автоматически, просьба перезагрузить его."
"NEEDRESTART" : "Настройки сохранены, теперь кошелёк выключится автоматически, просьба перезагрузить его.",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "Адреса Отправки",
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"RESYNCH" : "Delete Chain",
"RESYNCHWARN" : "Warning! This will completely delete your chain and restart the wallet. Use only when you were synced before, but now having troubles. Proceed?",
"RESYNCHCANCEL" : "Cancel",
"NEEDRESTART" : "Ayarlar kaydedildi. Cüzdanınız şimdi otomatik olarak kapanacak, lütfen yeniden başlatın."
"NEEDRESTART" : "Ayarlar kaydedildi. Cüzdanınız şimdi otomatik olarak kapanacak, lütfen yeniden başlatın.",
"UNICODE" : "Please, use ANSI characters for the datadirpath only"
},
"SADDRESSES": {
"SENDINGADDRESSES": "Gönderme Adresleri",
Expand Down

0 comments on commit ce807fa

Please sign in to comment.