diff options
Diffstat (limited to 'components/mail/contents/ui')
-rw-r--r-- | components/mail/contents/ui/main.qml | 196 |
1 files changed, 116 insertions, 80 deletions
diff --git a/components/mail/contents/ui/main.qml b/components/mail/contents/ui/main.qml index 72987d74..589faf30 100644 --- a/components/mail/contents/ui/main.qml +++ b/components/mail/contents/ui/main.qml | |||
@@ -65,10 +65,8 @@ ApplicationWindow { | |||
65 | context: folderListContext | 65 | context: folderListContext |
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | Item { | |
69 | ToolBar { | ||
70 | id: toolbar | 69 | id: toolbar |
71 | |||
72 | anchors { | 70 | anchors { |
73 | top: app.top | 71 | top: app.top |
74 | left: app.left | 72 | left: app.left |
@@ -77,112 +75,150 @@ ApplicationWindow { | |||
77 | height: Kirigami.Units.iconSizes.medium | 75 | height: Kirigami.Units.iconSizes.medium |
78 | width: app.width | 76 | width: app.width |
79 | 77 | ||
78 | Rectangle { | ||
79 | anchors.bottom: parent.bottom | ||
80 | width: parent.width | ||
81 | height: 1 | ||
82 | color: "grey" | ||
83 | } | ||
80 | 84 | ||
81 | Row { | 85 | Row { |
82 | anchors { | 86 | anchors.fill: parent |
83 | left: parent.left | ||
84 | top: parent.top | ||
85 | bottom: parent.bottom | ||
86 | } | ||
87 | 87 | ||
88 | Component { | 88 | spacing: 1 //to account for the SplitView borders |
89 | id: composerComponent | ||
90 | KubeComponents.FocusComposer { | ||
91 | id: composer | ||
92 | anchors.fill: parent | ||
93 | } | ||
94 | } | ||
95 | 89 | ||
96 | ToolButton { | 90 | RowLayout { |
97 | height: parent.height | 91 | height: parent.height |
98 | iconName: "view-refresh" | 92 | width: folderListView.width |
99 | text: "Sync" | 93 | clip: true |
100 | enabled: syncAction.ready | 94 | |
101 | onClicked: { | 95 | ToolButton { |
102 | syncAction.execute() | 96 | Layout.fillHeight: true |
97 | text: "Account/Project/Activity Switch" | ||
98 | |||
99 | onClicked: { | ||
100 | //TODO | ||
101 | } | ||
103 | } | 102 | } |
104 | } | ||
105 | 103 | ||
106 | ToolButton { | 104 | ToolButton { |
107 | height: parent.height | 105 | Layout.fillHeight: true |
108 | iconName: "mail-mark-unread" | 106 | iconName: "view-refresh" |
109 | text: "Mark As Read" | 107 | text: "Sync" |
110 | enabled: markAsReadAction.ready | 108 | enabled: syncAction.ready |
111 | onClicked: { | 109 | |
112 | markAsReadAction.execute() | 110 | onClicked: { |
111 | syncAction.execute() | ||
112 | } | ||
113 | } | 113 | } |
114 | } | 114 | } |
115 | 115 | ||
116 | ToolButton { | 116 | RowLayout { |
117 | height: parent.height | 117 | height: parent.height |
118 | iconName: "mail-mark-important" | 118 | width: mailListView.width |
119 | text: "Mark Important" | 119 | clip: true |
120 | enabled: false | 120 | |
121 | onClicked: { | 121 | ToolButton { |
122 | Layout.fillHeight: true | ||
123 | iconName: "mail-mark-unread" | ||
124 | text: "Mark As Read" | ||
125 | enabled: markAsReadAction.ready | ||
126 | onClicked: { | ||
127 | markAsReadAction.execute() | ||
128 | } | ||
122 | } | 129 | } |
123 | } | ||
124 | 130 | ||
125 | ToolButton { | 131 | ToolButton { |
126 | height: parent.height | 132 | Layout.fillHeight: true |
127 | iconName: "edit-delete" | 133 | iconName: "mail-mark-important" |
128 | text: "Delete Mail" | 134 | text: "Mark Important" |
129 | enabled: deleteAction.ready | 135 | enabled: false |
130 | onClicked: { | 136 | onClicked: { |
131 | deleteAction.execute() | 137 | } |
132 | } | 138 | } |
133 | } | ||
134 | 139 | ||
135 | ToolButton { | 140 | ToolButton { |
136 | height: parent.height | 141 | Layout.fillHeight: true |
137 | iconName: "mail-message-new" | 142 | iconName: "edit-delete" |
138 | text: "Compose" | 143 | text: "Delete Mail" |
139 | onClicked: { | 144 | enabled: deleteAction.ready |
140 | composerComponent.createObject(app) | 145 | onClicked: { |
146 | deleteAction.execute() | ||
147 | } | ||
141 | } | 148 | } |
142 | } | ||
143 | 149 | ||
144 | ToolButton { | 150 | Item { |
145 | height: parent.height | 151 | Layout.fillWidth: true |
146 | iconName: "mail-message-reply" | ||
147 | text: "Reply" | ||
148 | onClicked: { | ||
149 | composerComponent.createObject(app) | ||
150 | composer.originalMessage = mailListView.currentMail | ||
151 | } | 152 | } |
152 | } | 153 | } |
153 | } | ||
154 | 154 | ||
155 | RowLayout { | ||
156 | anchors { | ||
157 | right: parent.right | ||
158 | verticalCenter: parent.verticalCenter | ||
159 | } | ||
160 | 155 | ||
161 | width: Kirigami.Units.gridUnit * 40 | 156 | RowLayout{ |
162 | height: Kirigami.Units.iconSizes.medium | 157 | height: parent.height |
158 | width: mailView.width | ||
159 | clip: true | ||
163 | 160 | ||
164 | TextField { | 161 | Component { |
162 | id: composerComponent | ||
165 | 163 | ||
166 | Layout.fillWidth: true | 164 | KubeComponents.FocusComposer { |
165 | id: composer | ||
166 | anchors.fill: parent | ||
167 | } | ||
168 | } | ||
167 | 169 | ||
168 | placeholderText: "Search..." | 170 | ToolButton { |
169 | } | 171 | id: newMailButton |
170 | 172 | ||
171 | ToolButton { | 173 | Layout.fillHeight: true |
172 | 174 | ||
173 | height: Kirigami.Units.iconSizes.medium | 175 | iconName: "mail-message-new" |
176 | text: "Compose" | ||
177 | onClicked: { | ||
178 | composerComponent.createObject(app) | ||
179 | } | ||
180 | } | ||
174 | 181 | ||
175 | iconName: "application-menu" | 182 | ToolButton { |
176 | text: "Settings" | 183 | Layout.fillHeight: true |
184 | iconName: "mail-message-reply" | ||
185 | text: "Reply" | ||
186 | onClicked: { | ||
187 | composerComponent.createObject(app) | ||
188 | composer.originalMessage = mailListView.currentMail | ||
189 | } | ||
190 | } | ||
177 | 191 | ||
178 | onClicked: { | 192 | Item { |
179 | settingsComponent.createObject(app) | 193 | Layout.fillWidth: true |
180 | } | 194 | } |
181 | Component { | 195 | |
182 | id: settingsComponent | 196 | TextField { |
183 | KubeComponents.Settings { | 197 | id: searchBar |
184 | id: settings | 198 | |
185 | anchors.fill: parent | 199 | Layout.minimumWidth: Kirigami.Units.gridUnit * 25 |
200 | |||
201 | placeholderText: "Search..." | ||
202 | } | ||
203 | |||
204 | ToolButton { | ||
205 | id: settingsButton | ||
206 | |||
207 | Layout.fillHeight: true | ||
208 | |||
209 | iconName: "application-menu" | ||
210 | text: "Settings" | ||
211 | |||
212 | onClicked: { | ||
213 | settingsComponent.createObject(app) | ||
214 | } | ||
215 | |||
216 | Component { | ||
217 | id: settingsComponent | ||
218 | KubeComponents.Settings { | ||
219 | id: settings | ||
220 | anchors.fill: parent | ||
221 | } | ||
186 | } | 222 | } |
187 | } | 223 | } |
188 | } | 224 | } |