@@ -99,8 +99,6 @@ export default {
9999 tagLabel: true ,
100100 tagInput: false ,
101101 showSaving: false ,
102- renameTagLabel: true ,
103- renameTagInput: false ,
104102 deleteTagModal: false ,
105103 tagToDelete: null ,
106104 color: randomColor (),
@@ -188,49 +186,6 @@ export default {
188186 }
189187 },
190188
191- convertHex (color , opacity ) {
192- if (color .length === 4 ) {
193- const r = parseInt (color .substring (1 , 2 ), 16 )
194- const g = parseInt (color .substring (2 , 3 ), 16 )
195- const b = parseInt (color .substring (3 , 4 ), 16 )
196- return ` rgba(${ r} , ${ g} , ${ b} , ${ opacity} )`
197- } else {
198- const r = parseInt (color .substring (1 , 3 ), 16 )
199- const g = parseInt (color .substring (3 , 5 ), 16 )
200- const b = parseInt (color .substring (5 , 7 ), 16 )
201- return ` rgba(${ r} , ${ g} , ${ b} , ${ opacity} )`
202- }
203- },
204-
205- openEditTag () {
206- this .renameTagLabel = false
207- this .renameTagInput = true
208- this .showSaving = false
209- },
210-
211- async renameTag (tag , event ) {
212- this .renameTagInput = false
213- this .showSaving = false
214- const displayName = event .target .querySelector (' input[type=text]' ).value
215-
216- try {
217- await this .mainStore .updateTag ({
218- tag,
219- displayName,
220- color: tag .color ,
221- })
222- this .renameTagLabel = true
223- this .renameTagInput = false
224- this .showSaving = false
225- } catch (error) {
226- showInfo (t (' mail' , ' An error occurred, unable to rename the tag.' ))
227- logger .error (' could not rename tag' , { error })
228- this .renameTagLabel = false
229- this .renameTagInput = false
230- this .showSaving = true
231- }
232- },
233-
234189 deleteTag (tag ) {
235190 this .tagToDelete = tag
236191 this .deleteTagModal = true
0 commit comments