diff --git a/backend/main.py b/backend/main.py index 686057b..5d57561 100644 --- a/backend/main.py +++ b/backend/main.py @@ -193,6 +193,7 @@ app.add_middleware( # When DEMO_MODE=true, enables rate limiting and other demo protections # Add additional demo restrictions here as needed (e.g., disable certain features) DEMO_MODE = os.getenv('DEMO_MODE', 'false').lower() in ('true', '1', 'yes') +ALREADY_DONATED = os.getenv('ALREADY_DONATED', 'false').lower() in ('true', '1', 'yes') if DEMO_MODE: # Enable rate limiting for demo deployments @@ -382,6 +383,7 @@ async def get_config(): "version": config['app']['version'], "searchEnabled": config['search']['enabled'], "demoMode": DEMO_MODE, # Expose demo mode flag to frontend + "alreadyDonated": ALREADY_DONATED, # Hide support buttons if true "authentication": { "enabled": config.get('authentication', {}).get('enabled', False) } diff --git a/frontend/app.js b/frontend/app.js index 52ce08b..fda8b46 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -129,6 +129,7 @@ function noteApp() { appVersion: '0.0.0', authEnabled: false, demoMode: false, + alreadyDonated: false, notes: [], currentNote: '', currentNoteName: '', @@ -696,6 +697,7 @@ function noteApp() { this.appVersion = config.version || '0.0.0'; this.authEnabled = config.authentication?.enabled || false; this.demoMode = config.demoMode || false; + this.alreadyDonated = config.alreadyDonated || false; } catch (error) { console.error('Failed to load config:', error); } diff --git a/frontend/index.html b/frontend/index.html index e9f2a9b..78d3c12 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1860,8 +1860,8 @@ > notediscovery.com - -