mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-06 19:26:55 +08:00
feat(inbox-zero): add minimal graphic to inbox when no threads
This commit is contained in:
parent
c0123e2b70
commit
cdd015cfab
4 changed files with 37 additions and 0 deletions
|
@ -6,6 +6,7 @@ classNames = require 'classnames'
|
||||||
NylasAPI,
|
NylasAPI,
|
||||||
NylasSyncStatusStore,
|
NylasSyncStatusStore,
|
||||||
Message,
|
Message,
|
||||||
|
FocusedPerspectiveStore,
|
||||||
WorkspaceStore} = require 'nylas-exports'
|
WorkspaceStore} = require 'nylas-exports'
|
||||||
|
|
||||||
EmptyMessages = [{
|
EmptyMessages = [{
|
||||||
|
@ -64,6 +65,18 @@ class ContentQuotes extends React.Component
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
class InboxZero extends React.Component
|
||||||
|
@displayName = "Inbox Zero"
|
||||||
|
|
||||||
|
render: ->
|
||||||
|
msg = @props.messageOverride ? "No more messages"
|
||||||
|
<div className="inbox-zero">
|
||||||
|
<div className="inbox-zero-plain">
|
||||||
|
<RetinaImg mode={RetinaImg.Mode.ContentPreserve}
|
||||||
|
name="inbox-zero-plain.png"/>
|
||||||
|
<div className="message">Hooray! You’re done.</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
class EmptyState extends React.Component
|
class EmptyState extends React.Component
|
||||||
@displayName = 'EmptyState'
|
@displayName = 'EmptyState'
|
||||||
|
@ -107,6 +120,9 @@ class EmptyState extends React.Component
|
||||||
if @state.syncing
|
if @state.syncing
|
||||||
messageOverride = "Please wait while we prepare your mailbox."
|
messageOverride = "Please wait while we prepare your mailbox."
|
||||||
|
|
||||||
|
if FocusedPerspectiveStore.current()?.name is "Inbox"
|
||||||
|
ContentComponent = InboxZero
|
||||||
|
|
||||||
classes = classNames
|
classes = classNames
|
||||||
'empty-state': true
|
'empty-state': true
|
||||||
'visible': @props.visible
|
'visible': @props.visible
|
||||||
|
|
|
@ -19,6 +19,26 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inbox-zero {
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
.inbox-zero-plain {
|
||||||
|
position: relative;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(0, -50%);
|
||||||
|
img {
|
||||||
|
}
|
||||||
|
.message {
|
||||||
|
margin-top: 70px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.message {
|
||||||
|
font-size: 28px;
|
||||||
|
color: @text-color-subtle;
|
||||||
|
font-weight: @font-weight-thin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Generic Mode
|
// Generic Mode
|
||||||
.generic {
|
.generic {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
BIN
static/images/inbox-zero/inbox-zero-plain@2x.png
Normal file
BIN
static/images/inbox-zero/inbox-zero-plain@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.9 KiB |
|
@ -97,6 +97,7 @@
|
||||||
@font-family-heading: @font-family-sans-serif;
|
@font-family-heading: @font-family-sans-serif;
|
||||||
|
|
||||||
// ----- Font Weights -----
|
// ----- Font Weights -----
|
||||||
|
@font-weight-thin: 200;
|
||||||
@font-weight-blond: 300;
|
@font-weight-blond: 300;
|
||||||
@font-weight-normal: 400;
|
@font-weight-normal: 400;
|
||||||
@font-weight-medium: 500;
|
@font-weight-medium: 500;
|
||||||
|
|
Loading…
Add table
Reference in a new issue