Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Upload index.html
Browse files- static/index.html +9 -8
    	
        static/index.html
    CHANGED
    
    | @@ -209,8 +209,8 @@ | |
| 209 | 
             
                </div>
         | 
| 210 |  | 
| 211 | 
             
                <script>
         | 
| 212 | 
            -
                    // Global variables
         | 
| 213 | 
            -
                    let userApiKey =  | 
| 214 | 
             
                    let isApiKeyValid = false;
         | 
| 215 |  | 
| 216 | 
             
                    // DOM elements
         | 
| @@ -229,12 +229,13 @@ | |
| 229 | 
             
                    const keyError = document.getElementById('keyError');
         | 
| 230 | 
             
                    const mainApp = document.getElementById('mainApp');
         | 
| 231 |  | 
| 232 | 
            -
                    // Initialize on page load
         | 
| 233 | 
             
                    document.addEventListener('DOMContentLoaded', () => {
         | 
| 234 | 
            -
                         | 
| 235 | 
            -
             | 
| 236 | 
            -
             | 
| 237 | 
            -
                         | 
|  | |
| 238 | 
             
                    });
         | 
| 239 |  | 
| 240 | 
             
                    // API Key validation
         | 
| @@ -272,7 +273,7 @@ | |
| 272 | 
             
                                console.log('✅ API key validated successfully');
         | 
| 273 | 
             
                                showKeyStatus('valid');
         | 
| 274 | 
             
                                userApiKey = apiKey;
         | 
| 275 | 
            -
                                localStorage.setItem | 
| 276 | 
             
                                isApiKeyValid = true;
         | 
| 277 | 
             
                                enableMainApp();
         | 
| 278 | 
             
                                return true;
         | 
|  | |
| 209 | 
             
                </div>
         | 
| 210 |  | 
| 211 | 
             
                <script>
         | 
| 212 | 
            +
                    // Global variables - NO localStorage persistence for security
         | 
| 213 | 
            +
                    let userApiKey = '';
         | 
| 214 | 
             
                    let isApiKeyValid = false;
         | 
| 215 |  | 
| 216 | 
             
                    // DOM elements
         | 
|  | |
| 229 | 
             
                    const keyError = document.getElementById('keyError');
         | 
| 230 | 
             
                    const mainApp = document.getElementById('mainApp');
         | 
| 231 |  | 
| 232 | 
            +
                    // Initialize on page load - no pre-filling for security
         | 
| 233 | 
             
                    document.addEventListener('DOMContentLoaded', () => {
         | 
| 234 | 
            +
                        // Always start with empty API key field
         | 
| 235 | 
            +
                        apiKeyInput.value = '';
         | 
| 236 | 
            +
                        userApiKey = '';
         | 
| 237 | 
            +
                        isApiKeyValid = false;
         | 
| 238 | 
            +
                        disableMainApp();
         | 
| 239 | 
             
                    });
         | 
| 240 |  | 
| 241 | 
             
                    // API Key validation
         | 
|  | |
| 273 | 
             
                                console.log('✅ API key validated successfully');
         | 
| 274 | 
             
                                showKeyStatus('valid');
         | 
| 275 | 
             
                                userApiKey = apiKey;
         | 
| 276 | 
            +
                                // NO localStorage.setItem for security - key only stored in memory
         | 
| 277 | 
             
                                isApiKeyValid = true;
         | 
| 278 | 
             
                                enableMainApp();
         | 
| 279 | 
             
                                return true;
         |