1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
3 import "UIConstants.js" as Const
5 import "bytesconv.js" as Conv
11 property variant secrets
13 Component.onCompleted: init()
19 secret: Utils.tokenSecret(),
20 consumer_key : Utils.customerKey(),
21 consumer_secret: Utils.customerSecret()
24 U1.getAccount(secrets,root);
27 function onResp(secrets,account)
29 //console.log("onResp");
32 //uid.text = account.id;
33 username.text = account.username;
34 //nick.text = account.nickname;
35 email.text = account.email;
36 storage.text = Conv.bytesToSize(account.total_storage);
39 function onErr(status)
41 //console.log("onErr");
44 tip.show(qsTr("Authorization failed!"));
45 } else if(status==0) {
46 tip.show(qsTr("Unable to connect!"));
48 tip.show(qsTr("Error: ")+status);
56 contentHeight: content.height+Const.SYSTEM_BAR_HEIGHT+Const.TEXT_MARGIN
57 y: Const.SYSTEM_BAR_HEIGHT+Const.TEXT_MARGIN
61 spacing: Const.DEFAULT_MARGIN
74 width: root.width - 6*Const.DEFAULT_MARGIN
79 text: qsTr("User name:")
86 width: root.width - 6*Const.DEFAULT_MARGIN
89 width: root.width-2*Const.TEXT_MARGIN
94 text: qsTr("Nickname:")
101 width: root.width - 6*Const.DEFAULT_MARGIN
113 width: root.width - 6*Const.DEFAULT_MARGIN
116 width: root.width-2*Const.TEXT_MARGIN
121 text: qsTr("Total storage:")
128 width: root.width - 6*Const.DEFAULT_MARGIN