|
|
|
@@ -30,6 +30,8 @@ export default function ProfileModal({ onClose }) {
|
|
|
|
|
typeof Notification !== 'undefined' ? Notification.permission : 'unsupported'
|
|
|
|
|
);
|
|
|
|
|
const isIOS = /iphone|ipad/i.test(navigator.userAgent);
|
|
|
|
|
const isAndroid = /android/i.test(navigator.userAgent);
|
|
|
|
|
const isDesktop = !isIOS && !isAndroid;
|
|
|
|
|
const isStandalone = window.navigator.standalone === true;
|
|
|
|
|
const [hideAdminTag, setHideAdminTag] = useState(!!user?.hide_admin_tag);
|
|
|
|
|
const [allowDm, setAllowDm] = useState(user?.allow_dm !== 0);
|
|
|
|
@@ -297,7 +299,11 @@ export default function ProfileModal({ onClose }) {
|
|
|
|
|
|
|
|
|
|
{tab === 'notifications' && (
|
|
|
|
|
<div className="flex-col gap-3">
|
|
|
|
|
{isIOS && !isStandalone ? (
|
|
|
|
|
{isDesktop ? (
|
|
|
|
|
<div style={{ padding: '12px 14px', borderRadius: 8, background: 'var(--surface-variant)', border: '1px solid var(--border)', fontSize: 14, color: 'var(--text-secondary)', lineHeight: 1.6 }}>
|
|
|
|
|
In-app notifications are active on this device. Unread message counts and browser tab indicators update in real time — no additional setup needed.
|
|
|
|
|
</div>
|
|
|
|
|
) : isIOS && !isStandalone ? (
|
|
|
|
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 10, padding: '12px 14px', borderRadius: 8, background: 'var(--surface-variant)', border: '1px solid var(--border)' }}>
|
|
|
|
|
<div style={{ fontSize: 14, fontWeight: 600, color: 'var(--text-primary)' }}>Home Screen required for notifications</div>
|
|
|
|
|
<div style={{ fontSize: 13, color: 'var(--text-secondary)', lineHeight: 1.6 }}>
|
|
|
|
|