summaryrefslogtreecommitdiff
path: root/qml/tapasboard
diff options
context:
space:
mode:
Diffstat (limited to 'qml/tapasboard')
-rw-r--r--qml/tapasboard/BoardPage.qml20
-rw-r--r--qml/tapasboard/ForumPage.qml20
-rw-r--r--qml/tapasboard/TopicPage.qml20
3 files changed, 54 insertions, 6 deletions
diff --git a/qml/tapasboard/BoardPage.qml b/qml/tapasboard/BoardPage.qml
index dd1bd24..7efc6db 100644
--- a/qml/tapasboard/BoardPage.qml
+++ b/qml/tapasboard/BoardPage.qml
@@ -14,17 +14,26 @@ Page {
tools: ToolBarLayout {
ToolIcon {
- id: backToolIcon
platformIconId: "toolbar-back"
- anchors.left: parent.left
onClicked: pageStack.pop()
}
+ ToolIcon {
+ platformIconId: board.busy ? "toolbar-cancle" : "toolbar-refresh"
+ onClicked: {
+ if (board.busy) {
+ board.cancelAllActions();
+ } else {
+ boardModel.refresh();
+ }
+ }
+ }
}
ListView {
id: forumsView
anchors.fill: parent
model: BoardModel {
+ id: boardModel
board: boardPage.board
forumId: boardPage.forumId
}
@@ -87,4 +96,11 @@ Page {
ScrollDecorator {
flickableItem: forumsView
}
+
+ BusyIndicator {
+ anchors.centerIn: parent
+ platformStyle: BusyIndicatorStyle { size: "large" }
+ visible: forumsView.count == 0 && board.busy
+ running: visible
+ }
}
diff --git a/qml/tapasboard/ForumPage.qml b/qml/tapasboard/ForumPage.qml
index 18953cb..aed65a0 100644
--- a/qml/tapasboard/ForumPage.qml
+++ b/qml/tapasboard/ForumPage.qml
@@ -14,17 +14,26 @@ Page {
tools: ToolBarLayout {
ToolIcon {
- id: backToolIcon
platformIconId: "toolbar-back"
- anchors.left: parent.left
onClicked: pageStack.pop()
}
+ ToolIcon {
+ platformIconId: board.busy ? "toolbar-cancle" : "toolbar-refresh"
+ onClicked: {
+ if (board.busy) {
+ board.cancelAllActions();
+ } else {
+ forumModel.refresh();
+ }
+ }
+ }
}
ListView {
id: topicsView
anchors.fill: parent
model: ForumModel {
+ id: forumModel
board: forumPage.board
forumId: forumPage.forumId
}
@@ -66,4 +75,11 @@ Page {
ScrollDecorator {
flickableItem: topicsView
}
+
+ BusyIndicator {
+ anchors.centerIn: parent
+ platformStyle: BusyIndicatorStyle { size: "large" }
+ visible: topicsView.count == 0 && board.busy
+ running: visible
+ }
}
diff --git a/qml/tapasboard/TopicPage.qml b/qml/tapasboard/TopicPage.qml
index ba132b5..689dce7 100644
--- a/qml/tapasboard/TopicPage.qml
+++ b/qml/tapasboard/TopicPage.qml
@@ -14,17 +14,26 @@ Page {
tools: ToolBarLayout {
ToolIcon {
- id: backToolIcon
platformIconId: "toolbar-back"
- anchors.left: parent.left
onClicked: pageStack.pop()
}
+ ToolIcon {
+ platformIconId: board.busy ? "toolbar-cancle" : "toolbar-refresh"
+ onClicked: {
+ if (board.busy) {
+ board.cancelAllActions();
+ } else {
+ topicModel.refresh();
+ }
+ }
+ }
}
ListView {
id: postsView
anchors.fill: parent
model: TopicModel {
+ id: topicModel
board: topicPage.board
topicId: topicPage.topicId
}
@@ -103,4 +112,11 @@ Page {
ScrollDecorator {
flickableItem: postsView
}
+
+ BusyIndicator {
+ anchors.centerIn: parent
+ platformStyle: BusyIndicatorStyle { size: "large" }
+ visible: postsView.count == 0 && board.busy
+ running: visible
+ }
}