aboutsummaryrefslogtreecommitdiffstats
path: root/mail-overview/shell.qml
blob: 7842bc610c9bb5f6b59fcf260e70e1c3a1cd679b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// 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 Quickshell
import Quickshell.Io
import QtQuick

ShellRoot {
    MailPanel { id: panel }

    IpcHandler {
        target: "mail"
        function toggle() { panel.toggle(); }
        function show() { panel.show(); }
        function close() { panel.close(); }
    }

    // TEMPORARY probe for Task 3 verification. Removed in Step 5.
    Component.onCompleted: Qt.callLater(() => {
        console.log("ACCOUNTS", JSON.stringify(Accounts.accounts.map(a => a.key + ":" + a.label)));
    })
    Connections {
        target: Accounts
        function onLoadingChanged() {
            if (!Accounts.loading)
                console.log("COUNTS", JSON.stringify(Accounts.accounts.map(a => a.label + "=" + a.count)),
                            "total", Accounts.total);
        }
    }
}