~mardy/webbrowser-app/multi-account-no-ui

« back to all changes in this revision

Viewing changes to src/app/webcontainer/AccountsPage.qml

  • Committer: Alberto Mardegan
  • Date: 2015-04-16 11:05:59 UTC
  • Revision ID: alberto.mardegan@canonical.com-20150416110559-jpvepcmacgdlmjf4
UI changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    property var __account: null
44
44
    property var __loggedOutAccounts: []
45
45
    property var __accountsModel: accountsModel
 
46
    property bool __loggingIn: false
46
47
 
47
48
    visible: true
48
49
    anchors.fill: parent
61
62
            }
62
63
        }
63
64
        onDone: {
 
65
            __loggingIn = false
64
66
            if (successful && __account) {
65
67
                root.credentialsId = root.__account.authData.credentialsId
66
68
            }
73
75
 
74
76
        visible: false
75
77
 
76
 
        onManualLoginClicked: root.login()
 
78
        onAccountLoginClicked: {
 
79
            root.login()
 
80
        }
 
81
 
 
82
        onManualLoginClicked: {
 
83
            root.credentialsId = root.__account.authData.credentialsId
 
84
            visible = false
 
85
        }
 
86
    }
 
87
 
 
88
    LoggingInSheet {
 
89
        visible: root.__loggingIn
77
90
    }
78
91
 
79
92
    Component {
171
184
 
172
185
    function login() {
173
186
        console.log("Logging in to " + __account)
 
187
        __loggingIn = true
174
188
        var forceCookieRefresh = false
175
189
        var index = __loggedOutAccounts.indexOf(__account.accountId)
176
190
        if (index >= 0) {