mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
f88b0f3708
Summary: Fixes T3570 Fixes T3737 Rename ArchiveThreadHelper to RemoveThreadHelper Rename of `getRemovalTask` Remove unarchive from `RemoveThreadHelper`. Pass in mailviewfilter Rename actions Rename archive action renmaing support trash and archive folders in RemoveThreadHelper Move everything over to trash add tests Hide trash and archive Test Plan: new tests Reviewers: dillon, bengotow Reviewed By: dillon, bengotow Maniphest Tasks: T3570, T3737 Differential Revision: https://phab.nylas.com/D2089
68 lines
2.3 KiB
CoffeeScript
68 lines
2.3 KiB
CoffeeScript
_ = require 'underscore'
|
|
React = require "react"
|
|
{ComponentRegistry, WorkspaceStore} = require "nylas-exports"
|
|
|
|
{DownButton, UpButton, ThreadBulkRemoveButton, ThreadBulkStarButton, ThreadBulkToggleUnreadButton} = 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},
|
|
list: ['RootSidebar', 'DraftList']
|
|
|
|
@sidebarItem = new WorkspaceStore.SidebarItem
|
|
component: DraftListSidebarItem
|
|
sheet: WorkspaceStore.Sheet.Drafts
|
|
id: 'Drafts'
|
|
name: 'Drafts'
|
|
|
|
WorkspaceStore.addSidebarItem(@sidebarItem)
|
|
|
|
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 ThreadBulkRemoveButton,
|
|
role: 'thread:BulkAction'
|
|
|
|
ComponentRegistry.register ThreadBulkStarButton,
|
|
role: 'thread:BulkAction'
|
|
|
|
ComponentRegistry.register ThreadBulkToggleUnreadButton,
|
|
role: 'thread:BulkAction'
|
|
|
|
ComponentRegistry.register DraftDeleteButton,
|
|
role: 'draft:BulkAction'
|
|
|
|
deactivate: ->
|
|
ComponentRegistry.unregister DraftList
|
|
ComponentRegistry.unregister DraftSelectionBar
|
|
ComponentRegistry.unregister ThreadList
|
|
ComponentRegistry.unregister ThreadSelectionBar
|
|
ComponentRegistry.unregister ThreadBulkRemoveButton
|
|
ComponentRegistry.unregister ThreadBulkToggleUnreadButton
|
|
ComponentRegistry.unregister DownButton
|
|
ComponentRegistry.unregister UpButton
|
|
ComponentRegistry.unregister DraftDeleteButton
|