Add tool to test locally
This commit is contained in:
1 parent
49d8524597
commit
e99e5bf6b4
7 files changed
+111
-27
No files matched your search
+35
-7
@@ -11,14 +11,42 @@ Page {
|
||||
subtitle: page.session && page.session.currentServer
|
||||
? "Connecté à " + page.session.currentServer.name + "."
|
||||
: ""
|
||||
initialFocus: logoutButton
|
||||
initialFocus: backButton
|
||||
|
||||
FocusButton {
|
||||
id: logoutButton
|
||||
text: "Se déconnecter"
|
||||
onClicked: {
|
||||
page.session.logout();
|
||||
page.navigator.reset("UserSelect");
|
||||
// La pile a été réinitialisée à la connexion : on reconstruit Serveurs > Utilisateurs
|
||||
// pour revenir au choix de l'utilisateur.
|
||||
function goBack() {
|
||||
page.navigator.reset("ServerSelect");
|
||||
page.navigator.push("UserSelect");
|
||||
}
|
||||
|
||||
// La touche Retour de la télécommande fait la même chose que le bouton
|
||||
// (sinon, à la racine de la pile, elle fermerait l'application).
|
||||
Keys.onPressed: {
|
||||
if (Remote.isBack(event.key)) {
|
||||
event.accepted = true;
|
||||
page.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: Theme.spacingM
|
||||
|
||||
FocusButton {
|
||||
id: backButton
|
||||
text: "Retour"
|
||||
KeyNavigation.right: logoutButton
|
||||
onClicked: page.goBack()
|
||||
}
|
||||
|
||||
FocusButton {
|
||||
id: logoutButton
|
||||
text: "Se déconnecter"
|
||||
KeyNavigation.left: backButton
|
||||
onClicked: {
|
||||
page.session.logout();
|
||||
page.goBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user