aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/mail/MailModule.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/mail/MailModule.qml')
-rw-r--r--desktop/modules/mail/MailModule.qml40
1 files changed, 40 insertions, 0 deletions
diff --git a/desktop/modules/mail/MailModule.qml b/desktop/modules/mail/MailModule.qml
new file mode 100644
index 0000000..99ddaff
--- /dev/null
+++ b/desktop/modules/mail/MailModule.qml
@@ -0,0 +1,40 @@
+// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program 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.
+
+import QtQuick
+import "../.."
+
+// Always active: the unread count outlives the drawer, and Accounts watches
+// qtmaildir.conf so a new account appears without a restart.
+Module {
+ id: mod
+
+ name: "mail"
+ icon: ""
+ label: "Mail"
+ alwaysActive: true
+
+ tileContent: Component { MailTile {} }
+
+ page: Component {
+ Page {
+ id: mailPage
+ title: "Mail"
+ // Mail has almost certainly arrived since this was last opened,
+ // and for an autostarted shell that is the whole session.
+ Component.onCompleted: Accounts.refresh()
+ MailPage {
+ width: parent.width
+ onClose: mailPage.back()
+ }
+ }
+ }
+}