updatenews error bugfix
This commit is contained in:
parent
d43c18bb76
commit
59fe1ea0df
16 changed files with 117 additions and 105 deletions
|
@ -43,11 +43,9 @@ Dialog {
|
|||
standardButtons: Dialog.Yes | Dialog.No
|
||||
modal: true
|
||||
onAccepted: {
|
||||
// username.visible=true;
|
||||
// password.visible=true;
|
||||
username.visible=true;
|
||||
ruleButton.visible=false;
|
||||
// confirmation.visible=true
|
||||
accountPage.state="oauth"
|
||||
confirmationOAuth.visible=true
|
||||
}
|
||||
onRejected: {close()}
|
||||
ScrollView{
|
||||
|
|
|
@ -67,10 +67,13 @@ Page{
|
|||
else{
|
||||
if (users.length==0){Service.setDefaultOptions(db);}
|
||||
if (userconfig.APIVersion!=""){userconfig.password=""}
|
||||
if (imagestoredir==""){imagestoredir=filesystem.homePath+"/"+credentials.username+"/";
|
||||
userconfig.imagestore=imagestoredir}
|
||||
if(userconfig.imagestore == filesystem.homePath+"/"+username.text+"/")
|
||||
{filesystem.makePath(filesystem.homePath+"/"+username.text);}
|
||||
if (imagestoredir==""){
|
||||
imagestoredir=filesystem.homePath+"/"+credentials.username+"/";
|
||||
userconfig.imagestore=imagestoredir
|
||||
}
|
||||
if(userconfig.imagestore == filesystem.homePath+"/"+credentials.username+"/")
|
||||
{filesystem.makePath(filesystem.homePath+"/"+credentials.username);}
|
||||
print("imagestoredir "+imagestoredir)
|
||||
filesystem.Directory=imagestoredir;
|
||||
filesystem.makeDir("contacts");
|
||||
filesystem.makeDir("albums");
|
||||
|
@ -373,7 +376,7 @@ Page{
|
|||
rulestext=rulestext+rulesarray[rule].text+"\n"
|
||||
}
|
||||
var component = Qt.createComponent("qrc:/qml/configqml/AcceptRules.qml");
|
||||
var rulesdialog = component.createObject(root,{"rules": rulestext});
|
||||
var rulesdialog = component.createObject(accountPage,{"rules": rulestext});
|
||||
rulesdialog.open();
|
||||
}
|
||||
else if(api=="/api/statusnet/config"){
|
||||
|
@ -385,7 +388,7 @@ Page{
|
|||
catch(e){print(e)}
|
||||
}
|
||||
|
||||
else if (api=="/api/v1/apps"){
|
||||
else if (api=="/api/v1/apps"){print("/api/v1/apps text "+text)
|
||||
let app=JSON.parse(text);
|
||||
accountPage.appdata=app;
|
||||
oauth2.setClientId(app.client_id);
|
||||
|
@ -537,23 +540,23 @@ Page{
|
|||
states: [
|
||||
State {
|
||||
name: "new_oauth"
|
||||
PropertyChanges { target: username; visible: false }
|
||||
PropertyChanges { target: password; visible: false}
|
||||
PropertyChanges { target: ruleButton; visible: true}
|
||||
PropertyChanges {target: username; visible: false }
|
||||
PropertyChanges {target: password; visible: false}
|
||||
PropertyChanges {target: ruleButton; visible: true}
|
||||
},
|
||||
State {
|
||||
name:"oauth"
|
||||
PropertyChanges {target: username; visible: true}
|
||||
PropertyChanges { target: password; visible: false}
|
||||
PropertyChanges {target: password; visible: false}
|
||||
PropertyChanges {target: confirmationOAuth; visible: true}
|
||||
PropertyChanges {target: setDefault; visible: true}
|
||||
PropertyChanges { target: confirmation; visible: false}
|
||||
PropertyChanges {target: confirmation; visible: false}
|
||||
},
|
||||
State{
|
||||
name:"password"
|
||||
PropertyChanges { target: username; visible: true }
|
||||
PropertyChanges { target: password; visible: true}
|
||||
PropertyChanges { target: confirmation; visible: true}
|
||||
PropertyChanges {target: username; visible: true }
|
||||
PropertyChanges {target: password; visible: true}
|
||||
PropertyChanges {target: confirmation; visible: true}
|
||||
PropertyChanges {target: confirmationOAuth; visible: false}
|
||||
}
|
||||
]
|
||||
|
@ -565,18 +568,24 @@ Page{
|
|||
})
|
||||
accountPage.users=storedUsers;
|
||||
Service.readConfig(db,function(obj){
|
||||
userButton.text=obj.username;
|
||||
servername.text=obj.server;
|
||||
serverModel.insert(0,{text:obj.server})
|
||||
accountPage.setServericon(obj.server);
|
||||
username.text= obj.username;
|
||||
password.text=Qt.atob(obj.password);
|
||||
imagestore.text=obj.imagestore;
|
||||
imagestoredir=obj.imagestore;
|
||||
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
|
||||
if(obj.password!=""){accountPage.state="password"}
|
||||
else if (obj.token!=""){accountPage.state="oauth"}
|
||||
else {accountPage.state="new_oauth"}
|
||||
if (obj==null){
|
||||
accountPage.state="new_oauth"
|
||||
}
|
||||
else{
|
||||
userButton.text=obj.username;
|
||||
servername.text=obj.server;
|
||||
serverModel.insert(0,{text:obj.server})
|
||||
accountPage.setServericon(obj.server);
|
||||
username.text= obj.username;
|
||||
password.text=Qt.atob(obj.password);
|
||||
imagestore.text=obj.imagestore;
|
||||
imagestoredir=obj.imagestore;
|
||||
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
|
||||
if(obj.password!=""){accountPage.state="password"}
|
||||
else if (obj.token!=""){accountPage.state="oauth"}
|
||||
else {accountPage.state="new_oauth"}
|
||||
}
|
||||
|
||||
},"isActive",0)
|
||||
})}
|
||||
catch (e){//print("onCompleted" +users.count +e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue