mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-13 20:06:34 +02:00
fd983955b4
wizard: fix dots on pw page wizard: fix focus on pw field viewOnly: added success message
25 lines
628 B
JavaScript
25 lines
628 B
JavaScript
.pragma library
|
|
|
|
function mapScope (inputScopeFrom, inputScopeTo, outputScopeFrom, outputScopeTo, value) {
|
|
var x = (value - inputScopeFrom) / (inputScopeTo - inputScopeFrom);
|
|
var result = outputScopeFrom + ((outputScopeTo - outputScopeFrom) * x);
|
|
return result;
|
|
}
|
|
|
|
|
|
function tr(text) {
|
|
return qsTr(text) + translationManager.emptyString
|
|
}
|
|
|
|
|
|
function lineBreaksToSpaces(text) {
|
|
return text.trim().replace(/(\r\n|\n|\r)/gm, " ");
|
|
}
|
|
|
|
function usefulName(path) {
|
|
// arbitrary "short enough" limit
|
|
if (path.length < 32)
|
|
return path
|
|
return path.replace(/.*[\/\\]/, '').replace(/\.keys$/, '')
|
|
}
|