mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-11 10:17:24 -04:00
WalletManager::openWalletAsync integrating with UI
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
import QtQuick 2.2
|
||||
import moneroComponents 1.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import 'utils.js' as Utils
|
||||
|
||||
Item {
|
||||
opacity: 0
|
||||
@@ -54,7 +55,7 @@ Item {
|
||||
}
|
||||
|
||||
function checkNextButton() {
|
||||
var wordsArray = cleanWordsInput(uiItem.wordsTextItem.memoText).split(" ");
|
||||
var wordsArray = Utils.lineBreaksToSpaces(uiItem.wordsTextItem.memoText).split(" ");
|
||||
wizard.nextButton.enabled = wordsArray.length === 25;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import QtQuick 2.2
|
||||
import moneroComponents 1.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import Bitmonero.Wallet 1.0
|
||||
import 'utils.js' as Utils
|
||||
|
||||
Item {
|
||||
opacity: 0
|
||||
@@ -46,13 +47,13 @@ Item {
|
||||
}
|
||||
|
||||
function checkNextButton() {
|
||||
var wordsArray = cleanWordsInput(uiItem.wordsTextItem.memoText).split(" ");
|
||||
var wordsArray = Utils.lineBreaksToSpaces(uiItem.wordsTextItem.memoText).split(" ");
|
||||
wizard.nextButton.enabled = wordsArray.length === 25;
|
||||
}
|
||||
|
||||
function onPageClosed(settingsObject) {
|
||||
settingsObject['account_name'] = uiItem.accountNameText
|
||||
settingsObject['words'] = cleanWordsInput(uiItem.wordsTextItem.memoText)
|
||||
settingsObject['words'] = Utils.lineBreaksToSpaces(uiItem.wordsTextItem.memoText)
|
||||
settingsObject['wallet_path'] = uiItem.walletPath
|
||||
return recoveryWallet(settingsObject)
|
||||
}
|
||||
@@ -69,9 +70,7 @@ Item {
|
||||
return success;
|
||||
}
|
||||
|
||||
function cleanWordsInput(text) {
|
||||
return text.trim().replace(/(\r\n|\n|\r)/gm, " ");
|
||||
}
|
||||
|
||||
|
||||
WizardManageWalletUI {
|
||||
id: uiItem
|
||||
|
||||
@@ -42,3 +42,8 @@ function mapScope (inputScopeFrom, inputScopeTo, outputScopeFrom, outputScopeTo,
|
||||
function tr(text) {
|
||||
return qsTr(text) + translationManager.emptyString
|
||||
}
|
||||
|
||||
|
||||
function lineBreaksToSpaces(text) {
|
||||
return text.trim().replace(/(\r\n|\n|\r)/gm, " ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user