mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-08 21:55:54 +08:00
fix(account-switcher): Switcher should not be part of the scroll region in the sidebar
This commit is contained in:
parent
308c70f53d
commit
4539cf2e24
4 changed files with 16 additions and 3 deletions
|
@ -1,9 +1,8 @@
|
|||
React = require 'react'
|
||||
{Actions, MailViewFilter, WorkspaceStore} = require("nylas-exports")
|
||||
{ScrollRegion} = require("nylas-component-kit")
|
||||
{ScrollRegion, Flexbox} = require("nylas-component-kit")
|
||||
SidebarDividerItem = require("./account-sidebar-divider-item")
|
||||
SidebarSheetItem = require("./account-sidebar-sheet-item")
|
||||
AccountSwitcher = require ("./account-switcher")
|
||||
AccountSidebarStore = require ("./account-sidebar-store")
|
||||
AccountSidebarMailViewItem = require("./account-sidebar-mail-view-item")
|
||||
{RetinaImg} = require 'nylas-component-kit'
|
||||
|
@ -28,7 +27,6 @@ class AccountSidebar extends React.Component
|
|||
|
||||
render: =>
|
||||
<ScrollRegion style={flex:1} id="account-sidebar">
|
||||
<AccountSwitcher />
|
||||
<div className="account-sidebar-sections">
|
||||
{@_sections()}
|
||||
</div>
|
||||
|
|
|
@ -8,6 +8,11 @@ classNames = require 'classnames'
|
|||
class AccountSwitcher extends React.Component
|
||||
@displayName: 'AccountSwitcher'
|
||||
|
||||
@containerRequired: false
|
||||
@containerStyles:
|
||||
minWidth: 165
|
||||
maxWidth: 210
|
||||
|
||||
constructor: (@props) ->
|
||||
@state = @_getStateFromStores()
|
||||
@state.showing = false
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
React = require "react"
|
||||
AccountSwitcher = require "./account-switcher"
|
||||
AccountSidebar = require "./account-sidebar"
|
||||
{ComponentRegistry, WorkspaceStore} = require "nylas-exports"
|
||||
|
||||
|
@ -6,8 +7,12 @@ module.exports =
|
|||
item: null # The DOM item the main React component renders into
|
||||
|
||||
activate: (@state) ->
|
||||
ComponentRegistry.register AccountSwitcher,
|
||||
location: WorkspaceStore.Location.RootSidebar
|
||||
|
||||
ComponentRegistry.register AccountSidebar,
|
||||
location: WorkspaceStore.Location.RootSidebar
|
||||
|
||||
deactivate: (@state) ->
|
||||
ComponentRegistry.unregister(AccountSwitcher)
|
||||
ComponentRegistry.unregister(AccountSidebar)
|
||||
|
|
|
@ -180,3 +180,8 @@
|
|||
transform: rotateX(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#account-switcher {
|
||||
height: auto;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue