mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-30 00:16:02 +08:00
fix(cal): remove calendar from protcols
Test Plan: manual Reviewers: halla, juan Reviewed By: juan Differential Revision: https://phab.nylas.com/D3685
This commit is contained in:
parent
d60226f0c6
commit
6c2e964416
5 changed files with 20 additions and 23 deletions
|
@ -248,9 +248,6 @@ module.exports = (grunt) => {
|
|||
// left in the Electron Info.plist file
|
||||
'extend-info': path.resolve(grunt.config('appDir'), 'build', 'resources', 'mac', 'nylas-Info.plist'),
|
||||
'app-bundle-id': "com.nylas.nylas-mail",
|
||||
'extra-resource': [
|
||||
path.resolve(grunt.config('appDir'), 'build', 'resources', 'mac', 'Nylas Calendar.app'),
|
||||
],
|
||||
'afterCopy': [
|
||||
runCopyPlatformSpecificResources,
|
||||
runCopyAPM,
|
||||
|
|
2
src/K2
2
src/K2
|
@ -1 +1 @@
|
|||
Subproject commit cedec79b0136d5025b99c053bb40d899958f581e
|
||||
Subproject commit 8812ff63b080c20a59e01b171b04ea823b36d129
|
|
@ -705,9 +705,9 @@ export default class Application extends EventEmitter {
|
|||
if (parts.protocol === 'mailto:') {
|
||||
main.sendMessage('mailto', urlToOpen);
|
||||
} else if (parts.protocol === 'nylas:') {
|
||||
if (parts.host === 'calendar') {
|
||||
this.openCalendarURL(parts.path);
|
||||
} else if (parts.host === 'plugins') {
|
||||
// if (parts.host === 'calendar') {
|
||||
// this.openCalendarURL(parts.path);
|
||||
if (parts.host === 'plugins') {
|
||||
main.sendMessage('changePluginStateFromUrl', urlToOpen);
|
||||
} else {
|
||||
main.sendMessage('openExternalThread', urlToOpen);
|
||||
|
@ -717,19 +717,19 @@ export default class Application extends EventEmitter {
|
|||
}
|
||||
}
|
||||
|
||||
openCalendarURL(command) {
|
||||
if (command === '/open') {
|
||||
this.windowManager.ensureWindow(WindowManager.CALENDAR_WINDOW, {
|
||||
windowKey: WindowManager.CALENDAR_WINDOW,
|
||||
windowType: WindowManager.CALENDAR_WINDOW,
|
||||
title: "Calendar",
|
||||
hidden: false,
|
||||
});
|
||||
} else if (command === '/close') {
|
||||
const win = this.windowManager.get(WindowManager.CALENDAR_WINDOW);
|
||||
if (win) { win.hide(); }
|
||||
}
|
||||
}
|
||||
// openCalendarURL(command) {
|
||||
// if (command === '/open') {
|
||||
// this.windowManager.ensureWindow(WindowManager.CALENDAR_WINDOW, {
|
||||
// windowKey: WindowManager.CALENDAR_WINDOW,
|
||||
// windowType: WindowManager.CALENDAR_WINDOW,
|
||||
// title: "Calendar",
|
||||
// hidden: false,
|
||||
// });
|
||||
// } else if (command === '/close') {
|
||||
// const win = this.windowManager.get(WindowManager.CALENDAR_WINDOW);
|
||||
// if (win) { win.hide(); }
|
||||
// }
|
||||
// }
|
||||
|
||||
openComposerWithFiles(pathsToOpen) {
|
||||
const main = this.windowManager.get(WindowManager.MAIN_WINDOW);
|
||||
|
|
|
@ -6,7 +6,7 @@ const MAIN_WINDOW = "default"
|
|||
const WORK_WINDOW = "work"
|
||||
const SPEC_WINDOW = "spec"
|
||||
const ONBOARDING_WINDOW = "onboarding"
|
||||
const CALENDAR_WINDOW = "calendar"
|
||||
// const CALENDAR_WINDOW = "calendar"
|
||||
|
||||
export default class WindowManager {
|
||||
|
||||
|
@ -239,5 +239,5 @@ export default class WindowManager {
|
|||
WindowManager.MAIN_WINDOW = MAIN_WINDOW;
|
||||
WindowManager.WORK_WINDOW = WORK_WINDOW;
|
||||
WindowManager.SPEC_WINDOW = SPEC_WINDOW;
|
||||
WindowManager.CALENDAR_WINDOW = CALENDAR_WINDOW;
|
||||
// WindowManager.CALENDAR_WINDOW = CALENDAR_WINDOW;
|
||||
WindowManager.ONBOARDING_WINDOW = ONBOARDING_WINDOW;
|
||||
|
|
|
@ -163,7 +163,7 @@ class WindowEventHandler
|
|||
{protocol} = url.parse(href)
|
||||
return unless protocol
|
||||
|
||||
if protocol in ['mailto:', 'calendar:', 'nylas:']
|
||||
if protocol in ['mailto:', 'nylas:']
|
||||
# We sometimes get mailto URIs that are not escaped properly, or have been only partially escaped.
|
||||
# (T1927) Be sure to escape them once, and completely, before we try to open them. This logic
|
||||
# *might* apply to http/https as well but it's unclear.
|
||||
|
|
Loading…
Add table
Reference in a new issue