Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -178,9 +178,6 @@ button.selected::after{
|
|
178 |
z-index: 999;
|
179 |
flex-direction: column;
|
180 |
}
|
181 |
-
#popup-overlay.show {
|
182 |
-
display: flex !important;
|
183 |
-
}
|
184 |
#popup-box {
|
185 |
background: white;
|
186 |
padding: 20px;
|
@@ -276,9 +273,9 @@ with demo:
|
|
276 |
)
|
277 |
|
278 |
###############################
|
279 |
-
# Popup HTML
|
280 |
-
|
281 |
-
<div id="popup-overlay">
|
282 |
<div id="popup-box">
|
283 |
<h3>ℹ️ Notice</h3>
|
284 |
<p>Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.<br>
|
@@ -287,9 +284,9 @@ with demo:
|
|
287 |
<button id="popup-button">OK</button>
|
288 |
</div>
|
289 |
</div>
|
290 |
-
"""
|
291 |
|
292 |
-
# JavaScript to show
|
293 |
gr.HTML("""
|
294 |
<script>
|
295 |
window.addEventListener('DOMContentLoaded', function () {
|
@@ -297,12 +294,12 @@ with demo:
|
|
297 |
const button = document.getElementById("popup-button");
|
298 |
|
299 |
if (popup) {
|
300 |
-
popup.
|
301 |
}
|
302 |
|
303 |
if (button) {
|
304 |
button.onclick = () => {
|
305 |
-
popup.
|
306 |
};
|
307 |
}
|
308 |
});
|
|
|
178 |
z-index: 999;
|
179 |
flex-direction: column;
|
180 |
}
|
|
|
|
|
|
|
181 |
#popup-box {
|
182 |
background: white;
|
183 |
padding: 20px;
|
|
|
273 |
)
|
274 |
|
275 |
###############################
|
276 |
+
# Popup HTML
|
277 |
+
gr.HTML("""
|
278 |
+
<div id="popup-overlay" style="display: none;">
|
279 |
<div id="popup-box">
|
280 |
<h3>ℹ️ Notice</h3>
|
281 |
<p>Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.<br>
|
|
|
284 |
<button id="popup-button">OK</button>
|
285 |
</div>
|
286 |
</div>
|
287 |
+
""")
|
288 |
|
289 |
+
# Inline JavaScript to show on load, hide on click
|
290 |
gr.HTML("""
|
291 |
<script>
|
292 |
window.addEventListener('DOMContentLoaded', function () {
|
|
|
294 |
const button = document.getElementById("popup-button");
|
295 |
|
296 |
if (popup) {
|
297 |
+
popup.style.display = "flex"; // Show popup explicitly
|
298 |
}
|
299 |
|
300 |
if (button) {
|
301 |
button.onclick = () => {
|
302 |
+
popup.style.display = "none"; // Hide popup on button click
|
303 |
};
|
304 |
}
|
305 |
});
|