harbour-nextcloudnotes/qml/harbour-nextcloudnotes.qml

42 lines
1.1 KiB
QML
Raw Normal View History

2018-10-16 18:50:58 +03:00
import QtQuick 2.0
import Sailfish.Silica 1.0
import Nemo.Configuration 1.0
import "pages"
ApplicationWindow
{
id: appWindow
ConfigurationGroup {
id: appSettings
path: "/apps/harbour-nextcloudnotes/settings"
2018-10-16 18:50:58 +03:00
property string lastUpdate: qsTr("never")
2018-10-21 02:44:23 +03:00
property url server: ""
property string username: ""
property string password: ""
property bool unsecureConnection: false
// For testing
Component.onCompleted: {
//server = ""
//username = ""
//password = ""
console.log("Server: " + server)
console.log("Username: " + username)
console.log("Password: " + password)
}
2018-10-16 18:50:58 +03:00
}
property var notes: NotesApi {
2018-10-16 18:50:58 +03:00
name: "notes"
saveFile: false
}
Connections {
target: notes
onLastUpdateChanged: appSettings.lastUpdate = notes.lastUpdate
2018-10-16 18:50:58 +03:00
}
2018-10-21 02:44:23 +03:00
initialPage: Component { NotesPage { } }
2018-10-16 18:50:58 +03:00
cover: Qt.resolvedUrl("cover/CoverPage.qml")
allowedOrientations: defaultAllowedOrientations
}