Improve WebPushEnabled conditional display
parent
67b9d2eaf6
commit
e2120bc66d
|
@ -86,7 +86,7 @@ const Notifications = () => {
|
||||||
<Sound />
|
<Sound />
|
||||||
<MinPriority />
|
<MinPriority />
|
||||||
<DeleteAfter />
|
<DeleteAfter />
|
||||||
{config.enable_web_push && <WebPushEnabled />}
|
{notifier.pushPossible() && <WebPushEnabled />}
|
||||||
</PrefGroup>
|
</PrefGroup>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
@ -242,10 +242,6 @@ const WebPushEnabled = () => {
|
||||||
await prefs.setWebPushEnabled(ev.target.value);
|
await prefs.setWebPushEnabled(ev.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!notifier.pushPossible()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Pref
|
<Pref
|
||||||
labelId={labelId}
|
labelId={labelId}
|
||||||
|
|
Loading…
Reference in New Issue