diff options
author | polwex <polwex@sortug.com> | 2025-09-18 03:48:14 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-09-18 03:48:14 +0700 |
commit | ad7ebd1756956724e0b167d88f924e707401a9aa (patch) | |
tree | 5f29ab38e41224245a93a2a00318b835278ac596 /front/src/pages/Settings.tsx | |
parent | 4b016c908dda2019f3bf89e5a3d2eae535e5fbd2 (diff) |
fuck yeah
Diffstat (limited to 'front/src/pages/Settings.tsx')
-rw-r--r-- | front/src/pages/Settings.tsx | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/front/src/pages/Settings.tsx b/front/src/pages/Settings.tsx index 6b6f7bd..cd9eec7 100644 --- a/front/src/pages/Settings.tsx +++ b/front/src/pages/Settings.tsx @@ -6,10 +6,11 @@ import Icon from "@/components/Icon"; import "@/styles/Settings.css"; function Settings() { - const { key, relays, api } = useLocalState((s) => ({ + const { key, relays, api, addNotification } = useLocalState((s) => ({ key: s.key, relays: s.relays, api: s.api, + addNotification: s.addNotification, })); const [newRelay, setNewRelay] = useState(""); const [isAddingRelay, setIsAddingRelay] = useState(false); @@ -78,6 +79,41 @@ function Settings() { </div> <div className="settings-content"> + {/* Notifications Test Section - Remove in production */} + <div className="settings-section"> + <div className="section-header"> + <Icon name="bell" size={20} /> + <h2>Test Notifications</h2> + </div> + <div className="section-content"> + <div className="setting-item"> + <div className="setting-info"> + <label>Test Notification System</label> + <p>Generate test notifications to see how they work</p> + </div> + <div className="setting-control"> + <button + className="test-notification-btn" + onClick={() => { + const types = ["follow", "reply", "react", "mention", "access_request"]; + const randomType = types[Math.floor(Math.random() * types.length)] as any; + addNotification({ + type: randomType, + from: "~sampel-palnet", + message: "This is a test notification", + reaction: randomType === "react" ? "👍" : undefined, + }); + toast.success("Test notification sent!"); + }} + > + <Icon name="bell" size={16} /> + Send Test Notification + </button> + </div> + </div> + </div> + </div> + {/* Appearance Section */} <div className="settings-section"> <div className="section-header"> |