mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Add cancel button on Locations view to go back to location selector
This commit is contained in:
parent
962cda0947
commit
64c48be211
2 changed files with 16 additions and 0 deletions
|
@ -62,6 +62,10 @@ Item
|
||||||
createNewButton.enabled = false
|
createNewButton.enabled = false
|
||||||
createNewButton.text = "Creating profile..."
|
createNewButton.text = "Creating profile..."
|
||||||
}
|
}
|
||||||
|
onCancel:
|
||||||
|
{
|
||||||
|
locationView.state = "selectLocation"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State
|
State
|
||||||
|
@ -83,6 +87,10 @@ Item
|
||||||
locationView.attemptLogin = true
|
locationView.attemptLogin = true
|
||||||
attemptTimer.start()
|
attemptTimer.start()
|
||||||
}
|
}
|
||||||
|
onCancel:
|
||||||
|
{
|
||||||
|
locationView.state = "selectLocation"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -24,6 +24,7 @@ Item
|
||||||
{
|
{
|
||||||
id: loginView
|
id: loginView
|
||||||
property string buttonText: qsTr("Unlock")
|
property string buttonText: qsTr("Unlock")
|
||||||
|
property string cancelText: qsTr("Cancel")
|
||||||
property string iconUrl: "qrc:/icons/emblem-locked.svg"
|
property string iconUrl: "qrc:/icons/emblem-locked.svg"
|
||||||
property string login
|
property string login
|
||||||
property bool loginPreset: false
|
property bool loginPreset: false
|
||||||
|
@ -32,6 +33,7 @@ Item
|
||||||
property string password: advancedMode ? "" : hardcodedPassword
|
property string password: advancedMode ? "" : hardcodedPassword
|
||||||
property string suggestionText
|
property string suggestionText
|
||||||
signal submit(string login, string password)
|
signal submit(string login, string password)
|
||||||
|
signal cancel()
|
||||||
|
|
||||||
Component.onCompleted: loginPreset = login.length > 0
|
Component.onCompleted: loginPreset = login.length > 0
|
||||||
|
|
||||||
|
@ -131,6 +133,12 @@ Item
|
||||||
text: loginView.buttonText
|
text: loginView.buttonText
|
||||||
onClicked: loginView.submit(nameField.text, passwordField.text)
|
onClicked: loginView.submit(nameField.text, passwordField.text)
|
||||||
}
|
}
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
id: cancelButton
|
||||||
|
text: loginView.cancelText
|
||||||
|
onClicked: loginView.cancel()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue