summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/scss/discuss.scss
blob: 22e5e71c677cc91a1277027a98074d8bbae5c3c9 (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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
// ------------------------------------------------------------------
// Layout
// ------------------------------------------------------------------

// ------------------------------------------------------------------
// Style
// ------------------------------------------------------------------

.o_mail_user_status {
    font-size: 1em;
    position: relative;
    &.o_user_online {
        color: $o-enterprise-primary-color;
    }
    &.o_user_idle {
        color: theme-color('warning');
    }
    &.fa-stack {
        width: 1em;
        height: 1em;
        line-height: 1em;
    }
}

// ------------------------------------------------------------------
// Thread preview: shared between discuss (mobile) and systray
// ------------------------------------------------------------------

.o_mail_preview {
    display: flex;
    background-color: theme-color('light');
    color: $o-main-text-color;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    &:hover {
        background-color: gray('300');
        .o_preview_name {
            color: $headings-color;
        }
        .o_discuss_icon {
            opacity: 1;
        }
    }
    &:not(:last-child) {
        border-bottom: 1px solid gray('400');
    }
    .o_mail_preview_image {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        position: relative;
        width: 40px;
        height: 40px;
        object-fit: cover;
        > img {
            max-width: 100%;
            max-height: 100%;
            border-radius: 50%;
            object-fit: cover;
        }
        &.o_mail_preview_app > img {
            border-radius: 2px;
        }
        .o_mail_user_status {
            @include o-position-absolute($bottom: 0px, $right: 0px);
        }
    }
    .o_preview_info {
        flex: 1 1 100%;
        overflow: hidden;
        .o_preview_title {
            align-items: center;
            display: flex;
            .o_preview_name {
                flex: 0 1 auto;
                @include o-text-overflow;
            }
            .o_mail_activity_action_buttons {
                display: flex;
                flex: 1 1 auto;
                flex-flow: row-reverse wrap;
            }
            .o_mail_activity_action {
                padding-top: 0px;
                padding-bottom: 0px;
                padding-right: 0px;
            }
            .o_preview_counter {
                flex: 0 1 auto;
            }
            .o_thread_window_expand {
                margin: 0px 6px;
            }
            .o_last_message_date {
                flex: 0 0 auto;
                color: $o-main-color-muted;
                font-weight: 500;
            }
        }
        .o_last_message_preview {
            width: 94%;
            max-height: 20px;
            color: $o-main-color-muted;
            @include o-text-overflow;
        }
    }
    .o_discuss_icon {
        opacity: 0;
    }
    &.o_preview_unread {
        background-color: transparent;
        &:hover {
            background-color: theme-color('light');
        }
        .o_preview_info {
            .o_preview_title {
                .o_preview_name, .o_preview_counter {
                    font-weight: 700;
                }
                .o_last_message_date {
                    color: $o-brand-primary;
                }
            }
        }
    }
    &.o_systray_activity {
        background-color: transparent;
        &:hover {
            background-color: theme-color('light');
        }
    }
}

@include media-breakpoint-down(sm) {

    .o_main_navbar > ul.o_menu_systray > li .dropdown-menu.show {
        border: none;
    }

    .o_mail_preview {
        padding: $o-mail-chatter-mobile-gap;

        .o_preview_info, .o_last_message_date {
            margin-left: $o-mail-chatter-mobile-gap;
        }

        .o_preview_name {
            font-size: 1.1em;
        }

        .o_last_message_date {
            font-size: 0.9em;
        }

        .o_last_message_preview {
            margin-top: $o-mail-chatter-mobile-gap*0.5;
        }
    }

    .o_mail_mobile_tabs {
        display: flex;
        box-shadow: 0 0 8px gray('400');

        .o_mail_mobile_tab {
            display: flex;
            flex: 1 1 auto;
            width: 20%;
            flex-flow: column nowrap;
            justify-content: space-between;
            padding: $o-mail-chatter-mobile-gap $o-mail-chatter-mobile-gap*2;
            box-shadow: 1px 0 0 gray('400');
            text-align: center;

            > span {
               display: block;
               font-weight: 500;
               font-size: 10px;

               &.fa {
                   padding-bottom: $o-mail-chatter-mobile-gap*2;
                   font-size: 1.3em;
               }
            }

            &.active > span {
                color: $o-brand-primary;
            }
        }
    }
}