add_tags_auto_only_inbox option added. see #237
This commit is contained in:
parent
c8f6729366
commit
eb3dbc2c73
5 changed files with 22 additions and 4 deletions
|
|
@ -1034,5 +1034,13 @@
|
||||||
"prefs_OptionText_add_tags_auto_force_existing_Info": {
|
"prefs_OptionText_add_tags_auto_force_existing_Info": {
|
||||||
"message": "If checked, the AI will add only existing tags to newly received emails, and won't create new tags.",
|
"message": "If checked, the AI will add only existing tags to newly received emails, and won't create new tags.",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
},
|
||||||
|
"prefs_OptionText_add_tags_auto_only_inbox": {
|
||||||
|
"message": "Only add tags to inbox emails",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
|
"prefs_OptionText_add_tags_auto_only_inbox_Info": {
|
||||||
|
"message": "If checked, the AI will only add tags to emails received in the inbox folder.",
|
||||||
|
"description": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -48,5 +48,6 @@ export const prefs_default = {
|
||||||
add_tags_force_lang: true,
|
add_tags_force_lang: true,
|
||||||
add_tags_auto: false,
|
add_tags_auto: false,
|
||||||
add_tags_auto_force_existing: false,
|
add_tags_auto_force_existing: false,
|
||||||
|
add_tags_auto_only_inbox: true,
|
||||||
get_calendar_event: true,
|
get_calendar_event: true,
|
||||||
}
|
}
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
#addtags_info_additional_statements, #add_tags_auto_force_existing_tr{
|
#addtags_info_additional_statements, #add_tags_auto_force_existing_tr, #add_tags_auto_only_inbox_tr{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,15 @@
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr class="add_tags_tr" id="add_tags_auto_only_inbox_tr">
|
||||||
|
<td><span>__MSG_prefs_OptionText_add_tags_auto_only_inbox__</span></td>
|
||||||
|
<td>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" id="add_tags_auto_only_inbox" name="add_tags_auto_only_inbox" class="option-input" />
|
||||||
|
__MSG_prefs_OptionText_add_tags_auto_only_inbox_Info__
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div id="addtags_prompt_container">
|
<div id="addtags_prompt_container">
|
||||||
<span class="section_title">__MSG_AddTags_prompt_text_title__</span><span id="addtags_prompt_unsaved" class="unsaved hidden"> __MSG_customPrompts_unsaved_changes__</span>
|
<span class="section_title">__MSG_AddTags_prompt_text_title__</span><span id="addtags_prompt_unsaved" class="unsaved hidden"> __MSG_customPrompts_unsaved_changes__</span>
|
||||||
|
|
|
||||||
|
|
@ -55,13 +55,13 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||||
|
|
||||||
let add_tags_auto_el = document.getElementById('add_tags_auto');
|
let add_tags_auto_el = document.getElementById('add_tags_auto');
|
||||||
let add_tags_auto_force_existing_tr = document.getElementById('add_tags_auto_force_existing_tr');
|
let add_tags_auto_force_existing_tr = document.getElementById('add_tags_auto_force_existing_tr');
|
||||||
|
let add_tags_auto_only_inbox_tr = document.getElementById('add_tags_auto_only_inbox_tr');
|
||||||
add_tags_auto_el.addEventListener('click', (event) => {
|
add_tags_auto_el.addEventListener('click', (event) => {
|
||||||
add_tags_auto_force_existing_tr.style.display = event.target.checked ? 'table-row' : 'none';
|
add_tags_auto_force_existing_tr.style.display = event.target.checked ? 'table-row' : 'none';
|
||||||
if(!event.target.checked){
|
add_tags_auto_only_inbox_tr.style.display = event.target.checked ? 'table-row' : 'none';
|
||||||
document.getElementById('add_tags_auto_force_existing').checked = false;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
add_tags_auto_force_existing_tr.style.display = add_tags_auto_el.checked ? 'table-row' : 'none';
|
add_tags_auto_force_existing_tr.style.display = add_tags_auto_el.checked ? 'table-row' : 'none';
|
||||||
|
add_tags_auto_only_inbox_tr.style.display = add_tags_auto_el.checked ? 'table-row' : 'none';
|
||||||
|
|
||||||
addtags_reset_btn.addEventListener('click', () => {
|
addtags_reset_btn.addEventListener('click', () => {
|
||||||
addtags_textarea.value = browser.i18n.getMessage('prompt_add_tags_full_text');
|
addtags_textarea.value = browser.i18n.getMessage('prompt_add_tags_full_text');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue