mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-26 10:01:57 +08:00
fix(drafts): Rename files inbox-composer =>composer
This commit is contained in:
parent
1e8fd46342
commit
b189afeeaf
11 changed files with 21 additions and 20 deletions
|
@ -1 +1 @@
|
|||
# inbox-composer package
|
||||
# composer package
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "inbox-composer",
|
||||
"name": "composer",
|
||||
"version": "0.0.0",
|
||||
"authors": [
|
||||
"InboxApp"
|
||||
|
|
|
@ -81,14 +81,14 @@ ComposerView = React.createClass
|
|||
</div>
|
||||
|
||||
_wrapClasses: ->
|
||||
"inbox-composer-outer-wrap #{@props.containerClass ? ""}"
|
||||
"composer-outer-wrap #{@props.containerClass ? ""}"
|
||||
|
||||
_renderComposer: ->
|
||||
# Do not render the composer unless we have loaded our draft.
|
||||
# Otherwise the Scribe component is initialized with HTML = ""
|
||||
return <div></div> if @state.body == undefined
|
||||
|
||||
<div className="inbox-composer-inner-wrap">
|
||||
<div className="composer-inner-wrap">
|
||||
|
||||
<div className="composer-header">
|
||||
<div className="composer-title">
|
||||
|
@ -107,6 +107,7 @@ ComposerView = React.createClass
|
|||
>Change Subject</span>
|
||||
<span
|
||||
className="header-action"
|
||||
style={display: (@props.mode is "fullwindow") and 'none' or 'initial'}
|
||||
onClick={@_popoutComposer}
|
||||
>Popout  <i className="fa fa-expand"></i></span>
|
||||
</div>
|
||||
|
|
|
@ -21,8 +21,8 @@ module.exports =
|
|||
else
|
||||
if @item? then return # Activate once
|
||||
@item = document.createElement("div")
|
||||
@item.setAttribute("id", "inbox-composer-full-window")
|
||||
@item.setAttribute("class", "inbox-composer-full-window")
|
||||
@item.setAttribute("id", "composer-full-window")
|
||||
@item.setAttribute("class", "composer-full-window")
|
||||
document.body.appendChild(@item)
|
||||
|
||||
# Wait for the remaining state to be passed into the window
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
# See https://atom.io/docs/latest/creating-a-package#menus for more details
|
||||
'context-menu':
|
||||
'.overlayer':
|
||||
'Enable inbox-composer': 'inbox-composer:toggle'
|
||||
'Enable composer': 'composer:toggle'
|
||||
|
||||
'menu': [
|
||||
{
|
||||
'label': 'Packages'
|
||||
'submenu': [
|
||||
'label': 'inbox-composer'
|
||||
'label': 'composer'
|
||||
'submenu': [
|
||||
{ 'label': 'Toggle', 'command': 'inbox-composer:toggle' }
|
||||
{ 'label': 'Toggle', 'command': 'composer:toggle' }
|
||||
]
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "inbox-composer",
|
||||
"name": "composer",
|
||||
"version": "0.1.0",
|
||||
"main": "./lib/main",
|
||||
"description": "Inbox Composer Component",
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
@import "ui-mixins";
|
||||
@import "buttons";
|
||||
|
||||
.inbox-composer-full-window {
|
||||
.composer-full-window {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.inbox-composer-outer-wrap {
|
||||
.composer-outer-wrap {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.inbox-composer-inner-wrap {
|
||||
.composer-inner-wrap {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
|
|
@ -175,6 +175,6 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"preinstall": "node -e 'process.exit(0)'",
|
||||
"postinstall": "(cd internal_packages/inbox-composer; npm install)"
|
||||
"postinstall": "(cd internal_packages/composer; npm install)"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ class AtomApplication
|
|||
# frame: true
|
||||
# draftId: draftId << arbitrary, goes into atom.getLoadSettings()
|
||||
# windowName: 'composer' << available as atom.state.mode in window
|
||||
# windowPackages: ['inbox-composer'] << packages to activate in window
|
||||
# windowPackages: ['composer'] << packages to activate in window
|
||||
#
|
||||
ipc.on 'show-secondary-window', (event, options) =>
|
||||
options = _.extend options,
|
||||
|
|
|
@ -216,7 +216,7 @@ class AtomApplication
|
|||
# frame: true
|
||||
# draftId: draftId << arbitrary, goes into atom.getLoadSettings()
|
||||
# windowName: 'composer' << available as atom.state.mode in window
|
||||
# windowPackages: ['inbox-composer'] << packages to activate in window
|
||||
# windowPackages: ['composer'] << packages to activate in window
|
||||
#
|
||||
ipc.on 'show-secondary-window', (event, options) =>
|
||||
w = @prepareSecondaryWindow(options)
|
||||
|
@ -351,7 +351,7 @@ class AtomApplication
|
|||
# :title: 'Message'
|
||||
# :frame: true
|
||||
# :windowName: 'composer'
|
||||
# :windowPackages: ['inbox-composer']
|
||||
# :windowPackages: ['composer']
|
||||
prepareSecondaryWindow: (options) ->
|
||||
options = _.extend options,
|
||||
bootstrapScript: require.resolve("../window-secondary-bootstrap")
|
||||
|
@ -369,14 +369,14 @@ class AtomApplication
|
|||
# :title: 'Message'
|
||||
# :frame: true
|
||||
# :windowName: 'composer'
|
||||
# :windowPackages: ['inbox-composer']
|
||||
# :windowPackages: ['composer']
|
||||
prepareComposerWindow: ->
|
||||
w = @_readyComposerWindow
|
||||
@_readyComposerWindow = @prepareSecondaryWindow
|
||||
title: 'Message'
|
||||
frame: true
|
||||
windowName: 'composer'
|
||||
windowPackages: ['inbox-composer']
|
||||
windowPackages: ['composer']
|
||||
w
|
||||
|
||||
showComposerWindow: ({draftLocalId, draftInitialJSON} = {}) ->
|
||||
|
|
|
@ -99,7 +99,7 @@ DraftStore = Reflux.createStore
|
|||
DatabaseStore.persistModel(draft)
|
||||
|
||||
# The logic to create a new Draft used to be in the DraftStore (which is
|
||||
# where it should be). It got moved to inbox-composer/lib/main.cjsx becaues
|
||||
# where it should be). It got moved to composer/lib/main.cjsx becaues
|
||||
# of an obscure atom-shell/Chrome bug whereby database requests firing right
|
||||
# before the new-window loaded would cause the new-window to load with
|
||||
# about:blank instead of its contents. By moving the DB logic there, we can
|
||||
|
|
Loading…
Reference in a new issue