Add account selection info for autotagging feature and update visibility logic. see #327
This commit is contained in:
parent
93d30b6a02
commit
d7afad3b71
4 changed files with 16 additions and 1 deletions
|
|
@ -1123,6 +1123,10 @@
|
||||||
"message": "If checked, the AI will automatically add tags to newly received emails.",
|
"message": "If checked, the AI will automatically add tags to newly received emails.",
|
||||||
"description": ""
|
"description": ""
|
||||||
},
|
},
|
||||||
|
"prefs_OptionText_add_tags_auto_Info2": {
|
||||||
|
"message": "Choose which account to activate this feature for at the bottom of this page.",
|
||||||
|
"description": ""
|
||||||
|
},
|
||||||
"prefs_OptionText_add_tags_auto_force_existing": {
|
"prefs_OptionText_add_tags_auto_force_existing": {
|
||||||
"message": "Force existing tags when autotagging",
|
"message": "Force existing tags when autotagging",
|
||||||
"description": ""
|
"description": ""
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,10 @@
|
||||||
width: 30em;
|
width: 30em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#account_selector_container{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
#account_selector_checkboxes{
|
#account_selector_checkboxes{
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: 1px solid gray;
|
border: 1px solid gray;
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,8 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="add_tags_tr">
|
<tr class="add_tags_tr">
|
||||||
<td><span>__MSG_prefs_OptionText_add_tags_auto__</span></td>
|
<td><span>__MSG_prefs_OptionText_add_tags_auto__</span>
|
||||||
|
<span class="infoline" id="add_tags_auto_infoline"><br>__MSG_prefs_OptionText_add_tags_auto_Info2__</span></td>
|
||||||
<td>
|
<td>
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" id="add_tags_auto" name="add_tags_auto" class="option-input" />
|
<input type="checkbox" id="add_tags_auto" name="add_tags_auto" class="option-input" />
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,18 @@ 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');
|
let add_tags_auto_only_inbox_tr = document.getElementById('add_tags_auto_only_inbox_tr');
|
||||||
|
let account_selector_container = document.getElementById('account_selector_container');
|
||||||
|
let add_tags_auto_infoline = document.getElementById('add_tags_auto_infoline');
|
||||||
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';
|
||||||
add_tags_auto_only_inbox_tr.style.display = event.target.checked ? 'table-row' : 'none';
|
add_tags_auto_only_inbox_tr.style.display = event.target.checked ? 'table-row' : 'none';
|
||||||
|
account_selector_container.style.display = event.target.checked ? 'block' : 'none';
|
||||||
|
add_tags_auto_infoline.style.display = event.target.checked ? 'inline' : 'none';
|
||||||
});
|
});
|
||||||
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';
|
add_tags_auto_only_inbox_tr.style.display = add_tags_auto_el.checked ? 'table-row' : 'none';
|
||||||
|
account_selector_container.style.display = add_tags_auto_el.checked ? 'block' : 'none';
|
||||||
|
add_tags_auto_infoline.style.display = add_tags_auto_el.checked ? 'inline' : '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