feat: golem15.feedback plugin with the widget config route

- plugin golem15.feedback (requires golem15.user), its config, lang (en, pl), models and migrations
- typed settings singleton golem15_feedback_settings with the WinterCMS defaults and a widget key generated on first creation
- GET /_feedback/api/v1/{key}/config behind the constant-time key check and the fail-closed Origin allow-list, with the feedback-config and feedback-submit buckets
This commit is contained in:
Jakub Zych
2026-10-04 00:01:22 +02:00
commit b4b4135ad3
18 changed files with 2084 additions and 0 deletions

55
lang/en/lang.yaml Normal file
View File

@@ -0,0 +1,55 @@
plugin:
name: Feedback
description: Embeddable feedback widget — screenshot + message, filed as a g15office task.
tab: Feedback
menu_label: Feedback
settings:
menu_label: Feedback Widget
settings_description: Configure the embeddable feedback widget and its g15office connection.
manage_settings: Manage Feedback Widget Settings
tab_general: General
tab_appearance: Appearance
tab_g15office: g15office
enabled: Widget enabled
widget_key: Widget key
widget_key_comment: Public identifier embedded in the snippet (data-key). Not a secret — access is gated by the allowed-origins list below.
allow_hide: Allow visitors to hide the widget
allow_hide_comment: Adds a "Hide widget" link inside the panel. Only enable this once the frontend has a way for the visitor to re-enable it (e.g. a Help page toggle) — otherwise a visitor who hides it has no way back.
position: Position
position_bottom_right: Bottom right
position_bottom_left: Bottom left
position_middle_right: Middle right (edge tab)
position_middle_left: Middle left (edge tab)
allowed_origins: Allowed origins
allowed_origins_comment: One domain per line, e.g. example.com. Submissions from any other Origin are rejected.
color_primary: Primary color
color_primary_comment: "A CSS color, e.g. #6366f1."
color_accent: Accent color
color_accent_comment: "A CSS color, e.g. #ffffff."
label_title_pl: Widget title (pl)
label_title_en: Widget title (en)
label_placeholder_pl: Message placeholder (pl)
label_placeholder_en: Message placeholder (en)
label_success_pl: Success message (pl)
label_success_en: Success message (en)
g15office_task_status: g15office task status
g15office_task_status_comment: Leave blank to use the project's default status.
g15office_task_priority: g15office task priority
priority_low: Low
priority_normal: Normal
priority_high: High
priority_urgent: Urgent
submissions:
menu_label: Submissions
list_title: Feedback submissions
id: ID
type: Type
status: Status
email: Reporter email
page_url: Page
message: Message
user_agent: User agent
console_log: Console log
g15office_task_id: g15office task
g15office_error: g15office error
created_at: Sent at

55
lang/pl/lang.yaml Normal file
View File

@@ -0,0 +1,55 @@
plugin:
name: Opinie
description: Osadzany widget opinii/zgłoszeń — zrzut ekranu + wiadomość, zapisywane jako zadanie w g15office.
tab: Opinie
menu_label: Opinie
settings:
menu_label: Widget opinii
settings_description: Konfiguracja widgetu opinii i połączenia z g15office.
manage_settings: Zarządzaj ustawieniami widgetu opinii
tab_general: Ogólne
tab_appearance: Wygląd
tab_g15office: g15office
enabled: Widget włączony
widget_key: Klucz widgetu
widget_key_comment: Publiczny identyfikator osadzany w snippetcie (data-key). Nie jest sekretem — dostęp ogranicza lista dozwolonych domen poniżej.
allow_hide: Pozwól odwiedzającym ukryć widget
allow_hide_comment: Dodaje link "Ukryj widget" wewnątrz panelu. Włącz tylko wtedy, gdy frontend ma sposób na ponowne włączenie widgetu (np. przełącznik na stronie Pomoc) — w przeciwnym razie odwiedzający, który go ukryje, nie będzie mógł go z powrotem włączyć.
position: Pozycja
position_bottom_right: Prawy dolny róg
position_bottom_left: Lewy dolny róg
position_middle_right: Środek, prawa krawędź
position_middle_left: Środek, lewa krawędź
allowed_origins: Dozwolone domeny
allowed_origins_comment: Jedna domena na linię, np. example.com. Zgłoszenia z innej domeny (Origin) są odrzucane.
color_primary: Kolor główny
color_primary_comment: "Kolor CSS, np. #6366f1."
color_accent: Kolor akcentu
color_accent_comment: "Kolor CSS, np. #ffffff."
label_title_pl: Tytuł widgetu (pl)
label_title_en: Tytuł widgetu (en)
label_placeholder_pl: Placeholder wiadomości (pl)
label_placeholder_en: Placeholder wiadomości (en)
label_success_pl: Komunikat po wysłaniu (pl)
label_success_en: Komunikat po wysłaniu (en)
g15office_task_status: Status zadania w g15office
g15office_task_status_comment: Zostaw puste, aby użyć domyślnego statusu projektu.
g15office_task_priority: Priorytet zadania w g15office
priority_low: Niski
priority_normal: Normalny
priority_high: Wysoki
priority_urgent: Pilny
submissions:
menu_label: Zgłoszenia
list_title: Zgłoszenia z widgetu opinii
id: ID
type: Typ
status: Status
email: E-mail zgłaszającego
page_url: Strona
message: Wiadomość
user_agent: User agent
console_log: Log konsoli
g15office_task_id: Zadanie g15office
g15office_error: Błąd g15office
created_at: Wysłano