2626 {{ t('mail', 'Add default tags') }}
2727 </h2 >
2828 <div v-for =" tag in tags" :key =" tag.id" class =" tag-group" >
29- <div class =" tag-group__bg button"
30- :style =" {'background-color': tag.color}" />
31- <span class =" tag-group__label"
32- :style =" {color: tag.color}" >
33- {{ tag.displayName }} </span >
29+ <button class =" tag-group__label"
30+ :style =" {
31+ color: convertHex(tag.color, 1),
32+ 'background-color': convertHex(tag.color, 0.15)
33+ }" >
34+ {{ tag.displayName }}
35+ </button >
3436 <button v-if =" !isSet(tag.imapLabel)"
3537 class =" tag-actions"
3638 @click =" addTag(tag.imapLabel)" >
@@ -140,6 +142,20 @@ export default {
140142 this .tagLabel = true
141143 }
142144 },
145+ convertHex (color , opacity ) {
146+ if (color .length === 4 ) {
147+ const r = parseInt (color .substring (1 , 2 ), 16 )
148+ const g = parseInt (color .substring (2 , 3 ), 16 )
149+ const b = parseInt (color .substring (3 , 4 ), 16 )
150+ return ` rgba(${ r} , ${ g} , ${ b} , ${ opacity} )`
151+ } else {
152+ const r = parseInt (color .substring (1 , 3 ), 16 )
153+ const g = parseInt (color .substring (3 , 5 ), 16 )
154+ const b = parseInt (color .substring (5 , 7 ), 16 )
155+ return ` rgba(${ r} , ${ g} , ${ b} , ${ opacity} )`
156+ }
157+ },
158+
143159 },
144160}
145161
@@ -150,42 +166,37 @@ export default {
150166 padding-left : 20px ;
151167 padding-right : 20px ;
152168 // modal jumps on the right when text is changed to 'remove'
153- width : 220px ;
169+ width : 250px ;
170+ max-height : calc (100vh - 210px );
171+ overflow-y : auto ;
154172}
155173.tag-title {
156174 margin-top : 20px ;
157175 margin-left : 10px ;
158176}
159177.tag-group {
160178 display : block ;
161- border : 1px solid transparent ;
162- border-radius : var (--border-radius-pill );
163179 position : relative ;
164180 margin : 0 1px ;
165181 overflow : hidden ;
166182 left : 4px ;
167183}
168184.tag-actions {
169- margin-left : 115px ;
170185 background-color : transparent ;
171186 border : none ;
187+ float : right ;
172188 & :hover ,
173189 & :focus {
174190 opacity : .7 ;
175191 }
176192}
177- .tag-group__bg {
178- position : absolute ;
179- opacity : 15% ;
180- margin-left : 5px ;
181- min-width : 110px ;
182- cursor : default ;
183- }
184193.tag-group__label {
185- position : absolute ;
186194 z-index : 2 ;
187195 font-weight : bold ;
188- margin : 8px 24px ;
196+ border : none ;
197+ background-color : transparent ;
198+ padding-left : 10px ;
199+ padding-right : 10px ;
189200}
190201.app-navigation-entry-bullet-wrapper {
191202 width : 44px ;
0 commit comments