diff options
author | Miodec <[email protected]> | 2024-06-27 13:19:56 +0200 |
---|---|---|
committer | Miodec <[email protected]> | 2024-06-27 13:20:06 +0200 |
commit | 00d73be17f0d3a9ee97ed4277b6f1658a2071a7c (patch) | |
tree | d71fadc7d8ded26f5ed038c1a2c993cde7af9246 | |
parent | 5da8c6ed8c9b1198279af705e2fd434cc2e7dbb4 (diff) | |
download | monkeytype-00d73be17f0d3a9ee97ed4277b6f1658a2071a7c.tar.gz monkeytype-00d73be17f0d3a9ee97ed4277b6f1658a2071a7c.zip |
impr(dev options modal): add button to show test notifications
!nuf
-rw-r--r-- | frontend/src/html/popups.html | 1 | ||||
-rw-r--r-- | frontend/src/ts/modals/dev-options.ts | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/frontend/src/html/popups.html b/frontend/src/html/popups.html index 67cc9a165..21e399bf5 100644 --- a/frontend/src/html/popups.html +++ b/frontend/src/html/popups.html @@ -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> diff --git a/frontend/src/ts/modals/dev-options.ts b/frontend/src/ts/modals/dev-options.ts index 65166ccf2..4e8f7ca49 100644 --- a/frontend/src/ts/modals/dev-options.ts +++ b/frontend/src/ts/modals/dev-options.ts @@ -15,6 +15,20 @@ async function setup(modalEl: HTMLElement): Promise<void> { 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", () => { mediaQueryDebugLevel++; |