mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
237bad59d8
Summary: Adds a new unified "Spam" folder and a unified "Unread" view, which shows all the messages in your inbox which are unread. Test Plan: Run tests Reviewers: evan, juan Reviewed By: juan Differential Revision: https://phab.nylas.com/D2901
69 lines
2.2 KiB
CoffeeScript
69 lines
2.2 KiB
CoffeeScript
_ = require 'underscore'
|
|
React = require "react"
|
|
{ComponentRegistry, WorkspaceStore} = require "nylas-exports"
|
|
|
|
ThreadList = require './thread-list'
|
|
ThreadListToolbar = require './thread-list-toolbar'
|
|
MessageListToolbar = require './message-list-toolbar'
|
|
SelectedItemsStack = require './selected-items-stack'
|
|
|
|
{UpButton,
|
|
DownButton,
|
|
TrashButton,
|
|
ArchiveButton,
|
|
MarkAsSpamButton,
|
|
ToggleUnreadButton,
|
|
ToggleStarredButton} = require "./thread-toolbar-buttons"
|
|
|
|
module.exports =
|
|
activate: (@state={}) ->
|
|
ComponentRegistry.register ThreadList,
|
|
location: WorkspaceStore.Location.ThreadList
|
|
|
|
ComponentRegistry.register SelectedItemsStack,
|
|
location: WorkspaceStore.Location.MessageList
|
|
modes: ['split']
|
|
|
|
# Toolbars
|
|
ComponentRegistry.register ThreadListToolbar,
|
|
location: WorkspaceStore.Location.ThreadList.Toolbar
|
|
modes: ['list']
|
|
|
|
ComponentRegistry.register MessageListToolbar,
|
|
location: WorkspaceStore.Location.MessageList.Toolbar
|
|
|
|
ComponentRegistry.register DownButton,
|
|
location: WorkspaceStore.Location.MessageList.Toolbar
|
|
modes: ['list']
|
|
|
|
ComponentRegistry.register UpButton,
|
|
location: WorkspaceStore.Location.MessageList.Toolbar
|
|
modes: ['list']
|
|
|
|
ComponentRegistry.register ArchiveButton,
|
|
role: 'ThreadActionsToolbarButton'
|
|
|
|
ComponentRegistry.register TrashButton,
|
|
role: 'ThreadActionsToolbarButton'
|
|
|
|
ComponentRegistry.register MarkAsSpamButton,
|
|
role: 'ThreadActionsToolbarButton'
|
|
|
|
ComponentRegistry.register ToggleStarredButton,
|
|
role: 'ThreadActionsToolbarButton'
|
|
|
|
ComponentRegistry.register ToggleUnreadButton,
|
|
role: 'ThreadActionsToolbarButton'
|
|
|
|
deactivate: ->
|
|
ComponentRegistry.unregister ThreadList
|
|
ComponentRegistry.unregister SelectedItemsStack
|
|
ComponentRegistry.unregister ThreadListToolbar
|
|
ComponentRegistry.unregister MessageListToolbar
|
|
ComponentRegistry.unregister ArchiveButton
|
|
ComponentRegistry.unregister TrashButton
|
|
ComponentRegistry.unregister MarkAsSpamButton
|
|
ComponentRegistry.unregister ToggleUnreadButton
|
|
ComponentRegistry.unregister ToggleStarredButton
|
|
ComponentRegistry.unregister UpButton
|
|
ComponentRegistry.unregister DownButton
|