mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-05 20:24:26 +08:00
feat(salesforce): new UI for Salesforce
Summary: style opportunity picker and placeholder on tokenizing text fields UI for synced opportunities Test Plan: edgehill --test Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D1655
This commit is contained in:
parent
8d6dcfe549
commit
c78ff03e60
10 changed files with 31 additions and 9 deletions
|
@ -203,8 +203,9 @@ body.is-blurred .composer-inner-wrap .tokenizing-field .token {
|
||||||
.composer-inner-wrap {
|
.composer-inner-wrap {
|
||||||
|
|
||||||
.composer-action-bar-wrap {
|
.composer-action-bar-wrap {
|
||||||
background: @background-secondary;
|
background: #fcfcfc;
|
||||||
border-top:1px solid @border-color-divider;
|
border-top: 1px solid #eaeaea;
|
||||||
|
box-shadow: inset 0px 1px 2px rgba(0,0,0,0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
.composer-action-bar-content {
|
.composer-action-bar-content {
|
||||||
|
|
|
@ -22,7 +22,7 @@ class TemplatePicker extends React.Component
|
||||||
@unsubscribe() if @unsubscribe
|
@unsubscribe() if @unsubscribe
|
||||||
|
|
||||||
render: =>
|
render: =>
|
||||||
button = <button className="btn btn-toolbar" style={padding: "2px 9px"}>
|
button = <button className="btn btn-toolbar narrow">
|
||||||
<RetinaImg name="icon-composer-templates.png" mode={RetinaImg.Mode.ContentIsMask}/>
|
<RetinaImg name="icon-composer-templates.png" mode={RetinaImg.Mode.ContentIsMask}/>
|
||||||
|
|
||||||
<RetinaImg name="icon-composer-dropdown.png" mode={RetinaImg.Mode.ContentIsMask}/>
|
<RetinaImg name="icon-composer-dropdown.png" mode={RetinaImg.Mode.ContentIsMask}/>
|
||||||
|
|
|
@ -57,7 +57,7 @@ class ExternalAuthWebviewPage extends Page
|
||||||
, 20
|
, 20
|
||||||
|
|
||||||
@_listeners =
|
@_listeners =
|
||||||
"new-window": (e) ->
|
"new-window": (e) ->
|
||||||
require('shell').openExternal(e.url)
|
require('shell').openExternal(e.url)
|
||||||
"did-start-loading": (e) =>
|
"did-start-loading": (e) =>
|
||||||
@_setUserAgent(e, webview)
|
@_setUserAgent(e, webview)
|
||||||
|
|
|
@ -30,7 +30,7 @@ class Page extends React.Component
|
||||||
|
|
||||||
<RetinaImg ref="spinner"
|
<RetinaImg ref="spinner"
|
||||||
style={styles}
|
style={styles}
|
||||||
name="setup-spinner.gif"
|
name="Setup-Spinner.gif"
|
||||||
mode={RetinaImg.Mode.ContentPreserve}/>
|
mode={RetinaImg.Mode.ContentPreserve}/>
|
||||||
|
|
||||||
module.exports = Page
|
module.exports = Page
|
||||||
|
|
|
@ -28,6 +28,7 @@ class SidebarFullContact extends React.Component
|
||||||
<SidebarFullContactDetails contact={@state.focusedContact ? {}}
|
<SidebarFullContactDetails contact={@state.focusedContact ? {}}
|
||||||
fullContact={@_fullContact()}/>
|
fullContact={@_fullContact()}/>
|
||||||
<InjectedComponentSet matching={role: "sidebar:focusedContactInfo"}
|
<InjectedComponentSet matching={role: "sidebar:focusedContactInfo"}
|
||||||
|
direction="column"
|
||||||
exposedProps={focusedContact: @state.focusedContact}/>
|
exposedProps={focusedContact: @state.focusedContact}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "nylas",
|
"name": "nylas",
|
||||||
"productName": "Nylas",
|
"productName": "Nylas",
|
||||||
"version": "0.1.2",
|
"version": "0.1.3",
|
||||||
"description": "An email OS",
|
"description": "An email OS",
|
||||||
"main": "./src/browser/main.js",
|
"main": "./src/browser/main.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -171,8 +171,8 @@ class FormItem extends React.Component
|
||||||
React.createElement("input", inputProps)
|
React.createElement("input", inputProps)
|
||||||
else if @props.type is "select"
|
else if @props.type is "select"
|
||||||
options = (@props.selectOptions ? []).map (optionData) ->
|
options = (@props.selectOptions ? []).map (optionData) ->
|
||||||
<option {...optionData} key={optionData.value} >{optionData.label}</option>
|
<option {...optionData} key={"#{Utils.generateTempId()}-optionData.value"} >{optionData.label}</option>
|
||||||
options.unshift(<option key={"blank-option"}></option>)
|
options.unshift(<option key={"#{Utils.generateTempId()}-blank-option"}></option>)
|
||||||
<select {...inputProps}>{options}</select>
|
<select {...inputProps}>{options}</select>
|
||||||
else if @props.type is "textarea"
|
else if @props.type is "textarea"
|
||||||
React.createElement("textarea", inputProps)
|
React.createElement("textarea", inputProps)
|
||||||
|
|
|
@ -226,6 +226,8 @@ TokenizingTextField = React.createClass
|
||||||
<div key="field-component" onClick={@focus} {...@dropTargetFor('token')}>
|
<div key="field-component" onClick={@focus} {...@dropTargetFor('token')}>
|
||||||
{@_renderPrompt()}
|
{@_renderPrompt()}
|
||||||
<div className="tokenizing-field-input">
|
<div className="tokenizing-field-input">
|
||||||
|
{@_placeholder()}
|
||||||
|
|
||||||
{@_fieldTokenComponents()}
|
{@_fieldTokenComponents()}
|
||||||
|
|
||||||
{@_inputEl()}
|
{@_inputEl()}
|
||||||
|
@ -263,6 +265,12 @@ TokenizingTextField = React.createClass
|
||||||
tabIndex={@props.tabIndex}
|
tabIndex={@props.tabIndex}
|
||||||
value={@state.inputValue} />
|
value={@state.inputValue} />
|
||||||
|
|
||||||
|
_placeholder: ->
|
||||||
|
if not @state.focus and @props.placeholder?
|
||||||
|
return <div className="placeholder">{@props.placeholder}</div>
|
||||||
|
else
|
||||||
|
return <span></span>
|
||||||
|
|
||||||
_atMaxTokens: ->
|
_atMaxTokens: ->
|
||||||
if @props.maxTokens
|
if @props.maxTokens
|
||||||
@props.tokens.length >= @props.maxTokens
|
@props.tokens.length >= @props.maxTokens
|
||||||
|
|
|
@ -102,8 +102,11 @@ button, html input[type="button"] {
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-toolbar {
|
.btn-toolbar {
|
||||||
min-height: 24px;
|
height: 24px;
|
||||||
padding: 2px 13px;
|
padding: 2px 13px;
|
||||||
|
&.narrow {
|
||||||
|
padding: 2px 9px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-gradient {
|
.btn-gradient {
|
||||||
|
|
|
@ -116,6 +116,15 @@
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.placeholder {
|
||||||
|
color: fade(@text-color, 50%);
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -0.8em;
|
||||||
|
left: 1em;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body.is-blurred .tokenizing-field .token {
|
body.is-blurred .tokenizing-field .token {
|
||||||
|
|
Loading…
Add table
Reference in a new issue