mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 05:41:05 +08:00
607ca3bf10
Summary: This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`. This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work. When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account. Search bar doesn't need to do full refresh on clear if it never committed Allow drafts to be switched to a different account when not in reply to an existing thread Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal Show many dots for many accounts in long polling status bar add/remove accounts from prefs Spec fixes! Test Plan: Run tests, none broken! Reviewers: evan, dillon Reviewed By: evan, dillon Differential Revision: https://phab.nylas.com/D1928
56 lines
2 KiB
CoffeeScript
56 lines
2 KiB
CoffeeScript
_ = require 'underscore'
|
|
React = require "react"
|
|
{ComponentRegistry, WorkspaceStore} = require "nylas-exports"
|
|
|
|
{DownButton, UpButton, ThreadBulkArchiveButton, ThreadBulkStarButton} = require "./thread-buttons"
|
|
{DraftDeleteButton} = require "./draft-buttons"
|
|
ThreadSelectionBar = require './thread-selection-bar'
|
|
ThreadList = require './thread-list'
|
|
|
|
DraftListSidebarItem = require './draft-list-sidebar-item'
|
|
DraftSelectionBar = require './draft-selection-bar'
|
|
DraftList = require './draft-list'
|
|
|
|
module.exports =
|
|
activate: (@state={}) ->
|
|
WorkspaceStore.defineSheet 'Drafts', {root: true, name: 'Drafts', sidebarComponent: DraftListSidebarItem},
|
|
list: ['RootSwitcher', 'RootSidebar', 'DraftList']
|
|
|
|
ComponentRegistry.register ThreadList,
|
|
location: WorkspaceStore.Location.ThreadList
|
|
|
|
ComponentRegistry.register ThreadSelectionBar,
|
|
location: WorkspaceStore.Location.ThreadList.Toolbar
|
|
|
|
ComponentRegistry.register DraftList,
|
|
location: WorkspaceStore.Location.DraftList
|
|
|
|
ComponentRegistry.register DraftSelectionBar,
|
|
location: WorkspaceStore.Location.DraftList.Toolbar
|
|
|
|
ComponentRegistry.register DownButton,
|
|
location: WorkspaceStore.Sheet.Thread.Toolbar.Right
|
|
modes: ['list']
|
|
|
|
ComponentRegistry.register UpButton,
|
|
location: WorkspaceStore.Sheet.Thread.Toolbar.Right
|
|
modes: ['list']
|
|
|
|
ComponentRegistry.register ThreadBulkArchiveButton,
|
|
role: 'thread:BulkAction'
|
|
|
|
ComponentRegistry.register ThreadBulkStarButton,
|
|
role: 'thread:BulkAction'
|
|
|
|
ComponentRegistry.register DraftDeleteButton,
|
|
role: 'draft:BulkAction'
|
|
|
|
deactivate: ->
|
|
ComponentRegistry.unregister DraftList
|
|
ComponentRegistry.unregister DraftSelectionBar
|
|
ComponentRegistry.unregister ThreadList
|
|
ComponentRegistry.unregister ThreadSelectionBar
|
|
ComponentRegistry.unregister ThreadBulkArchiveButton
|
|
ComponentRegistry.unregister DownButton
|
|
ComponentRegistry.unregister UpButton
|
|
ComponentRegistry.unregister DraftDeleteButton
|