Debian Codegraph @

src/app/qml/components/LocationsListPageEmptyStateComponent.qml

raw
1 /*
2 * Copyright (C) 2015 Canonical Ltd.
3 *
4 * This file is part of Lomiri Weather App
5 *
6 * Lomiri Weather App is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 3 as
8 * published by the Free Software Foundation.
9 *
10 * Lomiri Weather App is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 import QtQuick 2.12
20 import Lomiri.Components 1.3
21 import "../components"
22
23
24 Item {
25 anchors {
26 fill: parent
27 margins: units.gu(2)
28 }
29
30 Label {
31 id: emptyStateLabel
32 anchors {
33 centerIn: parent
34 }
35 horizontalAlignment: Text.AlignHCenter
36 text: networkError ? i18n.tr("No network connection.\nUnable to add new locations.\nPlease check your network settings and try again.") : i18n.tr("No locations found. Tap the plus icon to search for one.")
37 width: parent.width - units.gu(4)
38 wrapMode: Text.WordWrap
39 }
40 }