@sinlungtech/push-client 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -317,8 +317,8 @@ function PushProvider({
|
|
|
317
317
|
tag: payload.tag
|
|
318
318
|
};
|
|
319
319
|
onLiveNotification?.(normalized);
|
|
320
|
-
if (!onLiveNotification && showInPageAlerts
|
|
321
|
-
pushInPageAlert(normalized.title, normalized.body);
|
|
320
|
+
if (!onLiveNotification && showInPageAlerts) {
|
|
321
|
+
pushInPageAlert(normalized.title, normalized.body || "You have a new notification.");
|
|
322
322
|
}
|
|
323
323
|
if (showSystem && typeof window !== "undefined" && Notification.permission === "granted") {
|
|
324
324
|
new Notification(normalized.title, {
|
package/dist/index.mjs
CHANGED
|
@@ -279,8 +279,8 @@ function PushProvider({
|
|
|
279
279
|
tag: payload.tag
|
|
280
280
|
};
|
|
281
281
|
onLiveNotification?.(normalized);
|
|
282
|
-
if (!onLiveNotification && showInPageAlerts
|
|
283
|
-
pushInPageAlert(normalized.title, normalized.body);
|
|
282
|
+
if (!onLiveNotification && showInPageAlerts) {
|
|
283
|
+
pushInPageAlert(normalized.title, normalized.body || "You have a new notification.");
|
|
284
284
|
}
|
|
285
285
|
if (showSystem && typeof window !== "undefined" && Notification.permission === "granted") {
|
|
286
286
|
new Notification(normalized.title, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sinlungtech/push-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Web Push notification client for Next.js — service worker registration, permission handling, and subscription management",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|