Skip to content

Commit

Permalink
Haptic
Browse files Browse the repository at this point in the history
  • Loading branch information
Adminbck committed Jun 24, 2024
1 parent c61def5 commit 3c35567
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,21 @@
<main>
This is the MAIN
<h1>Modals</h1>
<button onclick="Telegram.WebApp.showAlert('Hello World!');Telegram.WebApp.HapticFeedback.notificationOccurred('success');">Launch Alert</button></br>
<button onclick="Telegram.WebApp.showAlert('Hello World!');">Launch Alert</button></br>
<button onclick="showPopup();">Launch Popup</button></br>
<div onclick="Telegram.WebApp.HapticFeedback.notificationOccurred('success');">Click Me!</div>
<div onclick="Telegram.WebApp.HapticFeedback.notificationOccurred('success');">Success!</div></br>
<div onclick="Telegram.WebApp.HapticFeedback.notificationOccurred('warning');">Warning!</div></br>
<div onclick="Telegram.WebApp.HapticFeedback.notificationOccurred('error');">Error!</div></br>
<div onclick="Telegram.WebApp.HapticFeedback.notificationOccurred('light');">Light!</div></br>
<div onclick="Telegram.WebApp.HapticFeedback.notificationOccurred('medium');">Medium!</div></br>
<div onclick="Telegram.WebApp.HapticFeedback.notificationOccurred('heavy');">Heavy!</div></br>
<div onclick="Telegram.WebApp.HapticFeedback.notificationOccurred('rigid');">Rigid!</div></br>
<div onclick="Telegram.WebApp.HapticFeedback.notificationOccurred('soft');">Soft!</div></br>

<h1>Logs</h1>

<div id="InitData">InitData</div>
<div id="User">User</div>
<div id="Chat">Chat</div>

<h1>Server-Sent Events</h1>
<div hx-ext="sse" sse-connect="https://melendriu.homepc.it:8888/events" sse-swap="custom"></div>
Expand Down Expand Up @@ -94,9 +100,7 @@ <h1>Server-Sent Events</h1>
}, function(btn) {
if (btn === 'link') {
Telegram.WebApp.openLink('http://192.168.1.107:4000/');
} else {
Telegram.WebApp.HapticFeedback.notificationOccurred('success');
}
}
});
};

Expand Down

0 comments on commit 3c35567

Please sign in to comment.