move add tags force existing option and update label. see #391

This commit is contained in:
mic 2025-05-25 22:09:03 +02:00
parent bbf8eb7c5e
commit 16cabb125f
4 changed files with 11 additions and 14 deletions

View file

@ -1116,7 +1116,7 @@
"description": "" "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 or using the context menu",
"description": "" "description": ""
}, },
"prefs_OptionText_add_tags_auto_force_existing_Info": { "prefs_OptionText_add_tags_auto_force_existing_Info": {

View file

@ -43,7 +43,7 @@
justify-content: space-between; justify-content: space-between;
} }
#addtags_info_additional_statements, #add_tags_auto_force_existing_tr, #add_tags_auto_only_inbox_tr{ #addtags_info_additional_statements, #add_tags_auto_only_inbox_tr{
display: none; display: none;
} }

View file

@ -59,15 +59,6 @@
</label> </label>
</td> </td>
</tr> </tr>
<tr class="add_tags_tr add_tags_auto" id="add_tags_auto_force_existing_tr">
<td><span>__MSG_prefs_OptionText_add_tags_auto_force_existing__</span></td>
<td>
<label>
<input type="checkbox" id="add_tags_auto_force_existing" name="add_tags_auto_force_existing" class="option-input" />
__MSG_prefs_OptionText_add_tags_auto_force_existing_Info__
</label>
</td>
</tr>
<tr class="add_tags_tr add_tags_auto" id="add_tags_auto_only_inbox_tr"> <tr class="add_tags_tr add_tags_auto" id="add_tags_auto_only_inbox_tr">
<td><span>__MSG_prefs_OptionText_add_tags_auto_only_inbox__</span></td> <td><span>__MSG_prefs_OptionText_add_tags_auto_only_inbox__</span></td>
<td> <td>
@ -86,6 +77,15 @@
</label> </label>
</td> </td>
</tr> </tr>
<tr class="add_tags_tr">
<td><span>__MSG_prefs_OptionText_add_tags_auto_force_existing__</span></td>
<td>
<label>
<input type="checkbox" id="add_tags_auto_force_existing" name="add_tags_auto_force_existing" class="option-input" />
__MSG_prefs_OptionText_add_tags_auto_force_existing_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>

View file

@ -54,17 +54,14 @@ 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_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 account_selector_container = document.getElementById('account_selector_container');
let add_tags_auto_infoline = document.getElementById('add_tags_auto_infoline'); 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_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'; account_selector_container.style.display = event.target.checked ? 'block' : 'none';
add_tags_auto_infoline.style.display = event.target.checked ? 'inline' : '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_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'; 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'; add_tags_auto_infoline.style.display = add_tags_auto_el.checked ? 'inline' : 'none';