mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 09:04:28 +03:00
tweaks
This commit is contained in:
parent
6d1e08cc8d
commit
da2f86d80d
@ -253,6 +253,7 @@ class WebPushClient(Communicator): # type: ignore[misc]
|
|||||||
payload={},
|
payload={},
|
||||||
title="Test Notification",
|
title="Test Notification",
|
||||||
message="This is a test notification from Frigate.",
|
message="This is a test notification from Frigate.",
|
||||||
|
direct_url="/",
|
||||||
notification_type="test",
|
notification_type="test",
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -309,4 +310,5 @@ class WebPushClient(Communicator): # type: ignore[misc]
|
|||||||
self.cleanup_registrations()
|
self.cleanup_registrations()
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
|
logger.info("Closing notification queue")
|
||||||
self.notification_thread.join()
|
self.notification_thread.join()
|
||||||
|
|||||||
@ -144,7 +144,7 @@ export default function NotificationView({
|
|||||||
setRegistration(null);
|
setRegistration(null);
|
||||||
});
|
});
|
||||||
toast.success(
|
toast.success(
|
||||||
"Successfully registered for notifications. Restart to start receiving notifications.",
|
"Successfully registered for notifications. Restarting Frigate is required before any notifications (including a test notification) can be sent.",
|
||||||
{
|
{
|
||||||
position: "top-center",
|
position: "top-center",
|
||||||
},
|
},
|
||||||
@ -438,7 +438,7 @@ export default function NotificationView({
|
|||||||
|
|
||||||
<div className="col-span-1">
|
<div className="col-span-1">
|
||||||
<div className="mt-4 gap-2 space-y-6">
|
<div className="mt-4 gap-2 space-y-6">
|
||||||
<div className="space-y-3">
|
<div className="flex flex-col gap-2 md:max-w-[50%]">
|
||||||
<Separator className="my-2 flex bg-secondary md:hidden" />
|
<Separator className="my-2 flex bg-secondary md:hidden" />
|
||||||
<Heading as="h4" className="my-2">
|
<Heading as="h4" className="my-2">
|
||||||
Device-Specific Settings
|
Device-Specific Settings
|
||||||
@ -486,7 +486,7 @@ export default function NotificationView({
|
|||||||
>
|
>
|
||||||
{`${registration != null ? "Unregister" : "Register"} for notifications on this device`}
|
{`${registration != null ? "Unregister" : "Register"} for notifications on this device`}
|
||||||
</Button>
|
</Button>
|
||||||
{registration != null && (
|
{registration != null && registration.active && (
|
||||||
<Button
|
<Button
|
||||||
aria-label="Send a test notification"
|
aria-label="Send a test notification"
|
||||||
onClick={() => sendTestNotification("notification_test")}
|
onClick={() => sendTestNotification("notification_test")}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user