Shared GUI for Bridge and Import/Export

This commit is contained in:
Jakub
2020-05-27 15:58:50 +02:00
committed by Michal Horejsek
parent b598779c0f
commit 49316a935c
96 changed files with 11469 additions and 209 deletions

View File

@ -138,6 +138,11 @@ Column {
}
}
function clear() {
inputField.text = ""
rightIcon = ""
}
function checkNonEmpty() {
if (inputField.text == "") {
rightIcon = Style.fa.exclamation_triangle
@ -154,6 +159,17 @@ Column {
if (root.isPassword) inputField.echoMode = TextInput.Password
}
function checkIsANumber(){
if (/^\d+$/.test(inputField.text)) {
rightIcon = Style.fa.check_circle
return true
}
rightIcon = Style.fa.exclamation_triangle
root.placeholderText = ""
inputField.focus = true
return false
}
function forceFocus() {
inputField.forceActiveFocus()
}