dev: widget test

This commit is contained in:
2024-07-19 22:08:18 +08:00
parent 38cbb41bd1
commit dfb3e0eb53
6 changed files with 68 additions and 6 deletions

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Widget Example</title>
</head>
<body>
<h1>Example</h1>
<script src="./widget.js"></script>
</body>
</html>

View File

@@ -0,0 +1,8 @@
// make this js file as a module
import { listen } from "@tauri-apps/api/event";
listen('heart-rate', event => {
console.log('Heart rate:', event.payload)
})
export {}