Add remove key button for Azure TTS

This commit is contained in:
Cohee
2024-08-13 20:33:59 +03:00
parent 1883095e39
commit f17df7d9ad
2 changed files with 16 additions and 4 deletions

View File

@ -83,7 +83,7 @@ class OpenAICompatibleTtsProvider {
customButtons: [{
text: 'Remove Key',
appendAtEnd: true,
result: POPUP_RESULT.CANCELLED,
result: POPUP_RESULT.NEGATIVE,
action: async () => {
await writeSecret(SECRET_KEYS.CUSTOM_OPENAI_TTS, '');
$('#openai_compatible_tts_key').toggleClass('success', secret_state[SECRET_KEYS.CUSTOM_OPENAI_TTS]);
@ -93,7 +93,7 @@ class OpenAICompatibleTtsProvider {
}],
});
if (key == false || key == '' || key == null) {
if (key == false || key == '') {
return;
}