From 4a0d260332b892a5b88c2dc82a3a59d8d208e133 Mon Sep 17 00:00:00 2001 From: mic Date: Thu, 20 Mar 2025 22:11:33 +0100 Subject: [PATCH] Add timezone preferences for calendar events management. see #250 --- _locales/en/messages.json | 16 +++++++ options/mzta-options-default.js | 2 + .../mzta-get-calendar-event.css | 32 ++++++++++++++ .../mzta-get-calendar-event.html | 44 +++++++++++++++++++ 4 files changed, 94 insertions(+) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 6c264095..88b7afde 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -987,6 +987,22 @@ "message": "If checked, an item will be included in the menu to get a calendar event information from selected text.", "description": "" }, + "get_calendar_event_prompt_prefs_title": { + "message": "Calendar Events Options", + "description": "" + }, + "Select_your_timezone": { + "message": "Select your timezone", + "description": "" + }, + "prefs_OptionText_calendar_enforce_timezone": { + "message": "Force the specified timezone", + "description": "" + }, + "prefs_OptionText_calendar_enforce_timezone_Info": { + "message": "If checked, the specified timezone will be enforced for the calendar events.", + "description": "" + }, "prefs_OptionText_btnManageCalendarEventInfo": { "message": "Manage calendar events settings", "description": "" diff --git a/options/mzta-options-default.js b/options/mzta-options-default.js index b92a1f66..573d2085 100644 --- a/options/mzta-options-default.js +++ b/options/mzta-options-default.js @@ -52,6 +52,8 @@ export const prefs_default = { add_tags_auto_only_inbox: true, add_tags_context_menu: true, get_calendar_event: true, + calendar_enforce_timezone: false, + calendar_timezone: '', spamfilter: false, spamfilter_threshold: 70, spamfilter_context_menu: true, diff --git a/pages/get-calendar-event/mzta-get-calendar-event.css b/pages/get-calendar-event/mzta-get-calendar-event.css index 75c89f0c..3e9f8137 100644 --- a/pages/get-calendar-event/mzta-get-calendar-event.css +++ b/pages/get-calendar-event/mzta-get-calendar-event.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; +} + +.get_calendar_event_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/get-calendar-event/mzta-get-calendar-event.html b/pages/get-calendar-event/mzta-get-calendar-event.html index 8804c8fa..6679dbbb 100644 --- a/pages/get-calendar-event/mzta-get-calendar-event.html +++ b/pages/get-calendar-event/mzta-get-calendar-event.html @@ -11,6 +11,50 @@

__MSG_GetCalendarEvent_PageTitle__

__MSG_GetCalendarEvent_info_default__

+
__MSG_get_calendar_event_prompt_prefs_title__
+ + + + + +
__MSG_prefs_OptionText_calendar_enforce_timezone__ + +
__MSG_GetCalendarEvent_prompt_text_title__
__MSG_prefs_OptionText_btnManagePrompts_infoline__ __MSG_customPrompts_managePrompts_help__