File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
client/src/components/Flags Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ const flagMeta = {
26
26
icon : 'verified' ,
27
27
color : '#caac00' ,
28
28
} ,
29
+ versions : {
30
+ icon : 'group' ,
31
+ color : '#1E2019' ,
32
+ } ,
29
33
}
30
34
31
35
const Flag = ( { flag, withlabel, style, ...otherProps } ) => {
@@ -68,6 +72,7 @@ Flag.translations = {
68
72
unanswered : 'unanswered' ,
69
73
certified : 'certified' ,
70
74
certifiedAdd : ' on ' ,
75
+ versions : 'multiple versions' ,
71
76
} ,
72
77
fr : {
73
78
duplicate : 'doublon' ,
@@ -76,6 +81,7 @@ Flag.translations = {
76
81
unanswered : 'sans réponse' ,
77
82
certified : 'certifiée' ,
78
83
certifiedAdd : ' le ' ,
84
+ versions : 'plusieurs versions' ,
79
85
} ,
80
86
}
81
87
Original file line number Diff line number Diff line change 3
3
ctxUser,
4
4
refreshCertifiedFlag,
5
5
addCertifiedFlagWhenSpecialist,
6
- storeTranslation
6
+ storeTranslation,
7
+ createFlagAndUpdateHistoryAndAlgolia
7
8
} = require ( '../helpers' )
8
9
const { algolia, mailgun } = require ( '../integrations' )
9
10
@@ -239,6 +240,16 @@ module.exports = {
239
240
certifiedContent = answer . certified
240
241
}
241
242
243
+ if ( certifiedContent && ! answer . node . flags . find ( flag => flag . type === 'versions' ) ) {
244
+ await createFlagAndUpdateHistoryAndAlgolia (
245
+ history ,
246
+ 'versions' ,
247
+ ctx ,
248
+ answer . node . id ,
249
+ ctxUser ( ctx ) . id
250
+ )
251
+ }
252
+
242
253
const { language, translation } = await storeTranslation ( content )
243
254
244
255
const updateAnswerData = {
You can’t perform that action at this time.
0 commit comments