feat: add opt-out toggle for prestige bot announcements
CI / Lint, Build & Test (pull_request) Failing after 1m2s
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m9s

Adds enablePrestigeAnnouncements to ProfileSettings (defaults to true).
The prestige route now checks this setting before posting the Discord
webhook, and the edit profile modal exposes a toggle in the Sounds &
Notifications section so players can opt out.

Closes #169
This commit is contained in:
2026-03-31 13:20:01 -07:00
committed by Naomi Carrigan
parent 19f5f5e54f
commit 87686a310f
5 changed files with 65 additions and 11 deletions
@@ -225,6 +225,10 @@ const EditProfileModal = ({
void handleNotificationsEnable();
}
function handlePrestigeAnnouncementsToggle(): void {
toggleSetting("enablePrestigeAnnouncements");
}
const isSaveDisabled = saving || characterName.trim() === "";
let saveLabel = "Save Profile";
@@ -417,6 +421,23 @@ const EditProfileModal = ({
}
</span>
</button>
<button
className={`stat-toggle-btn ${
profileSettings.enablePrestigeAnnouncements
? "stat-toggle-on"
: "stat-toggle-off"
}`}
onClick={handlePrestigeAnnouncementsToggle}
type="button"
>
<span>{"⭐ Prestige Bot Announcements"}</span>
<span className="stat-toggle-indicator">
{profileSettings.enablePrestigeAnnouncements
? "✓ On"
: "Off"
}
</span>
</button>
</div>
<div className="edit-profile-section">