summaryrefslogtreecommitdiff
path: root/front/src/pages/Settings.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'front/src/pages/Settings.tsx')
-rw-r--r--front/src/pages/Settings.tsx38
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">