1- import { FlagTypeFeedbacks , PostType , FlagNames } from './shared' ;
1+ import { FlagTypeFeedbacks , PostType , Flags } from './shared' ;
22import { CachedFlag } from './UserscriptTools/Store' ;
33
4- export type Flags = 'AnswerNotAnAnswer'
5- | 'PostOffensive'
6- | 'PostSpam'
7- | 'NoFlag'
8- | 'PostOther'
9- | 'PlagiarizedContent' ;
10-
114const deletedAnswers = '/help/deleted-answers' ;
125const commentHelp = '/help/privileges/comment' ;
136const reputationHelp = '/help/whats-reputation' ;
@@ -47,14 +40,14 @@ export const flagCategories: FlagCategory[] = [
4740 {
4841 id : 1 ,
4942 displayName : 'Spam' ,
50- reportType : FlagNames . Spam ,
43+ reportType : Flags . Spam ,
5144 feedbacks : { Smokey : 'tpu-' , Natty : 'tp' , Guttenberg : '' , 'Generic Bot' : 'track' } ,
5245 sendWhenFlagRaised : true
5346 } ,
5447 {
5548 id : 2 ,
5649 displayName : 'Rude or Abusive' ,
57- reportType : FlagNames . Rude ,
50+ reportType : Flags . Rude ,
5851 feedbacks : { Smokey : 'tpu-' , Natty : 'tp' , Guttenberg : '' , 'Generic Bot' : 'track' } ,
5952 sendWhenFlagRaised : true
6053 }
@@ -69,7 +62,7 @@ export const flagCategories: FlagCategory[] = [
6962 {
7063 id : 3 ,
7164 displayName : 'Plagiarism' ,
72- reportType : FlagNames . Plagiarism ,
65+ reportType : Flags . Plagiarism ,
7366 flagText : 'Possible plagiarism of the linked answer, as can be seen here $COPYPASTOR$' ,
7467 // don't send feedback to Smokey despite https://charcoal-se.org/smokey/Feedback-Guidance.html#plagiarism
7568 feedbacks : { Smokey : '' , Natty : '' , Guttenberg : 'tp' , 'Generic Bot' : '' } ,
@@ -78,7 +71,7 @@ export const flagCategories: FlagCategory[] = [
7871 {
7972 id : 4 ,
8073 displayName : 'Duplicate answer' ,
81- reportType : FlagNames . ModFlag ,
74+ reportType : Flags . ModFlag ,
8275 flagText : 'The post is a repost of their other answer: $TARGET$, but as there are slight differences '
8376 + '(see $COPYPASTOR$), an auto flag would not be raised.' ,
8477 comments : {
@@ -92,7 +85,7 @@ export const flagCategories: FlagCategory[] = [
9285 {
9386 id : 5 ,
9487 displayName : 'Bad attribution' ,
95- reportType : FlagNames . Plagiarism ,
88+ reportType : Flags . Plagiarism ,
9689 flagText : 'This post is copied from $TARGET$, as can be seen here $COPYPASTOR$. The author '
9790 + 'only added a link to the other answer, which is [not the proper way of attribution]'
9891 + '(//stackoverflow.blog/2009/06/25/attribution-required).' ,
@@ -110,7 +103,7 @@ export const flagCategories: FlagCategory[] = [
110103 {
111104 id : 6 ,
112105 displayName : 'Link Only' ,
113- reportType : FlagNames . NAA ,
106+ reportType : Flags . NAA ,
114107 comments : {
115108 // comment by Yunnosch: https://chat.stackoverflow.com/transcript/message/57442309
116109 low : 'A link to a solution is welcome, but please ensure your answer is useful without it: '
@@ -126,7 +119,7 @@ export const flagCategories: FlagCategory[] = [
126119 {
127120 id : 7 ,
128121 displayName : 'Not an answer' ,
129- reportType : FlagNames . NAA ,
122+ reportType : Flags . NAA ,
130123 comments : {
131124 low : 'This does not provide an answer to the question. You can [search for similar questions](/search), '
132125 + 'or refer to the related and linked questions on the right-hand side of the page to find an answer. '
@@ -144,7 +137,7 @@ export const flagCategories: FlagCategory[] = [
144137 {
145138 id : 8 ,
146139 displayName : 'Thanks' ,
147- reportType : FlagNames . NAA ,
140+ reportType : Flags . NAA ,
148141 comments : {
149142 low : 'Please don\'t add _thanks_ as answers. They don\'t actually provide an answer to the question, and '
150143 + 'can be perceived as noise by its future visitors. Once you [earn](//meta.stackoverflow.com/q/146472) '
@@ -164,7 +157,7 @@ export const flagCategories: FlagCategory[] = [
164157 {
165158 id : 9 ,
166159 displayName : 'Me too' ,
167- reportType : FlagNames . NAA ,
160+ reportType : Flags . NAA ,
168161 comments : {
169162 low : 'Please don\'t add *Me too* as answers. It doesn\'t actually provide an answer to the question. '
170163 + 'If you have a different but related question, then [ask](/questions/ask) it (reference this one '
@@ -178,7 +171,7 @@ export const flagCategories: FlagCategory[] = [
178171 {
179172 id : 10 ,
180173 displayName : 'Library' ,
181- reportType : FlagNames . NAA ,
174+ reportType : Flags . NAA ,
182175 comments : {
183176 low : 'Please don\'t just post some tool or library as an answer. At least demonstrate '
184177 + '[how it solves the problem](//meta.stackoverflow.com/a/251605) in the answer itself.' ,
@@ -189,7 +182,7 @@ export const flagCategories: FlagCategory[] = [
189182 {
190183 id : 11 ,
191184 displayName : 'Comment' ,
192- reportType : FlagNames . NAA ,
185+ reportType : Flags . NAA ,
193186 comments : {
194187 low : 'This does not provide an answer to the question. Once you have sufficient '
195188 + `[reputation](${ reputationHelp } ) you will be able to [comment on any post](${ commentHelp } ); instead, `
@@ -202,7 +195,7 @@ export const flagCategories: FlagCategory[] = [
202195 {
203196 id : 12 ,
204197 displayName : 'Duplicate' ,
205- reportType : FlagNames . NAA ,
198+ reportType : Flags . NAA ,
206199 comments : {
207200 low : 'Instead of posting an answer which merely links to another answer, please instead '
208201 + `[flag the question](${ flagPosts } ) as a duplicate.` ,
@@ -213,7 +206,7 @@ export const flagCategories: FlagCategory[] = [
213206 {
214207 id : 13 ,
215208 displayName : 'Non English' ,
216- reportType : FlagNames . NAA ,
209+ reportType : Flags . NAA ,
217210 comments : {
218211 low : 'Please write your answer in English, as Stack Overflow is an '
219212 + '[English-only site](//meta.stackoverflow.com/a/297680).' ,
@@ -224,7 +217,7 @@ export const flagCategories: FlagCategory[] = [
224217 {
225218 id : 14 ,
226219 displayName : 'Should be an edit' ,
227- reportType : FlagNames . NAA ,
220+ reportType : Flags . NAA ,
228221 comments : {
229222 low : 'Please use the edit link on your question to add additional information. '
230223 + 'The "Post Answer" button should be used only for complete answers to the question.' ,
@@ -243,21 +236,21 @@ export const flagCategories: FlagCategory[] = [
243236 {
244237 id : 15 ,
245238 displayName : 'Looks Fine' ,
246- reportType : FlagNames . NoFlag ,
239+ reportType : Flags . NoFlag ,
247240 feedbacks : { Smokey : 'fp-' , Natty : 'fp' , Guttenberg : 'fp' , 'Generic Bot' : '' } ,
248241 sendWhenFlagRaised : false
249242 } ,
250243 {
251244 id : 16 ,
252245 displayName : 'Needs Editing' ,
253- reportType : FlagNames . NoFlag ,
246+ reportType : Flags . NoFlag ,
254247 feedbacks : { Smokey : 'fp-' , Natty : 'ne' , Guttenberg : 'fp' , 'Generic Bot' : '' } ,
255248 sendWhenFlagRaised : false
256249 } ,
257250 {
258251 id : 17 ,
259252 displayName : 'Vandalism' ,
260- reportType : FlagNames . NoFlag ,
253+ reportType : Flags . NoFlag ,
261254 feedbacks : { Smokey : 'tp-' , Natty : '' , Guttenberg : 'fp' , 'Generic Bot' : '' } ,
262255 sendWhenFlagRaised : false
263256 }
@@ -269,7 +262,7 @@ export function getEmptyFlagType(id: number, belongsTo: string): CachedFlag {
269262 return {
270263 id,
271264 displayName : 'Name' ,
272- reportType : FlagNames . NoFlag ,
265+ reportType : Flags . NoFlag ,
273266 feedbacks : { Smokey : '' , Natty : '' , Guttenberg : '' , 'Generic Bot' : '' } ,
274267 sendWhenFlagRaised : false ,
275268 downvote : false ,
0 commit comments