Placeholder on Cover

This commit is contained in:
Scharel Clemens 2018-10-27 19:19:35 +02:00
parent e05d583959
commit e03d822b94
4 changed files with 17 additions and 14 deletions

View file

@ -2,21 +2,25 @@ import QtQuick 2.0
import Sailfish.Silica 1.0 import Sailfish.Silica 1.0
CoverBackground { CoverBackground {
Label {
id: label CoverPlaceholder {
anchors.centerIn: parent icon.source: "../img/nextcloud-logo-transparent.png"
text: qsTr("My Cover") text: qsTr("Notes")
} }
CoverActionList { CoverActionList {
id: coverAction id: coverAction
CoverAction { CoverAction {
iconSource: "image://theme/icon-cover-next" iconSource: "image://theme/icon-cover-new"
onTriggered: {
console.log("Add note")
appWindow.activate()
}
} }
CoverAction { /*CoverAction {
iconSource: "image://theme/icon-cover-pause" iconSource: "image://theme/icon-cover-next"
} }*/
} }
} }

View file

@ -14,7 +14,7 @@ ApplicationWindow
property int currentAccount: 0 // FIXME property int currentAccount: 0 // FIXME
// For testing // For testing
Component.onCompleted: { Component.onCompleted: {
appSettings.clear() //appSettings.clear()
//accounts[0] = { server: "127.0.0.1", username: "fu", password: "bar", lastUpdate: new Date(0) } //accounts[0] = { server: "127.0.0.1", username: "fu", password: "bar", lastUpdate: new Date(0) }
//accounts[1] = { server: "127.0.0.2", username: "fu", password: "bar", lastUpdate: new Date(0) } //accounts[1] = { server: "127.0.0.2", username: "fu", password: "bar", lastUpdate: new Date(0) }
//accounts[2] = { server: "127.0.0.3", username: "fu", password: "bar", lastUpdate: new Date(0) } //accounts[2] = { server: "127.0.0.3", username: "fu", password: "bar", lastUpdate: new Date(0) }
@ -40,10 +40,6 @@ ApplicationWindow
//account: appSettings.accounts[appSettings.currentAccount] //account: appSettings.accounts[appSettings.currentAccount]
saveFile: false saveFile: false
} }
Connections {
target: notes
//onLastUpdateChanged: appSettings.lastUpdate = notes.lastUpdate
}
initialPage: Component { NotesPage { } } initialPage: Component { NotesPage { } }
cover: Qt.resolvedUrl("cover/CoverPage.qml") cover: Qt.resolvedUrl("cover/CoverPage.qml")

View file

@ -51,6 +51,9 @@ Item {
} }
busy = false busy = false
} }
else {
console.log("HTTP ready state: " + apiReq.readyState)
}
} }
if (method === "GET") { if (method === "GET") {
apiReq.send() apiReq.send()

View file

@ -19,7 +19,7 @@
<context> <context>
<name>CoverPage</name> <name>CoverPage</name>
<message> <message>
<source>My Cover</source> <source>Notes</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>