diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2015-04-25 08:38:43 +0200 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2015-04-25 08:38:43 +0200 |
| commit | 55a97fbc8cfd51dafeda9849b00a49fa813c8b4d (patch) | |
| tree | da0ad4e9774c9c8b7c846e715aaf3ab601fe283a /app/qml/pages/AppStorePage.qml | |
| parent | 78f037bd6f6c15e71d7a3b6c096c51c8f4345641 (diff) | |
| parent | a3bbbfaf8b7c73ed4c57e7d535032e55963d501d (diff) | |
Merge pull request #56 from smurfy/store-improvements
Store improvements
Diffstat (limited to 'app/qml/pages/AppStorePage.qml')
| -rw-r--r-- | app/qml/pages/AppStorePage.qml | 61 |
1 files changed, 56 insertions, 5 deletions
diff --git a/app/qml/pages/AppStorePage.qml b/app/qml/pages/AppStorePage.qml index 680ac50..82a8542 100644 --- a/app/qml/pages/AppStorePage.qml +++ b/app/qml/pages/AppStorePage.qml @@ -7,6 +7,8 @@ import org.nemomobile.configuration 1.0 Page { id: page + property bool showSearch; + ConfigurationGroup { id: settings path: "/org/pebbled/settings" @@ -24,7 +26,16 @@ Page { MenuItem { text: qsTr("Logout") onClicked: { - webview.logout(); + remorse.execute(qsTr("Logging out..."), function() { + webview.logout(); + }); + } + } + + MenuItem { + text: showSearch ? qsTr("Hide search") : qsTr("Show search"); + onClicked: { + showSearch = !showSearch; } } } @@ -32,33 +43,65 @@ Page { Column { id: column width: page.width - spacing: Theme.paddingLarge PageHeader { + id: pageHeadTitle title: qsTr("Pebble Appstore") } + SearchField { + width: parent.width + visible: webview.loggedin && showSearch + id: searchField + onTextChanged: { + var q = searchField.text.trim(); + if (q.length >= 2) { + webview.searchQuery(q); + } + } + } + Row { anchors.horizontalCenter: parent.horizontalCenter - visible: webview.loggedin; + visible: webview.loggedin + + IconButton { + id: backButton + enabled: webview.canGoBack + icon.source: "image://theme/icon-m-back" + onClicked: { + webview.goBack(); + } + } + Button { - text: qsTr("WatchApps") + text: qsTr("Apps") + width: (page.width - loadingIndicator.width - backButton.width - Theme.paddingMedium) / 2 onClicked: { webview.gotoWatchApps(); } } + Button { - text: qsTr("WatchFaces") + text: qsTr("Faces") + width: (page.width - loadingIndicator.width - backButton.width - Theme.paddingMedium) / 2 onClicked: { webview.gotoWatchFaces(); } } + + BusyIndicator { + id: loadingIndicator + running: webview.loading + size: BusyIndicatorSize.Medium + } } Column { id: download visible: webview.downloadInProgress width: parent.width + spacing: Theme.paddingLarge Label { anchors.horizontalCenter: parent.horizontalCenter @@ -74,6 +117,10 @@ Page { } } + RemorsePopup { + id: remorse + } + PebbleStoreView { id: webview visible: !webview.downloadInProgress @@ -93,6 +140,10 @@ Page { onDownloadPebbleApp: { downloadLabel.text = qsTr("Downloading %1...").arg(downloadTitle) } + + onTitleChanged: { + pageHeadTitle.title = title; + } } } |
