feat: add SMTP email support and fix profile/permissions bugs
This commit is contained in:
@@ -322,20 +322,40 @@ export function UserSettings() {
|
||||
<label className="block text-gb-fg-f mb-2 font-mono text-sm">
|
||||
NOTIFICATIONS:
|
||||
</label>
|
||||
<div className="flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
onClick={isSubscribed ? unsubscribe : subscribe}
|
||||
className={`terminal-button text-xs ${isSubscribed ? 'border-gb-green text-gb-green' : 'border-gb-orange text-gb-orange'}`}
|
||||
>
|
||||
{isSubscribed ? '[DISABLE PUSH]' : '[ENABLE PUSH]'}
|
||||
</button>
|
||||
<span className="text-gb-fg-f text-xs font-mono">
|
||||
{isSubscribed ? '● subscribed' : '○ not subscribed'}
|
||||
</span>
|
||||
<div className="flex flex-col gap-3">
|
||||
<div className="flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
onClick={async () => {
|
||||
if (Notification.permission !== 'granted') {
|
||||
await Notification.requestPermission();
|
||||
// Force a re-render to update the permission status
|
||||
setDisplayName(displayName + ' '); setTimeout(() => setDisplayName(displayName), 0);
|
||||
}
|
||||
}}
|
||||
className={`terminal-button text-xs ${Notification.permission === 'granted' ? 'border-gb-green text-gb-green' : 'border-gb-orange text-gb-orange'}`}
|
||||
>
|
||||
{Notification.permission === 'granted' ? '[DESKTOP GRANTED]' : '[ENABLE DESKTOP]'}
|
||||
</button>
|
||||
<span className="text-gb-fg-f text-xs font-mono">
|
||||
{Notification.permission === 'granted' ? '● allowed' : '○ not allowed'}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
<button
|
||||
type="button"
|
||||
onClick={isSubscribed ? unsubscribe : subscribe}
|
||||
className={`terminal-button text-xs ${isSubscribed ? 'border-gb-green text-gb-green' : 'border-gb-orange text-gb-orange'}`}
|
||||
>
|
||||
{isSubscribed ? '[DISABLE PUSH]' : '[ENABLE PUSH]'}
|
||||
</button>
|
||||
<span className="text-gb-fg-f text-xs font-mono">
|
||||
{isSubscribed ? '● subscribed' : '○ not subscribed'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-gb-fg-f text-xs font-mono mt-2">
|
||||
Receive push notifications for @mentions and DMs when the app is closed.
|
||||
Enable Desktop to get notifications while the app is running in the background. Enable Push to get notifications when the app is fully closed.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user