mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 07:05:24 +03:00
Improve wording
This commit is contained in:
parent
037718fb3f
commit
d0e46b3ce8
@ -193,8 +193,8 @@ export default function NotificationView({
|
|||||||
<div className="max-w-6xl">
|
<div className="max-w-6xl">
|
||||||
<div className="mb-5 mt-2 flex max-w-5xl flex-col gap-2 text-sm text-primary-variant">
|
<div className="mb-5 mt-2 flex max-w-5xl flex-col gap-2 text-sm text-primary-variant">
|
||||||
<p>
|
<p>
|
||||||
Frigate can natively send push notifications to Frigate when it
|
Frigate can natively send push notifications to your device when
|
||||||
is running in the browser or installed as a PWA.
|
it is running in the browser or installed as a PWA.
|
||||||
</p>
|
</p>
|
||||||
<div className="flex items-center text-primary">
|
<div className="flex items-center text-primary">
|
||||||
<Link
|
<Link
|
||||||
@ -285,12 +285,13 @@ export default function NotificationView({
|
|||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
{config?.notifications.enabled && (
|
|
||||||
<div className="mt-4 space-y-6">
|
<div className="mt-4 space-y-6">
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
<Separator className="my-2 flex bg-secondary" />
|
<Separator className="my-2 flex bg-secondary" />
|
||||||
<Button
|
<Button
|
||||||
disabled={publicKey == undefined}
|
disabled={
|
||||||
|
!config?.notifications.enabled || publicKey == undefined
|
||||||
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (registration == null) {
|
if (registration == null) {
|
||||||
Notification.requestPermission().then((permission) => {
|
Notification.requestPermission().then((permission) => {
|
||||||
@ -318,10 +319,7 @@ export default function NotificationView({
|
|||||||
pushSubscription?.unsubscribe();
|
pushSubscription?.unsubscribe();
|
||||||
registration.unregister();
|
registration.unregister();
|
||||||
setRegistration(null);
|
setRegistration(null);
|
||||||
removeMessage(
|
removeMessage("notification_settings", "registration");
|
||||||
"notification_settings",
|
|
||||||
"registration",
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
@ -330,7 +328,6 @@ export default function NotificationView({
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user