summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/scss/systray.scss
blob: e198424ebc09b072cbb9d9c49b588c534e7fb8c8 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// Systray icon and dropdown
.o_mail_systray_item {
    > a {
        > i {
            font-size: larger;
        }
    }
    &.o_no_notification > a {
        @include o-mail-systray-no-notification-style();

        .o_notification_counter {
            display: none;
        }
    }
    &.show .o_mail_systray_dropdown {
        display: flex;
        flex-flow: column nowrap;
    }
    .o_notification_counter {
        margin-top: -0.8rem;
        margin-right: 0;
        margin-left: -0.6rem;
        background: $o-enterprise-primary-color;
        color: white;
        vertical-align: super;
        font-size: 0.7em;
    }
    .o_mail_systray_dropdown {
        direction: ltr;
        width: 350px;
        padding: 0;

        .o_spinner {
            display: flex;
            align-items: center;
            justify-content: center;
            color: $o-main-text-color;
            height: 50px;
        }

        .o_mail_systray_dropdown_top {
            display: flex;
            flex: 0 0 auto;
            justify-content: space-between;
            border-bottom: 1px solid gray('400');
            box-shadow: 0 0 2px gray('400');
            .o_filter_button, .o_new_message {
                padding: 5px;
            }
            .o_filter_button {
                color: $o-main-color-muted;
                &:hover, &.active {
                    color: $o-brand-primary;
                }
                &.active {
                    cursor: default;
                    font-weight: bold;
                }
            }
        }

        .o_mail_systray_dropdown_items {
            flex: 0 1 auto;
            max-height: 400px;
            min-height: 50px;
            overflow-y: auto;

            @include media-breakpoint-up(md) {
                .o_mail_preview {
                    min-height: 50px;
                    padding: 5px;
                    .o_mail_preview_image .fa-circle-o {
                        display: none;
                    }
                    .o_preview_info {
                        margin-left: 10px;
                        .o_preview_title {
                            .o_last_message_date {
                                padding-top: 2px;
                                font-size: x-small;
                                margin-left: 10px;
                            }
                        }
                    }
                }
            }
        }
        .o_activity_filter_button {
            padding: 2px;
        }
        .o_no_activity {
            cursor: initial;
            align-items: center;
            color: grey;
            opacity: 0.5;
            padding: 3px;
        }
    }
}

.o_no_thread_window .o_mail_systray_dropdown .o_new_message {
    display: none;  // hide 'new message' button if chat windows are disabled
}

// Mobile rules
// Goal: mock the design of Discuss in mobile
@include media-breakpoint-down(sm) {
    .o_mail_systray_item {
        .o_notification_counter {
            top: 10%;
        }
        .o_mail_systray_dropdown {
            position: relative;
            .o_mail_systray_dropdown_top {
                padding: 5px;
            }
            .o_mail_systray_mobile_header {
                padding: 5px;
                height: 44px;
                border-bottom: 1px solid #ebebeb;
                box-shadow: 0 0 2px gray('400');
            }
            .o_mail_systray_dropdown_items {
                max-height: none;
                padding-bottom: 52px; // leave space for tabs
            }
            .o_mail_mobile_tabs {
                position: fixed;
                bottom: 0px;
                left: 0px;
                right: 0px;
                background-color: white;
                color: $o-main-text-color;
            }
        }
    }
}