mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 05:41:05 +08:00
7210c80c5a
Summary: Removes references to the N1 ID expring. Luckily, local-sync Nylas Mail Basic doesn't need the nylas ID to do pretty much anything, which means we don't need to worry about the "trial" status of the Nylas ID. The existing trial infrastructure will only kick into place when someone connects an email account with the Nylas Cloud Sync servers for the first time. The one place we do check for the Nylas ID is in the cloud-api/src/authentication route. Here we hit https://billing.nylas.com/n1/user and simply expect to get back a Nylas ID. As long as we return the existence of a Nylas ID (which should ignore whether or not the old subscription system is "valid"), the API calls will succeed. This makes the "Upgrade Now" button go to billing.nylas.com/dashboard?upgrade_to_pro=true with the auto-sign in features enabled. This will automatically log the user into the Nylas billing site with the upgrade_to_pro=true flag set. There is also a new "Learn More" button which goes to https://nylas.com/nylas-pro. @mike, will these urls work? Test Plan: manual Reviewers: khamidou, mike, juan Reviewed By: juan Subscribers: mike Differential Revision: https://phab.nylas.com/D3680
43 lines
1.5 KiB
JavaScript
43 lines
1.5 KiB
JavaScript
/* eslint no-unused-vars:0 */
|
|
|
|
import {ComponentRegistry, WorkspaceStore} from 'nylas-exports';
|
|
import ActivitySidebar from "./sidebar/activity-sidebar";
|
|
import NotifWrapper from "./notif-wrapper";
|
|
|
|
import AccountErrorNotification from "./items/account-error-notif";
|
|
import DefaultClientNotification from "./items/default-client-notif";
|
|
import UnstableChannelNotification from "./items/unstable-channel-notif";
|
|
import DevModeNotification from "./items/dev-mode-notif";
|
|
import DisabledMailRulesNotification from "./items/disabled-mail-rules-notif";
|
|
import OfflineNotification from "./items/offline-notification";
|
|
import UpdateNotification from "./items/update-notification";
|
|
|
|
const notifications = [
|
|
AccountErrorNotification,
|
|
DefaultClientNotification,
|
|
UnstableChannelNotification,
|
|
DevModeNotification,
|
|
DisabledMailRulesNotification,
|
|
OfflineNotification,
|
|
UpdateNotification,
|
|
]
|
|
|
|
export function activate() {
|
|
ComponentRegistry.register(ActivitySidebar, {location: WorkspaceStore.Location.RootSidebar});
|
|
ComponentRegistry.register(NotifWrapper, {location: WorkspaceStore.Location.RootSidebar});
|
|
|
|
for (const notification of notifications) {
|
|
ComponentRegistry.register(notification, {role: 'RootSidebar:Notifications'});
|
|
}
|
|
}
|
|
|
|
export function serialize() {}
|
|
|
|
export function deactivate() {
|
|
ComponentRegistry.unregister(ActivitySidebar);
|
|
ComponentRegistry.unregister(NotifWrapper);
|
|
|
|
for (const notification of notifications) {
|
|
ComponentRegistry.unregister(notification)
|
|
}
|
|
}
|