Feature/protocol handlers

* Added account selection for protocol links when multiple connected accounts are available, including mailto: links
* Added support for handling mailto: links in an already-open PWA/session instead of always opening a new tab
* Added webcal: protocol handling for calendar links
* Added account selection for webcal: links when multiple calendar-capable accounts are connected
* Added an import-or-subscribe choice for detected webcal calendars
* Added protocol handler settings for registering mail and calendar handlers and choosing the open mode
* Added service worker/session coordination for passing protocol requests between browser/PWA contexts
* Added tests and translations for the new protocol handler flows
This commit is contained in:
Lucas Gaitzsch
2026-05-12 20:49:05 +02:00
committed by Linus Rath
parent 8b0e2052cf
commit 3f444a8912
40 changed files with 2514 additions and 55 deletions
+44
View File
@@ -134,6 +134,40 @@
"add_app": "应用",
"shared": "共享"
},
"protocol_handlers": {
"title": "默认应用",
"description": "选择是否在 Bulwark 中打开电子邮件和日历链接。从技术上讲,Bulwark 会注册为 mailto: 和 webcal: 链接的协议处理程序。",
"unsupported": "此浏览器或连接不支持手动注册协议处理程序。你仍可尝试通过浏览器或系统设置使用已安装的 PWA。",
"mailto_label": "电子邮件链接",
"mailto_description": "在 Bulwark 中打开 mailto: 链接,并预先填好撰写窗口。",
"protocol_open_mode_label": "打开协议链接时",
"protocol_open_mode_description": "选择 Bulwark 是在新标签页中打开 mailto: 和 webcal: 链接,还是复用已打开的会话。活动会话选项需要通知权限,这样当浏览器阻止聚焦时,你可以点击备用通知将 Bulwark 窗口带到前台。",
"protocol_open_mode_active_session": "尽可能在活动会话中打开",
"protocol_open_mode_new_tab": "始终打开新标签页",
"focus_notification_title": "打开 Bulwark",
"focus_notification_body": "链接已在 Bulwark 中打开。点击可将窗口带到前台。",
"webcal_label": "日历链接",
"webcal_description": "在 Bulwark 中打开 webcal: 链接,并预先填好日历订阅对话框。",
"register_mailto": "注册电子邮件应用",
"register_webcal": "注册日历应用",
"mailto_registered": "已请求注册电子邮件处理程序",
"webcal_registered": "已请求注册日历处理程序",
"registration_failed": "协议处理程序注册失败",
"opening_mailto": "正在打开撰写窗口...",
"opening_webcal": "正在打开日历...",
"browser_note": "你的浏览器或操作系统可能会要求确认,并且可能需要先安装 Bulwark,才能将其选为默认应用。",
"select_account_title": "选择账户",
"select_mailto_account": "选择用于打开此电子邮件链接的账户。",
"select_webcal_account": "选择用于打开此日历链接的账户。",
"select_account_note": "此选择仅适用于此协议链接。",
"detail_to": "收件人",
"detail_subject": "主题",
"detail_no_subject": "无主题",
"detail_calendar": "日历",
"detail_source": "来源",
"active_account": "活动",
"switching_account": "正在切换账户..."
},
"sidebar_apps": {
"modal_title": "侧边栏应用",
"add_new": "添加应用",
@@ -733,6 +767,7 @@
"files": "文件",
"contacts": "联系人",
"encryption": "加密",
"protocol_handlers": "默认应用",
"sidebar_apps": "侧边栏应用",
"notifications": "通知",
"layout": "布局",
@@ -2431,6 +2466,15 @@
"file_too_large": "文件超过 10MB 限制",
"invalid_format": "日历文件格式无效"
},
"webcal_action": {
"title": "打开日历链接",
"description": "您想如何使用 \"{name}\"",
"import_title": "导入一次",
"import_description": "立即获取事件并复制到您的某个日历中。",
"subscribe_title": "订阅",
"subscribe_description": "将此日历作为单独的日历自动同步。",
"cancel": "取消"
},
"management": {
"title": "日历管理",
"description": "创建、重命名和自定义您的日历。右键单击侧栏中的日历可快速更改其颜色。",