added a warning when an Owl account is found. see #148

This commit is contained in:
mic 2024-10-15 18:07:25 +02:00
parent cbb598c032
commit fcb91cc9cb
8 changed files with 60 additions and 9 deletions

View file

@ -596,7 +596,11 @@
"description": ""
},
"prefs_OptionText_openai_comp_use_v1_info": {
"message": "Wenn aktiviert, wird das \"v1\"-Segment im Pfad der API-Aufrufe beibehalten, z.B. \"http://localhost:1234/v1/chat/completions\".",
"description": ""
"message": "Wenn aktiviert, wird das \"v1\"-Segment im Pfad der API-Aufrufe beibehalten, z.B. \"http://localhost:1234/v1/chat/completions\".",
"description": ""
},
"prefs_OptionText_owl_warning": {
"message": "Es scheint, dass mindestens eines Ihrer Konten das Add-on Eule für Exchange verwendet. Es gibt ein bekanntes Problem zwischen Thunderbird und Eule, das derzeit behoben wird. Derzeit können Sie ThunderAI beim Verfassen von E-Mails verwenden, jedoch nicht beim Lesen.",
"description": ""
}
}

View file

@ -602,5 +602,9 @@
"prefs_OptionText_openai_comp_use_v1_info": {
"message": "If checked, the \"v1\" segment in the path of API calls will be kept, like \"http://localhost:1234/v1/chat/completions\".",
"description": ""
},
"prefs_OptionText_owl_warning": {
"message": "It appears that at least one of your accounts is using the Owl for Exchange add-on. There is a known issue between Thunderbird and Owl, which is currently being addressed. At this time, you can use ThunderAI while composing emails, but not when reading them.",
"description": ""
}
}

View file

@ -596,7 +596,11 @@
"description": ""
},
"prefs_OptionText_openai_comp_use_v1_info": {
"message": "Si coché, le segment \"v1\" dans le chemin des appels API sera conservé, comme \"http://localhost:1234/v1/chat/completions\".",
"description": ""
"message": "Si coché, le segment \"v1\" dans le chemin des appels API sera conservé, comme \"http://localhost:1234/v1/chat/completions\".",
"description": ""
},
"prefs_OptionText_owl_warning": {
"message": "Il semble qu'au moins un de vos comptes utilise le module complémentaire Chouette pour Exchange. Il existe un problème connu entre Thunderbird et Chouette, qui est en cours de résolution. Pour le moment, vous pouvez utiliser ThunderAI lors de la rédaction d'e-mails, mais pas lors de leur lecture.",
"description": ""
}
}

View file

@ -596,7 +596,11 @@
"description": ""
},
"prefs_OptionText_openai_comp_use_v1_info": {
"message": "Se selezionato, il segmento \"v1\" nel percorso delle chiamate API verrà mantenuto, ad esempio \"http://localhost:1234/v1/chat/completions\".",
"description": ""
}
"message": "Se selezionato, il segmento \"v1\" nel percorso delle chiamate API verrà mantenuto, ad esempio \"http://localhost:1234/v1/chat/completions\".",
"description": ""
},
"prefs_OptionText_owl_warning": {
"message": "Sembra che almeno uno dei tuoi account stia utilizzando il componente aggiuntivo Gufo per Exchange. Esiste un problema noto tra Thunderbird e Gufo, che è attualmente in fase di risoluzione. Al momento, puoi utilizzare ThunderAI durante la composizione delle email, ma non durante la loro lettura.",
"description": ""
}
}

View file

@ -600,7 +600,11 @@
"description": ""
},
"prefs_OptionText_openai_comp_use_v1_info": {
"message": "Se marcado, o segmento \"v1\" no caminho das chamadas de API será mantido, como em \"http://localhost:1234/v1/chat/completions\".",
"description": ""
"message": "Se marcado, o segmento \"v1\" no caminho das chamadas de API será mantido, como em \"http://localhost:1234/v1/chat/completions\".",
"description": ""
},
"prefs_OptionText_owl_warning": {
"message": "Parece que pelo menos uma das suas contas está usando o complemento Coruja para Exchange. Existe um problema conhecido entre Thunderbird e Coruja, que está sendo resolvido no momento. Por enquanto, você pode usar o ThunderAI ao redigir e-mails, mas não ao lê-los.",
"description": ""
}
}

View file

@ -146,6 +146,26 @@ input.option-input[type="text"]{
font-style: italic;
}
#owl_warning{
display: none;
}
#owl_warning div{
color: white;
font-style: italic;
background-color: red;
border-radius: 4px;
padding: 3px;
font-weight: bold;
margin-bottom: 5px;
}
#owl_warning div a{
background-color: white;
padding:0px 3px;
border-radius: 4px;
}
@media (prefers-color-scheme: dark) {
body {
background-color: rgb(35, 34, 43);

View file

@ -8,6 +8,9 @@
<div id="miczRelNotes"><a href="mzta-release-notes.html">__MSG_prefs_OptionText_release_notes__</a></div>
<div id="miczStatusPage" class="conntype_chatgpt_web"><a href="https://micz.it/thunderbird-addon-thunderai/status/">__MSG_prefs_status_page__</a></div>
<table id="miczPrefs">
<tr id="owl_warning">
<td colspan="2"><div>__MSG_prefs_OptionText_owl_warning__ <a href="https://micz.it/thunderbird-addon-thunderai/owl/">__MSG_customPrompts_managePrompts_help__</a></div></td>
</tr>
<tr>
<td><span>__MSG_prefs_OptionText_chatgpt_win_text__</span></td>
<td>

View file

@ -205,6 +205,14 @@ function warn_OpenAIComp_HostEmpty() {
document.addEventListener('DOMContentLoaded', async () => {
await restoreOptions();
// show Owl warning
const accountList = await messenger.accounts.list(false);
if(accountList.some(account => account.type.toLowerCase().includes('owl'))) {
taLog.log('OWL detected, displaying the warning.');
document.getElementById('owl_warning').style.display = 'table-row';
}
i18n.updateDocument();
document.querySelectorAll(".option-input").forEach(element => {
element.addEventListener("change", saveOptions);