ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #05948
[Merge] lp:~vthompson/ubuntu-weather-app/msg-when-no-keys into lp:ubuntu-weather-app
Victor Thompson has proposed merging lp:~vthompson/ubuntu-weather-app/msg-when-no-keys into lp:ubuntu-weather-app.
Commit message:
* Create an error state when there are no keys found.
Requested reviews:
Ubuntu Weather Developers (ubuntu-weather-dev)
For more details, see:
https://code.launchpad.net/~vthompson/ubuntu-weather-app/msg-when-no-keys/+merge/277080
* Create an error state when there are no keys found.
--
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-weather-app/msg-when-no-keys into lp:ubuntu-weather-app.
=== added file 'app/components/NoAPIKeyErrorStateComponent.qml'
--- app/components/NoAPIKeyErrorStateComponent.qml 1970-01-01 00:00:00 +0000
+++ app/components/NoAPIKeyErrorStateComponent.qml 2015-11-10 02:03:34 +0000
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2015 Canonical Ltd
+ *
+ * This file is part of Ubuntu Weather App
+ *
+ * Ubuntu Weather App is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * Ubuntu Weather App is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 2.4
+import Ubuntu.Components 1.2
+import "../components"
+
+
+Rectangle {
+ color: "white"
+ anchors.fill: parent
+
+ SettingsButton {
+ anchors {
+ right: parent.right
+ top: parent.top
+ }
+ }
+
+ Column {
+ anchors {
+ centerIn: parent
+ }
+ spacing: units.gu(4)
+ width: parent.width - units.gu(4)
+
+ Label {
+ id: networkErrorStateLabel
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ }
+ fontSize: "x-large"
+ text: i18n.tr("No API Keys Found")
+ width: parent.width
+ wrapMode: Text.WordWrap
+ }
+
+ Label {
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ }
+ text: i18n.tr("If you are a developer, please see the README file for instructions on how to obtain your own Open Weather Map API key.")
+ width: parent.width
+ wrapMode: Text.WordWrap
+ }
+ }
+}
=== modified file 'app/ui/HomePage.qml'
--- app/ui/HomePage.qml 2015-09-05 00:03:33 +0000
+++ app/ui/HomePage.qml 2015-11-10 02:03:34 +0000
@@ -166,7 +166,7 @@
}
Loader {
- active: networkError && mainPageStack.depth === 1
+ active: networkError && mainPageStack.depth === 1 && (Keys.twcKey || Keys.owmKey)
anchors {
fill: parent
}
@@ -174,4 +174,14 @@
source: "../components/NetworkErrorStateComponent.qml"
visible: status === Loader.Ready && active
}
+
+ Loader {
+ active: mainPageStack.depth === 1 && !Keys.twcKey && !Keys.owmKey
+ anchors {
+ fill: parent
+ }
+ asynchronous: true
+ source: "../components/NoAPIKeyErrorStateComponent.qml"
+ visible: status === Loader.Ready && active
+ }
}
=== modified file 'debian/changelog'
--- debian/changelog 2015-10-25 20:14:14 +0000
+++ debian/changelog 2015-11-10 02:03:34 +0000
@@ -6,6 +6,12 @@
[ Bartosz Kosiorek ]
* Change message text according to Ubuntu UX comment (LP: #1493466)
+ [ Alan Pope ]
+ * Describe how to get a key in the README. Mention this in the keys.js.
+
+ [ Victor Thompson ]
+ * Create an error state when there are no keys found.
+
-- Andrew Hayzen <ahayzen@xxxxxxxxx> Sat, 24 Oct 2015 20:22:31 +0100
ubuntu-weather-app (3.0ubuntu1) vivid; urgency=medium
=== modified file 'po/com.ubuntu.weather.pot'
--- po/com.ubuntu.weather.pot 2015-10-25 20:12:50 +0000
+++ po/com.ubuntu.weather.pot 2015-11-10 02:03:34 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: ubuntu-weather-app\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-10-25 21:12+0100\n"
+"POT-Creation-Date: 2015-11-09 19:59-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -94,6 +94,16 @@
msgid "Retry"
msgstr ""
+#: ../app/components/NoAPIKeyErrorStateComponent.qml:48
+msgid "No API Keys Found"
+msgstr ""
+
+#: ../app/components/NoAPIKeyErrorStateComponent.qml:57
+msgid ""
+"If you are a developer, please see the README file for instructions on how "
+"to obtain your own Open Weather Map API key."
+msgstr ""
+
#: ../app/ui/AddLocationPage.qml:29
msgid "Select a city"
msgstr ""
Follow ups