Skip to content

Commit

Permalink
Merge branch 'main' into game
Browse files Browse the repository at this point in the history
  • Loading branch information
Govorunb committed Jun 10, 2024
2 parents 7f4bd86 + b3e64ae commit 7e5074a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/www/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
body {
background-color: #111;
color: #fff;
overscroll-behavior: contain;
}

main {
Expand Down
8 changes: 8 additions & 0 deletions frontend/www/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<script src="https://extension-files.twitch.tv/helper/v1/twitch-ext.min.js"></script>

<% if (htmlWebpackPlugin.options.title=="Mobile View" ) { %>
<style>
.redeemable-item .redeemable-item-price-wrapper {
transform: translateY(0%);
}
</style>
<% } %>
</head>

<body>
Expand Down
19 changes: 19 additions & 0 deletions frontend/www/src/modules/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,25 @@ import { ebsFetch } from "../util/ebs";
import { getConfig } from "../util/config";
import { logToDiscord } from "../util/logger";

document.body.addEventListener("click", (e) => {
e.stopPropagation();
e.preventDefault();
});

document.body.addEventListener("dblclick", (e) => {
e.stopPropagation();
e.preventDefault();
});

document.addEventListener("auxclick", (e) => {
e.stopPropagation();
e.preventDefault();
});

/* Containers */
const $modalWrapper = document.getElementById("modal-wrapper")!;
const $modal = document.getElementById("modal-wrapper")!.getElementsByClassName("modal")[0]!;
const $modalInsideWrapper = $modal.getElementsByClassName("modal-inside-wrapper")[0]!;

/* Descriptors */
const $modalTitle = document.getElementById("modal-title")!;
Expand Down Expand Up @@ -97,6 +113,9 @@ export async function openModal(redeem: Redeem | null) {
$modalPrice.textContent = redeem.price.toString();
$modalImage.src = redeem.image;

// scroll to top of modal
$modalInsideWrapper.scrollTop = 0;

setTimeout(() => $modal.classList.add("active-modal"), 10);

hideProcessingModal();
Expand Down

0 comments on commit 7e5074a

Please sign in to comment.