resolve rebase conflicts
This commit is contained in:
parent
12ba436f4d
commit
84a65acd8f
5 changed files with 50 additions and 1 deletions
|
|
@ -1195,6 +1195,18 @@
|
|||
"message": "Manage spam filter settings",
|
||||
"description": ""
|
||||
},
|
||||
"prefs_OptionText_summarize": {
|
||||
"message": "Summarize mail",
|
||||
"description": ""
|
||||
},
|
||||
"prefs_OptionText_summarize_Info": {
|
||||
"message": "If checked, adds an option to context menu to summarize mail.",
|
||||
"description": ""
|
||||
},
|
||||
"prefs_OptionText_btnManageSummarizeInfo": {
|
||||
"message": "Manage summarize settings",
|
||||
"description": ""
|
||||
},
|
||||
"SpamFilter_PageTitle": {
|
||||
"message": "Manage Spam Filter Settings",
|
||||
"description": ""
|
||||
|
|
@ -1295,6 +1307,10 @@
|
|||
"message": "Analyze for spam",
|
||||
"description": ""
|
||||
},
|
||||
"context_menu_mzta-summary": {
|
||||
"message": "Summarize",
|
||||
"description": ""
|
||||
},
|
||||
"prefs_OptionText_add_tags_context_menu": {
|
||||
"message": "Show the \"Add tags\" context menu item",
|
||||
"description": ""
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@ export const getMenuContextDisplay = () => 'message_display_action_menu';
|
|||
|
||||
export const contextMenuID_AddTags = 'mzta-add-tags';
|
||||
export const contextMenuID_Spamfilter = 'mzta-spamfilter';
|
||||
export const contextMenuID_Summary = 'mzta-summary';
|
||||
export const contextMenuIconsPath = {
|
||||
[contextMenuID_AddTags]: 'moz-extension:images/autotags.png',
|
||||
[contextMenuID_Spamfilter]: 'moz-extension:images/spamfilter.png',
|
||||
// [contextMenuID_Summary]: 'moz-extension:images/summary.png',
|
||||
};
|
||||
|
||||
export function getLanguageDisplayName(languageCode) {
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ import {
|
|||
extractJsonObject,
|
||||
contextMenuID_AddTags,
|
||||
contextMenuID_Spamfilter,
|
||||
contextMenuID_Summary,
|
||||
contextMenuIconsPath,
|
||||
sanitizeChatGPTModelData,
|
||||
sanitizeChatGPTWebCustomData,
|
||||
|
|
@ -802,10 +803,12 @@ async function reload_pref_init(){
|
|||
add_tags_auto_force_existing: prefs_default.add_tags_auto_force_existing,
|
||||
add_tags_auto_only_inbox: prefs_default.add_tags_auto_only_inbox,
|
||||
spamfilter: prefs_default.spamfilter,
|
||||
summarize: prefs_default.summarize,
|
||||
spamfilter_threshold: prefs_default.spamfilter_threshold,
|
||||
dynamic_menu_force_enter: prefs_default.dynamic_menu_force_enter,
|
||||
add_tags_context_menu: prefs_default.add_tags_context_menu,
|
||||
spamfilter_context_menu: prefs_default.spamfilter_context_menu,
|
||||
summarize_context_menu: prefs_default.summarize_context_menu,
|
||||
...getDynamicSettingsDefaults(['use_specific_integration', 'connection_type'])
|
||||
});
|
||||
_process_incoming = prefs_init.add_tags_auto || prefs_init.spamfilter;
|
||||
|
|
@ -917,6 +920,15 @@ function setupStorageChangeListener() {
|
|||
removeContextMenu(contextMenuID_Spamfilter);
|
||||
}
|
||||
}
|
||||
if (changes.summarize) {
|
||||
if (changes.summarize.newValue){
|
||||
if (prefs_init.summarize_context_menu){
|
||||
addContextMenu(contextMenuID_Summary);
|
||||
}
|
||||
} else {
|
||||
removeContextMenu(contextMenuID_Summary);
|
||||
}
|
||||
}
|
||||
reload_pref_init();
|
||||
}
|
||||
});
|
||||
|
|
@ -977,6 +989,12 @@ function addContextMenuItems() {
|
|||
if(prefs_init.spamfilter && prefs_init.spamfilter_context_menu && checkAPIIntegration(prefs_init.connection_type, prefs_init.spamfilter_use_specific_integration,prefs_init.spamfilter_connection_type)){
|
||||
addContextMenu(contextMenuID_Spamfilter);
|
||||
}
|
||||
|
||||
// Add Context menu: Summary
|
||||
if(prefs_init.summarize && prefs_init.summarize_context_menu && checkAPIIntegration(prefs_init.connection_type && prefs_init.summarize_use_specific_integration, prefs_init.summarize_connection_type)) {
|
||||
console.log("adding summary to context menu")
|
||||
addContextMenu(contextMenuID_Summary);
|
||||
}
|
||||
}
|
||||
|
||||
addContextMenuItems();
|
||||
|
|
|
|||
|
|
@ -133,5 +133,7 @@ export const prefs_default = {
|
|||
spamfilter_threshold: 70,
|
||||
spamfilter_context_menu: true,
|
||||
spamfilter_enabled_accounts: [],
|
||||
summarize: false,
|
||||
summarize_context_menu: true,
|
||||
...generated_prefs
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,6 +147,17 @@
|
|||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="summarize_tr">
|
||||
<td><span class="opt_title">__MSG_prefs_OptionText_summarize__</span>
|
||||
<br><button id="btnManageSummarizeInfo" class="btn_small">__MSG_prefs_OptionText_btnManageSummarizeInfo__</button></td>
|
||||
<td>
|
||||
<label>
|
||||
<input type="checkbox" id="summarize" name="summarize" class="option-input" />
|
||||
__MSG_prefs_OptionText_summarize_Info__
|
||||
<br><span class="warn_API_needed" id="add_summarize_warn_API_needed">__MSG_warn_API_needed__</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>"
|
||||
<tr class="get_calendar_event_tr">
|
||||
<td><span class="opt_title">__MSG_prefs_OptionText_get_calendar_event__</span>
|
||||
<br><button id="btnManageCalendarEventInfo" class="btn_small">__MSG_prefs_OptionText_btnManageCalendarEventInfo__</button></td>
|
||||
|
|
@ -164,7 +175,7 @@
|
|||
<label>
|
||||
<input type="checkbox" id="get_task" name="get_task" class="option-input" />
|
||||
__MSG_prefs_OptionText_get_task_Info__
|
||||
</label>
|
||||
</labeloptionoption>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="get_calendar_event_tr" id="no_sparks">
|
||||
|
|
|
|||
Loading…
Reference in a new issue