mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-23 05:56:10 +08:00
impr(dev options modal): add button to show test notifications
!nuf
This commit is contained in:
parent
5da8c6ed8c
commit
00d73be17f
2 changed files with 15 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
<div class="title">Dev options</div>
|
||||
<button class="generateData">generate data</button>
|
||||
<button class="toggleMediaQueryDebug">toggle media query debug</button>
|
||||
<button class="showTestNotifications">show test notifications</button>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
|
|
|
@ -14,6 +14,20 @@ async function setup(modalEl: HTMLElement): Promise<void> {
|
|||
modalEl.querySelector(".generateData")?.addEventListener("click", () => {
|
||||
showPopup("devGenerateData");
|
||||
});
|
||||
modalEl
|
||||
.querySelector(".showTestNotifications")
|
||||
?.addEventListener("click", () => {
|
||||
Notifications.add("This is a test", 1, {
|
||||
duration: 0,
|
||||
});
|
||||
Notifications.add("This is a test", 0, {
|
||||
duration: 0,
|
||||
});
|
||||
Notifications.add("This is a test", -1, {
|
||||
duration: 0,
|
||||
});
|
||||
void modal.hide();
|
||||
});
|
||||
modalEl
|
||||
.querySelector(".toggleMediaQueryDebug")
|
||||
?.addEventListener("click", () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue