()
| 896 | } |
| 897 | |
| 898 | function logout() { |
| 899 | localStorage.removeItem('gcli2api_auth_token'); |
| 900 | AppState.authToken = ''; |
| 901 | document.getElementById('loginSection').classList.remove('hidden'); |
| 902 | document.getElementById('mainSection').classList.add('hidden'); |
| 903 | showStatus('已退出登录', 'info'); |
| 904 | const passwordInput = document.getElementById('loginPassword'); |
| 905 | if (passwordInput) passwordInput.value = ''; |
| 906 | } |
| 907 | |
| 908 | function handlePasswordEnter(event) { |
| 909 | if (event.key === 'Enter') login(); |
nothing calls this directly
no test coverage detected