-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Extend WebPushMessage with the custom settings (#20304)
Add an API to set custom options as described in https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification#parameters Fixes #20285
- Loading branch information
Showing
6 changed files
with
109 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
flow-tests/test-webpush/src/main/java/com/vaadin/flow/webpush/WebPushAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.vaadin.flow.webpush; | ||
|
||
import java.io.Serializable; | ||
|
||
public record WebPushAction(String action, String title, String icon) implements Serializable { | ||
} |
20 changes: 20 additions & 0 deletions
20
flow-tests/test-webpush/src/main/java/com/vaadin/flow/webpush/WebPushOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.vaadin.flow.webpush; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
public record WebPushOptions(List<WebPushAction> actions, | ||
String badge, | ||
String body, | ||
Serializable data, | ||
String dir, | ||
String icon, | ||
String image, | ||
String lang, | ||
boolean renotify, | ||
boolean requireInteraction, | ||
boolean silent, | ||
String tag, | ||
long timestamp, | ||
List<Integer> vibrate) implements Serializable { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters