Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ffe6b19818 | |||
| eb1f87f57e |
@@ -172,6 +172,7 @@ export default function FeedbackModal({
|
||||
<option value="general">{t('feedback.category_general')}</option>
|
||||
<option value="bug">{t('feedback.category_bug')}</option>
|
||||
<option value="feature">{t('feedback.category_feature')}</option>
|
||||
<option value="translation">{t('feedback.category_translation')}</option>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
|
||||
@@ -574,6 +574,7 @@
|
||||
"category_general": "Generelt",
|
||||
"category_bug": "Rapporter fejl",
|
||||
"category_feature": "Anmodning om funktion",
|
||||
"category_translation": "Oversættelsesfejl",
|
||||
"contact_label": "E-mail (valgfrit)",
|
||||
"contact_placeholder": "deine@email.beispiel",
|
||||
"message_label": "Besked",
|
||||
|
||||
@@ -574,6 +574,7 @@
|
||||
"category_general": "Allgemein",
|
||||
"category_bug": "Fehler melden",
|
||||
"category_feature": "Feature-Wunsch",
|
||||
"category_translation": "Übersetzungsfehler",
|
||||
"contact_label": "E-Mail (optional)",
|
||||
"contact_placeholder": "deine@email.beispiel",
|
||||
"message_label": "Nachricht",
|
||||
|
||||
@@ -574,6 +574,7 @@
|
||||
"category_general": "General",
|
||||
"category_bug": "Bug report",
|
||||
"category_feature": "Feature request",
|
||||
"category_translation": "Translation error",
|
||||
"contact_label": "Email (optional)",
|
||||
"contact_placeholder": "your@email.example",
|
||||
"message_label": "Message",
|
||||
|
||||
@@ -574,6 +574,7 @@
|
||||
"category_general": "Generelt",
|
||||
"category_bug": "Rapporter feil",
|
||||
"category_feature": "Forespørsel om funksjonalitet",
|
||||
"category_translation": "Oversettelsesfeil",
|
||||
"contact_label": "E-post (valgfritt)",
|
||||
"contact_placeholder": "deine@email.beispiel",
|
||||
"message_label": "Melding",
|
||||
|
||||
@@ -574,6 +574,7 @@
|
||||
"category_general": "Allmänt",
|
||||
"category_bug": "Rapportera fel",
|
||||
"category_feature": "Begäran om funktion",
|
||||
"category_translation": "Översättningsfel",
|
||||
"contact_label": "E-post (valfritt)",
|
||||
"contact_placeholder": "deine@email.beispiel",
|
||||
"message_label": "Meddelande",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { apiFetch } from './api.js'
|
||||
|
||||
export type FeedbackCategory = 'bug' | 'feature' | 'general'
|
||||
export type FeedbackCategory = 'bug' | 'feature' | 'general' | 'translation'
|
||||
|
||||
export class FeedbackApiError extends Error {
|
||||
code: 'NOT_CONFIGURED' | 'REQUEST_FAILED' | 'INVALID_EMAIL' | 'RATE_LIMITED' | 'SPAM_DETECTED'
|
||||
|
||||
@@ -5,7 +5,7 @@ import { analyzeFeedbackSpam, feedbackLimiter } from '../middleware/feedbackProt
|
||||
|
||||
const router = Router()
|
||||
|
||||
const VALID_CATEGORIES = new Set(['bug', 'feature', 'general'])
|
||||
const VALID_CATEGORIES = new Set(['bug', 'feature', 'general', 'translation'])
|
||||
const MAX_MESSAGE_LENGTH = 2000
|
||||
const MAX_EMAIL_LENGTH = 254
|
||||
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
|
||||
|
||||
Reference in New Issue
Block a user