add hyprland warning when using linux. fixes #318
This commit is contained in:
parent
b3bb3627cb
commit
3011def9f1
3 changed files with 19 additions and 5 deletions
|
|
@ -174,7 +174,11 @@ input.option-input[type="text"]{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#owl_warning div{
|
#hyprland_warning{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning{
|
||||||
color: white;
|
color: white;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
|
@ -184,7 +188,7 @@ input.option-input[type="text"]{
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#owl_warning div a{
|
.warning a{
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding:0px 3px;
|
padding:0px 3px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,13 @@
|
||||||
<td colspan="2"><div>__MSG_prefs_SurveyLinkText__<br><a href="https://forms.gle/1qK2wcbuhaRzhwyt9">__MSG_prefs_SurveyLinkText2__</a></div></td>
|
<td colspan="2"><div>__MSG_prefs_SurveyLinkText__<br><a href="https://forms.gle/1qK2wcbuhaRzhwyt9">__MSG_prefs_SurveyLinkText2__</a></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="owl_warning">
|
<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>
|
<td colspan="2"><div class="warning">__MSG_prefs_OptionText_owl_warning__ <a href="https://micz.it/thunderbird-addon-thunderai/owl/">__MSG_customPrompts_managePrompts_help__</a></div></td>
|
||||||
|
</tr>
|
||||||
|
<tr id="hyprland_warning">
|
||||||
|
<td colspan="2" style="text-align:center;" class="warning"><b>Set height and width to 0 if you're using hyprland!</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span>__MSG_prefs_OptionText_chatgpt_win_text__</span></td>
|
<td><span>__MSG_prefs_OptionText_chatgpt_win_text__</span>
|
||||||
<td>
|
<td>
|
||||||
<label>
|
<label>
|
||||||
<span class="dims_label">__MSG_prefs_OptionText_chatgpt_win_height__</span>
|
<span class="dims_label">__MSG_prefs_OptionText_chatgpt_win_height__</span>
|
||||||
|
|
|
||||||
|
|
@ -455,7 +455,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
document.getElementById("openai_comp_host").addEventListener("change", warn_OpenAIComp_HostEmpty);
|
document.getElementById("openai_comp_host").addEventListener("change", warn_OpenAIComp_HostEmpty);
|
||||||
document.getElementById("google_gemini_api_key").addEventListener("change", warn_GoogleGemini_APIKeyEmpty);
|
document.getElementById("google_gemini_api_key").addEventListener("change", warn_GoogleGemini_APIKeyEmpty);
|
||||||
|
|
||||||
let prefs = await browser.storage.sync.get({chatgpt_model: '', ollama_model: '', openai_comp_model: '', google_gemini_model: ''});
|
let prefs = await browser.storage.sync.get({chatgpt_model: '', ollama_model: '', openai_comp_model: '', google_gemini_model: '', chatgpt_win_height: 0, chatgpt_win_width: 0 });
|
||||||
|
|
||||||
// OpenAI API ChatGPT model fetching
|
// OpenAI API ChatGPT model fetching
|
||||||
let select_chatgpt_model = document.getElementById('chatgpt_model');
|
let select_chatgpt_model = document.getElementById('chatgpt_model');
|
||||||
|
|
@ -683,4 +683,11 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
browser.tabs.create({ url: 'https://chatgpt.com/' });
|
browser.tabs.create({ url: 'https://chatgpt.com/' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
browser.runtime.getPlatformInfo().then(info => {
|
||||||
|
taLog.log("OS: " + info.os);
|
||||||
|
if ((info.os === "linux")&&(prefs.chatgpt_win_height!=0)&&(prefs.chatgpt_win_width!=0)){
|
||||||
|
document.getElementById('hyprland_warning').style.display = 'table-row';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}, { once: true });
|
}, { once: true });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue