Dekko
Loading...
Searching...
No Matches
AddAnotherUI.qml
1/* Copyright (C) 2016 - 2017 Dan Chapman <dpniel@ubuntu.com>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program 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*/
18import QtQuick 2.4
19import QtQuick.Controls.Suru 2.2
20import QtGraphicalEffects 1.0
21import Lomiri.Components 1.3
22import Dekko.Components 1.0
23import Dekko.Mail.API 1.0
24import Dekko.Mail.Stores.Accounts 1.0
25import Dekko.Lomiri.Components 1.0
26import Dekko.Lomiri.Constants 1.0
28DekkoPage {
29 id: noAccounts
30 objectName: "addAnotherUI"
31 pageHeader.title: qsTr("Success")
32
34
35 ScrollView {
36 anchors.fill: parent
37
38 Flickable {
39 anchors.fill: parent
40 contentHeight: ibxContainer.height + b.height + b2.height + l.height + units.gu(7)
41 clip: true
42
43 Item {
44 id:ibxContainer
45 width: parent.width
46 height: inbox.height + units.gu(5)
47
48
49 InnerShadow {
50 anchors.fill: inbox
51 radius: 8.0
52 samples: 16
53 horizontalOffset: -3
54 verticalOffset: 3
55 color: LomiriColors.ash
56 source: inbox
57 }
58
60 id: inbox
61 name: Icons.TickIcon
62 height: units.gu(15)
63 width: height
64 anchors {
65 bottom: parent.bottom
66 horizontalCenter: parent.horizontalCenter
67 }
68 color: Suru.neutralColor
69 visible: false
70 }
71 }
72
73 Item {
74 id: l
75 anchors {
76 left: parent.left
77 right:parent.right
78 top: ibxContainer.bottom
79 topMargin:Style.defaultSpacing
80 }
81 height: t.height
82
83 Label {
84 id: t
85 anchors {
86 top: parent.top
87 horizontalCenter: parent.horizontalCenter
88 }
89 width: parent.width - units.gu(4)
90 text: qsTr("New account created.")
91 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
92 fontSize: "large"
93 horizontalAlignment: Text.AlignHCenter
94 }
95 }
96
97 Button {
98 id: b
99 text: qsTr("Continue")
100 Suru.highlightType: Suru.PositiveHighlight
101 color: Suru.highlightColor
102 anchors {
103 top: l.bottom
104 topMargin: units.gu(3)
105 horizontalCenter: parent.horizontalCenter
106 }
107 width: units.gu(20)
108 onClicked: {
109 WizardActions.endSetup()
110 window.close()
111 }
112 }
113 Button {
114 id: b2
115 text: qsTr("Add another")
116 strokeColor: LomiriColors.ash
117 width: units.gu(20)
118 anchors {
119 top: b.bottom
120 topMargin: Style.defaultSpacing
121 horizontalCenter: parent.horizontalCenter
122 }
123 onClicked: WizardActions.addAnotherAccount()
124 }
125 }
126 }
127 }
128}