1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
4 import "UIConstants.js" as Const
11 //property alias taskMenu: taskMenu
15 U1.getToken(user.text,pass.text,root)
18 function onResp(secrets,account) {
20 Utils.setCustomerKey(secrets.consumer_key);
21 Utils.setCustomerSecret(secrets.consumer_secret);
22 Utils.setToken(secrets.token);
23 Utils.setTokenSecret(secrets.secret);
24 Utils.setName(account.username);
26 tip.show(qsTr("Logged in!"));
27 //pageStack.initialPage = "StartPage.qml";
28 pageStack.initialPage = "FilesPage.qml";
29 pageStack.currentPage.init();
32 function onErr(status) {
34 //console.log("onErr");
36 tip.show(qsTr("Ubuntu One authorization has failed. Try once again or check login settings."));
37 } else if(status==0) {
38 tip.show(qsTr("Unable to connect. Check internet connection."));
40 tip.show(qsTr("Unknown error: ")+status);
48 contentHeight: content.height+Const.TOP_BAR_HEIGHT+Const.SYSTEM_BAR_HEIGHT+Const.TEXT_MARGIN
49 y: Const.TOP_BAR_HEIGHT
53 spacing: Const.DEFAULT_MARGIN
59 text: qsTr("Ubuntu One sign in:")
66 placeholderText: qsTr("User ID")
73 placeholderText: qsTr("Password")
74 echoMode: TextInput.Password
81 onButtonClicked: root.getToken()
89 menuHeight: menuFixed.height+4*Const.DEFAULT_MARGIN
93 y: root.height-taskMenu.menuHeight-Const.SYSTEM_BAR_HEIGHT+1*Const.DEFAULT_MARGIN