mirror of
https://github.com/owncast/owncast.git
synced 2025-11-03 21:08:36 +08:00
fix(notifications): do not support browser notifications for local servers
This commit is contained in:
@ -17,6 +17,10 @@ const NotificationsNotSupported = () => (
|
||||
<div>Browser notifications are not supported in your browser.</div>
|
||||
);
|
||||
|
||||
const NotificationsNotSupportedLocal = () => (
|
||||
<div>Browser notifications are not supported for local servers.</div>
|
||||
);
|
||||
|
||||
export type PermissionPopupPreviewProps = {
|
||||
start: () => void;
|
||||
};
|
||||
@ -106,6 +110,10 @@ export const BrowserNotifyModal = () => {
|
||||
setBrowserPushPermissionsPending(false);
|
||||
};
|
||||
|
||||
if (window.location.hostname === 'localhost') {
|
||||
return <NotificationsNotSupportedLocal />;
|
||||
}
|
||||
|
||||
if (!browserPushSupported) {
|
||||
return <NotificationsNotSupported />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user