added more button actions

This commit is contained in:
cpu
2025-03-28 03:54:36 +01:00
parent 75b8dc5d15
commit 96aeb22210
2 changed files with 122 additions and 23 deletions

3
sw.js
View File

@@ -184,7 +184,8 @@ self.addEventListener('push', event => {
const messagePayload = {
type: 'flic-action', // Custom message type
action: pushData.data.action, // e.g., 'SingleClick', 'DoubleClick', 'Hold'
button: pushData.data.button // e.g., the button serial
button: pushData.data.button, // e.g., the button name
timestamp: pushData.data.timestamp // e.g., the timestamp of the action
};
// Send message to all open PWA windows controlled by this SW