diff --git a/_locales/en/messages.json b/_locales/en/messages.json index e8790e2e..dd6c221e 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1086,5 +1086,17 @@ "prompt_spamfilter_full_text" : { "message" : "Analyze the following email and determine if it is spam or not. Consider factors such as suspicious keywords, excessive promotional language, misleading subject lines, requests for personal information, and unusual sender addresses.\nProvide a value from 0 (not spam) to 100 (spam) and an explaination of no more than 10 words.\nGenerate a response in JSON format only. Do not include any additional text or explanation; provide only the JSON. Here is the format to be used:\n{\n\"spamValue\": ,\n\"explanation\": \"Brief explanation of your reasoning\",\n}\nHere there are the mail information:\nSender: \"{%author%}\"\nSubject: \"{%mail_subject%}\"\nHtml body: \"{%mail_html_body%}\"", "description" : "" + }, + "SpamFilter_prompt_prefs_title": { + "message": "Spam Filter Options", + "description": "" + }, + "prefs_OptionText_spamfilter_threshold": { + "message": "Spam threshold", + "description": "" + }, + "prefs_OptionText_spamfilter_threshold_Info": { + "message": "If the value returned by the AI is above this threshold, the email will be moved to the spam folder.", + "description": "" } } \ No newline at end of file diff --git a/options/mzta-options-default.js b/options/mzta-options-default.js index 4e396083..8129487b 100644 --- a/options/mzta-options-default.js +++ b/options/mzta-options-default.js @@ -52,4 +52,5 @@ export const prefs_default = { add_tags_auto_only_inbox: true, get_calendar_event: true, spamfilter: false, + spamfilter_threshold: 70, } \ No newline at end of file diff --git a/pages/spamfilter/mzta-spamfilter.css b/pages/spamfilter/mzta-spamfilter.css index 7d984c80..4e4a769a 100644 --- a/pages/spamfilter/mzta-spamfilter.css +++ b/pages/spamfilter/mzta-spamfilter.css @@ -18,6 +18,38 @@ justify-content: space-between; } +table#miczPrefs { + padding: 10px; + border-spacing: 0px; + width: 90%; + margin: 0px auto 40px auto; + border: 1px solid #ccc; +} + +.spamfilter_table_title{ + width: 90%; + margin: auto; +} + +.section_title{ + font-weight: bold; +} + +table#miczPrefs td{ + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; + vertical-align: top; + padding: 2px; +} + +table#miczPrefs tr:first-child td { + border-top: none; +} + +table#miczPrefs tr:last-child td { + border-bottom: none; +} + .autocomplete-container { position: relative; } diff --git a/pages/spamfilter/mzta-spamfilter.html b/pages/spamfilter/mzta-spamfilter.html index c717674f..1791e1b5 100644 --- a/pages/spamfilter/mzta-spamfilter.html +++ b/pages/spamfilter/mzta-spamfilter.html @@ -11,6 +11,18 @@

__MSG_SpamFilter_PageTitle__

__MSG_SpamFilter_info_default__

+
__MSG_SpamFilter_prompt_prefs_title__
+ + + + + +
__MSG_prefs_OptionText_spamfilter_threshold__ + +
__MSG_GetCalendarEvent_prompt_text_title__
__MSG_prefs_OptionText_btnManagePrompts_infoline__ __MSG_customPrompts_managePrompts_help__