~danielholm/account-plugin-owncloud/account-plugin-owncloud

« back to all changes in this revision

Viewing changes to qml/owncloud/NewAccount.qml

  • Committer: DanielHolm
  • Date: 2014-11-11 17:46:52 UTC
  • Revision ID: d.holmen@gmail.com-20141111174652-xc9mjp9tda12my97
Added url storage

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
            onClicked: {
97
97
                account.updateDisplayName(usernameField.text)
98
98
 
99
 
                // check the url
100
 
                checkURL(urlField.text)
101
99
                creds.userName = usernameField.text
102
100
                creds.secret = passwordField.text
103
101
                creds.sync()
104
 
 
105
 
                // credentialsStored() //shouldn't this be here?
106
102
            }
107
103
        }
108
104
    }
127
123
 
128
124
        globalAccountSettings.updateServiceEnabled(true)
129
125
        globalAccountSettings.credentials = creds
 
126
        globalAccountSettings.updateSettings({
 
127
            "host": checkURL(urlField.text)
 
128
        })
130
129
        account.synced.connect(finished)
131
130
        account.sync()
132
131
    }
134
133
    function checkURL(url) {
135
134
        // if the URL doesn't contain HTTP(S) then add it!
136
135
        if (url.indexOf('http') >= 0) {
137
 
            //creds.urlOC = 'http://'+urlField.text
 
136
            return 'http://'+urlField.text
138
137
        }
139
138
        else {
140
 
             //creds.urlOC = urlField.text
 
139
             return urlField.text
141
140
        }
142
141
    }
143
142