mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
Link ToS modal to legal pages, add report feedback category
- ToS modal: Datenschutzerklärung/Impressum words are now real links - Feedback form: new "report" category (abuse/violation), hidden GitHub-issue option since reports must stay private - Gateways: accept "report" in FEEDBACK_CATEGORIES Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
73303e1229
commit
b0495367cb
3 files changed
+54
-20
No files matched your search
@@ -82,7 +82,7 @@ const FEEDBACK_LOG_FILE = process.env.FEEDBACK_LOG_FILE ?? path.resolve(process.
|
||||
// fresh file is started. Keeps disk usage bounded on a plain JSON-lines
|
||||
// file with no other retention policy.
|
||||
const FEEDBACK_LOG_MAX_BYTES = 5 * 1024 * 1024;
|
||||
const FEEDBACK_CATEGORIES = new Set(["bug", "idea", "other"]);
|
||||
const FEEDBACK_CATEGORIES = new Set(["bug", "idea", "report", "other"]);
|
||||
const FEEDBACK_MESSAGE_MAX_LENGTH = 4000;
|
||||
|
||||
async function rotateFeedbackLogIfNeeded(): Promise<void> {
|
||||
|
||||
+37
-15
@@ -1601,8 +1601,20 @@ function ToSDialog({ mandatory, onAccept, onClose }: { mandatory: boolean; onAcc
|
||||
<li>{t("tos.rule1")}</li>
|
||||
<li>{t("tos.rule2")}</li>
|
||||
<li>{t("tos.rule3")}</li>
|
||||
<li>{t("tos.rule4")}</li>
|
||||
<li>{t("tos.rule5")}</li>
|
||||
<li>
|
||||
{t("tos.rule4Pre")}
|
||||
<a href="https://webspeak3.de/datenschutz.html" target="_blank" rel="noreferrer">
|
||||
{t("tos.privacyLinkText")}
|
||||
</a>
|
||||
{t("tos.rule4Post")}
|
||||
</li>
|
||||
<li>
|
||||
{t("tos.rule5Pre")}
|
||||
<a href="https://webspeak3.de/impressum.html" target="_blank" rel="noreferrer">
|
||||
{t("tos.legalLinkText")}
|
||||
</a>
|
||||
{t("tos.rule5Post")}
|
||||
</li>
|
||||
<li>{t("tos.rule6")}</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -2211,7 +2223,7 @@ function DonateFab() {
|
||||
);
|
||||
}
|
||||
|
||||
type FeedbackCategory = "bug" | "idea" | "other";
|
||||
type FeedbackCategory = "bug" | "idea" | "other" | "report";
|
||||
|
||||
function FeedbackDialog({ onClose }: { onClose: () => void }) {
|
||||
const t = useT();
|
||||
@@ -2308,10 +2320,14 @@ function FeedbackDialog({ onClose }: { onClose: () => void }) {
|
||||
const next = e.target.value as FeedbackCategory;
|
||||
setCategory(next);
|
||||
if (next === "bug") setPublishAsIssue(true);
|
||||
// Reports (e.g. ToS violations) never become a public
|
||||
// GitHub issue - they may name another user's server.
|
||||
else if (next === "report") setPublishAsIssue(false);
|
||||
}}
|
||||
>
|
||||
<option value="bug">{t("feedback.dialog.category.bug")}</option>
|
||||
<option value="idea">{t("feedback.dialog.category.idea")}</option>
|
||||
<option value="report">{t("feedback.dialog.category.report")}</option>
|
||||
<option value="other">{t("feedback.dialog.category.other")}</option>
|
||||
</select>
|
||||
</label>
|
||||
@@ -2329,18 +2345,24 @@ function FeedbackDialog({ onClose }: { onClose: () => void }) {
|
||||
{t("feedback.dialog.email")}
|
||||
<input type="email" value={email} onChange={(e) => setEmail(e.target.value)} />
|
||||
</label>
|
||||
<label className="ts-feedback-checkbox-field">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={publishAsIssue}
|
||||
disabled={category === "bug"}
|
||||
onChange={(e) => setPublishAsIssue(e.target.checked)}
|
||||
/>
|
||||
{t("feedback.dialog.publishAsIssue")}
|
||||
</label>
|
||||
<p className="ts-feedback-hint">
|
||||
{t(category === "bug" ? "feedback.dialog.publishAsIssueHintBug" : "feedback.dialog.publishAsIssueHint")}
|
||||
</p>
|
||||
{category === "report" ? (
|
||||
<p className="ts-feedback-hint">{t("feedback.dialog.reportHint")}</p>
|
||||
) : (
|
||||
<>
|
||||
<label className="ts-feedback-checkbox-field">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={publishAsIssue}
|
||||
disabled={category === "bug"}
|
||||
onChange={(e) => setPublishAsIssue(e.target.checked)}
|
||||
/>
|
||||
{t("feedback.dialog.publishAsIssue")}
|
||||
</label>
|
||||
<p className="ts-feedback-hint">
|
||||
{t(category === "bug" ? "feedback.dialog.publishAsIssueHintBug" : "feedback.dialog.publishAsIssueHint")}
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
{status === "error" && <p className="ts-feedback-error">{t("feedback.dialog.error")}</p>}
|
||||
</>
|
||||
)}
|
||||
|
||||
+16
-4
@@ -59,7 +59,9 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"feedback.dialog.category": "Kategorie",
|
||||
"feedback.dialog.category.bug": "Fehler",
|
||||
"feedback.dialog.category.idea": "Idee",
|
||||
"feedback.dialog.category.report": "Meldung (Verstoß/Missbrauch)",
|
||||
"feedback.dialog.category.other": "Sonstiges",
|
||||
"feedback.dialog.reportHint": "Meldungen bleiben privat und werden nie als GitHub-Issue veröffentlicht. Gib bei Bedarf den betroffenen Server mit an.",
|
||||
"feedback.dialog.message": "Nachricht",
|
||||
"feedback.dialog.messagePlaceholder": "Was ist passiert, oder was schlägst du vor?",
|
||||
"feedback.dialog.email": "E-Mail (optional, für Rückfragen)",
|
||||
@@ -76,8 +78,12 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"tos.rule1": "Dieser Client dient der privaten, nicht-kommerziellen Nutzung von TeamSpeak-/TeaSpeak-/GreenTeaSpeak-Servern über den Browser.",
|
||||
"tos.rule2": "Verboten sind insbesondere: Straftaten jeder Art, Belästigung und Hassrede, Spam und Flooding, Störung des Dienstes sowie die Umgehung von Sperren.",
|
||||
"tos.rule3": "Bei Verstößen kann der Zugang ohne Vorwarnung gesperrt werden; schwerwiegende Fälle werden ggf. an die zuständigen Behörden gemeldet.",
|
||||
"tos.rule4": "Zur Betriebssicherheit und Missbrauchserkennung werden Verbindungen protokolliert (Serveradresse, Servername, Zeitpunkt) – siehe Datenschutzerklärung.",
|
||||
"tos.rule5": "Bei Missbrauch oder Beschwerden: siehe Impressum.",
|
||||
"tos.rule4Pre": "Zur Betriebssicherheit und Missbrauchserkennung werden Verbindungen protokolliert (Serveradresse, Servername, Zeitpunkt) und nach 90 Tagen automatisch gelöscht – siehe ",
|
||||
"tos.rule4Post": ".",
|
||||
"tos.privacyLinkText": "Datenschutzerklärung",
|
||||
"tos.rule5Pre": "Bei Missbrauch oder Beschwerden: siehe ",
|
||||
"tos.rule5Post": ".",
|
||||
"tos.legalLinkText": "Impressum",
|
||||
"tos.rule6": "Mit Klick auf „Akzeptieren\" stimmst du diesen Bedingungen zu. Die Zustimmung wird nur lokal in deinem Browser gespeichert; bei Regeländerungen wirst du erneut gefragt.",
|
||||
"tos.accept": "Akzeptieren",
|
||||
"tos.close": "Schließen",
|
||||
@@ -714,7 +720,9 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"feedback.dialog.category": "Category",
|
||||
"feedback.dialog.category.bug": "Bug",
|
||||
"feedback.dialog.category.idea": "Idea",
|
||||
"feedback.dialog.category.report": "Report (violation/abuse)",
|
||||
"feedback.dialog.category.other": "Other",
|
||||
"feedback.dialog.reportHint": "Reports stay private and are never published as a GitHub issue. Feel free to name the affected server.",
|
||||
"feedback.dialog.message": "Message",
|
||||
"feedback.dialog.messagePlaceholder": "What happened, or what are you suggesting?",
|
||||
"feedback.dialog.email": "Email (optional, for follow-up)",
|
||||
@@ -730,8 +738,12 @@ const translations: Record<Lang, Record<string, string>> = {
|
||||
"tos.rule1": "This client is for private, non-commercial use of TeamSpeak/TeaSpeak/GreenTeaSpeak servers via the browser.",
|
||||
"tos.rule2": "Prohibited in particular: any criminal activity, harassment and hate speech, spam and flooding, disrupting the service, and circumventing bans.",
|
||||
"tos.rule3": "Violations may result in access being blocked without warning; serious cases may be reported to the relevant authorities.",
|
||||
"tos.rule4": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) – see the privacy policy.",
|
||||
"tos.rule5": "For abuse or complaints: see the legal notice (Impressum).",
|
||||
"tos.rule4Pre": "For operational security and abuse detection, connections are logged (server address, server name, timestamp) and automatically deleted after 90 days – see the ",
|
||||
"tos.rule4Post": ".",
|
||||
"tos.privacyLinkText": "privacy policy",
|
||||
"tos.rule5Pre": "For abuse or complaints: see the ",
|
||||
"tos.rule5Post": ".",
|
||||
"tos.legalLinkText": "legal notice (Impressum)",
|
||||
"tos.rule6": "By clicking \"Accept\" you agree to these terms. Your acceptance is stored only locally in your browser; you'll be asked again if the rules change.",
|
||||
"tos.accept": "Accept",
|
||||
"tos.close": "Close",
|
||||
|
||||
Reference in new issue
Block a user