diff --git a/worklenz-frontend/index.html b/worklenz-frontend/index.html index 989d4aa0..6d44efb5 100644 --- a/worklenz-frontend/index.html +++ b/worklenz-frontend/index.html @@ -43,33 +43,44 @@ // Initialize analytics initGoogleAnalytics(); - // Show privacy notice only for open source version - if (window.location.hostname !== 'worklenz.com' && - window.location.hostname !== 'app.worklenz.com' && - !localStorage.getItem('privacyNoticeShown')) { + // Function to show privacy notice + function showPrivacyNotice() { const notice = document.createElement('div'); notice.style.cssText = ` position: fixed; - bottom: 20px; - right: 20px; - background: #fff; - padding: 20px; - border-radius: 8px; - box-shadow: 0 2px 10px rgba(0,0,0,0.1); + bottom: 16px; + right: 16px; + background: #222; + color: #f5f5f5; + padding: 12px 16px 10px 16px; + border-radius: 7px; + box-shadow: 0 2px 8px rgba(0,0,0,0.18); z-index: 1000; - max-width: 400px; + max-width: 320px; font-family: Inter, sans-serif; + border: 1px solid #333; + font-size: 0.95rem; `; notice.innerHTML = ` -

Analytics Notice

-

This open source project uses Google Analytics to understand usage patterns and improve the application.

-

We only collect anonymous usage data. No personal information is tracked.

-
- -
+
Analytics Notice
+
This app uses Google Analytics for anonymous usage stats. No personal data is tracked.
+ `; document.body.appendChild(notice); } + + // Wait for DOM to be ready + document.addEventListener('DOMContentLoaded', function() { + // Check if we should show the notice + const isProduction = window.location.hostname === 'worklenz.com' || + window.location.hostname === 'app.worklenz.com'; + const noticeShown = localStorage.getItem('privacyNoticeShown') === 'true'; + + // Show notice if not in production and not shown before + if (!isProduction && !noticeShown) { + showPrivacyNotice(); + } + });