From e6a70c427ed1f346779b0c13d0d8551e04ce0310 Mon Sep 17 00:00:00 2001 From: Agent Date: Sun, 14 Jun 2026 09:56:43 -0400 Subject: [PATCH] fix: add terms/privacy checkbox to download modal, button disabled until checked --- public/assets/js/main.js | 9 ++++++++- views/layouts/main.php | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/public/assets/js/main.js b/public/assets/js/main.js index 4455f42..9f78165 100644 --- a/public/assets/js/main.js +++ b/public/assets/js/main.js @@ -244,11 +244,18 @@ function closeUserMenu(e) { } } +function toggleDownloadBtn() { + const cb = document.getElementById('agreeTerms'); + document.getElementById('downloadConfirmBtn').disabled = !cb.checked; +} + function showDownloadModal() { + const cb = document.getElementById('agreeTerms'); + cb.checked = false; + document.getElementById('downloadConfirmBtn').disabled = true; document.getElementById('downloadModal').style.display = 'flex'; document.getElementById('downloadProgressWrap').style.display = 'none'; document.getElementById('downloadModalFooter').style.display = 'flex'; - document.getElementById('downloadConfirmBtn').disabled = false; document.getElementById('downloadConfirmBtn').innerHTML = ' Download APK'; document.getElementById('downloadProgressBar').style.width = '0%'; document.getElementById('downloadPercent').textContent = '0%'; diff --git a/views/layouts/main.php b/views/layouts/main.php index 3cd3ca6..1d157b7 100755 --- a/views/layouts/main.php +++ b/views/layouts/main.php @@ -193,6 +193,11 @@ if (!isset($user) || $user === null) {
  • Storage for offline data cache
  • +