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
CoverBackground {
Label {
id: label
anchors.centerIn: parent
text: qsTr("My Cover")
CoverPlaceholder {
icon.source: "../img/nextcloud-logo-transparent.png"
text: qsTr("Notes")
}
CoverActionList {
id: coverAction
CoverAction {
iconSource: "image://theme/icon-cover-next"
iconSource: "image://theme/icon-cover-new"
onTriggered: {
console.log("Add note")
appWindow.activate()
}
}
CoverAction {
iconSource: "image://theme/icon-cover-pause"
}
/*CoverAction {
iconSource: "image://theme/icon-cover-next"
}*/
}
}

View file

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

View file

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

View file

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