This commit is contained in:
LubuWest 2018-11-09 22:06:13 +01:00
commit aca94a5393
98 changed files with 1061 additions and 152 deletions

View file

@ -1,5 +1,5 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
// Copyright (C) 2017 Marco R. <thomasschmidt45@gmx.net>
//
// This program is free software: you can redistribute it and/or modify
@ -123,6 +123,11 @@ StackView{
visible: false
x: 4*mm; y: 70*mm; width:20*mm;wrapMode: Text.Wrap
}
// Text {
// text: qsTr("Show Website")
// x: 4*mm; y: 70*mm; width: 20*mm
// }
Image{
id:servericon
@ -176,12 +181,15 @@ StackView{
Rectangle{
color: "light grey"
x: 25*mm; y: 20*mm; width: root.width/2; height: 5*mm;
x: 25*mm; y: 20*mm; width: root.width/2-9*mm; height: 5*mm;
TextInput {
id: username
anchors.fill: parent
selectByMouse: true
//onEditingFinished:{
onEditingFinished:{
if (username.text.indexOf('@')>-1){
Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),configBackground)
}
// Helperjs.friendicaWebRequest(servername.text+'/api/users/show?screen_name='+username.text,configBackground,function(obj){
// var screennametest=JSON.parse(obj);
// if (screennametest.hasOwnProperty('status')){
@ -190,8 +198,16 @@ StackView{
// }else{configBackground.registeredUser=true}
// });
// }
}
}
}
}
BlueButton {
x: root.width/2+18*mm; y: 20*mm; width:7*mm
text: "\uf234"
onClicked: {
configStack.push({item:"qrc:/qml/configqml/RegisterPage.qml",properties:{url:servername.text+"/register?nickname="+username.getText(0,username.length)}})
}
}
Rectangle{
color: "light grey"
@ -284,6 +300,23 @@ StackView{
}
// CheckBox{
// id:showwebsiteCheckbox
// x:35*mm;y:70*mm
// onClicked:{
// if (checked==true){
// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
// root.globaloptions.showWebsiteForLinks="true"
// }
// else {
// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
// root.globaloptions.showWebsiteForLinks="false"
// }
// }
// }
BlueButton {
x: 25*mm; y: 78*mm
text: qsTr("Confirm")
@ -328,6 +361,8 @@ StackView{
else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
}}
BlueButton {
x: root.width/2+2*mm; y: mm; width: 5*mm; height: 5*mm;
text: "-"
@ -413,8 +448,18 @@ StackView{
messageIntervalSlider.value=obj.timerInterval;
if( obj.isActive==0){userButton.fontColor='black'} else {userButton.fontColor='grey'}},"isActive",0
)
})
//Service.readGlobaloptions(db,function(go){
// if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true}
//})
}
catch (e){
Helperjs.friendicaWebRequest("https://dir.friendica.social/servers/surprise",configBackground,function(html){
var bpos=html.indexOf("baseurl");
var baseurl=html.substring(html.indexOf("http",bpos),html.indexOf('"',html.indexOf("http",bpos)));
servername.text=baseurl
})}
catch (e){print(e)}
}
}
}