Small changes

This commit is contained in:
Scharel 2018-12-22 08:03:15 +01:00
parent 99a184697b
commit 41f530c0f6
3 changed files with 16 additions and 6 deletions

View file

@ -15,6 +15,15 @@ DelegateModel {
console.log("API model changed!")
reload()
}
onNoteCreated: {
console.log("New note created:" + id)
}
onNoteRemoved: {
console.log("Note removed:" + id)
}
onNoteChanged: {
console.log("Note changed:" + id)
}
}
function reload() {

View file

@ -18,7 +18,8 @@ Item {
property var categories: [ ]
property string file: StandardPaths.data + "/" + uuid + ".json"
property bool saveFile: false
property bool busy: false
property bool busy: jobsRunning > 0
property int jobsRunning: 0
property int status: 204
property string statusText: "No Content"
@ -73,7 +74,7 @@ Item {
}
function apiCall(method, data) {
busy = true
jobsRunning++
var endpoint = url
if (data) {
@ -156,7 +157,7 @@ Item {
else {
//console.log("Network error: " + apiReq.statusText + " (" + apiReq.status + ")")
}
busy = false
jobsRunning--
}
}
if (method === "GET") {

View file

@ -262,17 +262,17 @@
<context>
<name>NotesApi</name>
<message>
<location filename="../qml/components/NotesApi.qml" line="144"/>
<location filename="../qml/components/NotesApi.qml" line="145"/>
<source>Unable to connect</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/components/NotesApi.qml" line="280"/>
<location filename="../qml/components/NotesApi.qml" line="281"/>
<source>Today</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/components/NotesApi.qml" line="282"/>
<location filename="../qml/components/NotesApi.qml" line="283"/>
<source>Yesterday</source>
<translation type="unfinished"></translation>
</message>