File tree Expand file tree Collapse file tree 3 files changed +166
-0
lines changed Expand file tree Collapse file tree 3 files changed +166
-0
lines changed Original file line number Diff line number Diff line change
1
+ < button class ="email-button " color ="primary " mat-mini-fab [matMenuTriggerFor] ="email ">
2
+ < mat-icon matBadge ="4 " matBadgeColor ="accent " class ="email-button__icon "> mail_outline</ mat-icon >
3
+ </ button >
4
+ < mat-menu #email ="matMenu " xPosition ="before ">
5
+ < div class ="email-menu-header ">
6
+ < h4 class ="email-menu-header__title "> New Messages</ h4 >
7
+ < p class ="email-menu-header__subtitle "> {{emails.length}} New Messages</ p >
8
+ </ div >
9
+
10
+ < div *ngFor ="let email of emails, let i = index " class ="mail-wrapper ">
11
+ < div class ="mail-wrapper__icon-wrapper ">
12
+ < button class ="mail-wrapper__icon " [ngClass] ="colors[i] " mat-mini-fab > {{email.name | shortName}}</ button >
13
+ < span class ="mail-wrapper__time "> {{email.time}}</ span >
14
+ </ div >
15
+ < div class ="mail-content ">
16
+ < span class ="mail-content__user "> {{email.name}}</ span >
17
+ < span class ="mail-content__message "> {{email.message}}</ span >
18
+ </ div >
19
+ </ div >
20
+
21
+ < div class ="send-message-button-wrapper ">
22
+ < button class ="send-message-button " mat-raised-button color ="primary ">
23
+ Send New Message < mat-icon class ="send-message-button__icon "> send</ mat-icon >
24
+ </ button >
25
+ </ div >
26
+ </ mat-menu >
Original file line number Diff line number Diff line change
1
+ @import ' src/app/styles/colors' ;
2
+ @import ' src/app/styles/font' ;
3
+ @import ' src/app/styles/variables' ;
4
+
5
+ .email-button {
6
+ margin-left : 16px ;
7
+
8
+ & __icon {
9
+ color : $white-35 ;
10
+ }
11
+
12
+ @media (max-width : $small ) {
13
+ margin-top : 0 ;
14
+ }
15
+ }
16
+
17
+ .email-menu-header {
18
+ padding : 16px 16px 0 16px ;
19
+
20
+ & __title {
21
+ margin : 0 ;
22
+ font-weight : $fw-lighter ;
23
+ font-size : $fs-large ;
24
+ color : $dark-grey ;
25
+ }
26
+
27
+ & __subtitle {
28
+ color : $pink ;
29
+ font-weight : $fw-lighter ;
30
+ font-size : $fs-small ;
31
+ margin : 4px 0 16px 0 ;
32
+ }
33
+ }
34
+
35
+ .mail-wrapper {
36
+ cursor : pointer ;
37
+ display : flex ;
38
+ padding : 6px 16px ;
39
+
40
+ & :hover {
41
+ background-color : $blue-white ;
42
+ }
43
+
44
+ & __icon-wrapper {
45
+ display : flex ;
46
+ flex-direction : column ;
47
+ }
48
+
49
+ & __icon {
50
+ font-weight : $fw-lighter ;
51
+ font-size : $fs-small ;
52
+ color : $white ;
53
+ display : flex ;
54
+ align-items : center ;
55
+ justify-content : center ;
56
+ box-shadow : none ;
57
+ width : 30px ;
58
+ height : 30px ;
59
+ }
60
+
61
+ & __time {
62
+ text-align : center ;
63
+ color : $grey ;
64
+ font-weight : $fw-lighter ;
65
+ font-size : $fs-xs ;
66
+ }
67
+ }
68
+
69
+ .mail-content {
70
+ display : flex ;
71
+ flex-direction : column ;
72
+ overflow : hidden ;
73
+ padding-left : 16px ;
74
+ justify-content : space-between ;
75
+
76
+ & __user {
77
+ margin-top : 3px ;
78
+ font-weight : $fw-normal ;
79
+ font-size : $fs-small ;
80
+ color : $dark-grey ;
81
+ }
82
+
83
+ & __message {
84
+ color : $grey ;
85
+ font-weight : $fs-small ;
86
+ font-size : $fs-small ;
87
+ white-space : nowrap ;
88
+ text-overflow : ellipsis ;
89
+ overflow : hidden ;
90
+ }
91
+ }
92
+
93
+ .send-message-button-wrapper {
94
+ margin : 16px 0 ;
95
+ text-align : center ;
96
+
97
+ .send-message-button {
98
+ width : 224px ;
99
+ height : 48px ;
100
+ border-radius : 32px ;
101
+
102
+ & __icon {
103
+ margin-left : 16px ;
104
+ }
105
+ }
106
+ }
107
+
108
+ .yellow {
109
+ background-color : $yellow ;
110
+ }
111
+
112
+ .green {
113
+ background-color : $green ;
114
+ }
115
+
116
+ .blue {
117
+ background-color : $blue ;
118
+ }
119
+
120
+ .ping {
121
+ background-color : $pink ;
122
+ }
Original file line number Diff line number Diff line change
1
+ import { Component , Input } from '@angular/core' ;
2
+
3
+ import { Email } from '../../../../modules/auth/models' ;
4
+
5
+ @Component ( {
6
+ selector : 'app-email' ,
7
+ templateUrl : './email.component.html' ,
8
+ styleUrls : [ './email.component.scss' ]
9
+ } )
10
+ export class EmailComponent {
11
+ @Input ( ) emails : Email [ ] ;
12
+ public colors : string [ ] = [
13
+ 'yellow' ,
14
+ 'green' ,
15
+ 'blue' ,
16
+ 'ping'
17
+ ] ;
18
+ }
You can’t perform that action at this time.
0 commit comments