Skip to content

Commit

Permalink
fix: update delete email key visibility logic in Menu class (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakshpokar authored Nov 22, 2024
1 parent 2cd48c9 commit bfd5524
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -1279,11 +1279,9 @@ class Menu {
'input',
function (e) {
if (e.target.value) {
document
.getElementById('delete_email_key')
.classList.remove('hidden');
document.getElementById('delete_email_key').style = '';
} else {
document.getElementById('delete_email_key').classList.add('hidden');
document.getElementById('delete_email_key').style = 'display: none';
}
},
]);
Expand Down Expand Up @@ -1453,6 +1451,10 @@ class Menu {
.getElementById(`claude_auth_key_container`)
.classList.add('hidden');

if (!constants.emailAuthKey) {
document.getElementById('delete_email_key').style = 'display: none';
}

// skill level other
if (constants.skillLevel == 'other') {
document
Expand Down Expand Up @@ -1889,7 +1891,7 @@ class ChatLLM {
function (e) {
document.getElementById('email_auth_key').value = '';
document.getElementById('email_auth_key').disabled = false;
document.getElementById('delete_email_key').classList.add('hidden');
document.getElementById('delete_email_key').style = 'display: none';
constants.clientToken = '';
document.getElementById('verify').classList.remove('hidden');
},
Expand Down

0 comments on commit bfd5524

Please sign in to comment.