Merge branch 'development' into 8156-openExternal

This commit is contained in:
Billy Griffin 2019-09-10 11:45:48 -07:00 committed by GitHub
commit 1448b6dc4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 13 deletions

View file

@ -1,10 +1,11 @@
{
"typescript.tsdk": "./node_modules/typescript/lib",
"search.exclude": {
"**/node_modules": true,
".awcache": true,
"**/dist": true,
"**/node_modules": true,
"**/out": true,
".awcache": true
"app/test/fixtures": true
},
"files.exclude": {
"**/.git": true,

View file

@ -155,9 +155,6 @@ export interface IAppState {
/** The width of the files list in the stash view */
readonly stashedFilesWidth: number
/** Whether we should hide the toolbar (and show inverted window controls) */
readonly titleBarStyle: 'light' | 'dark'
/**
* Used to highlight access keys throughout the app when the
* Alt key is pressed. Only applicable on non-macOS platforms.

View file

@ -597,8 +597,6 @@ export class AppStore extends TypedBaseStore<IAppState> {
commitSummaryWidth: this.commitSummaryWidth,
stashedFilesWidth: this.stashedFilesWidth,
appMenuState: this.appMenu ? this.appMenu.openMenus : [],
titleBarStyle:
this.showWelcomeFlow || repositories.length === 0 ? 'light' : 'dark',
highlightAccessKeys: this.highlightAccessKeys,
isUpdateAvailableBannerVisible: this.isUpdateAvailableBannerVisible,
currentBanner: this.currentBanner,

View file

@ -1110,11 +1110,6 @@ export class App extends React.Component<IAppProps, IAppState> {
return null
}
// Don't render the menu bar when the blank slate is shown
if (this.state.repositories.length < 1) {
return null
}
const currentFoldout = this.state.currentFoldout
// AppMenuBar requires us to pass a strongly typed AppMenuFoldout state or
@ -1162,11 +1157,23 @@ export class App extends React.Component<IAppProps, IAppState> {
}
const showAppIcon = __WIN32__ && !this.state.showWelcomeFlow
const inWelcomeFlow = this.state.showWelcomeFlow
const inNoRepositoriesView = this.state.repositories.length === 0
// The light title bar style should only be used while we're in
// the welcome flow as well as the no-repositories blank slate
// on macOS. The latter case has to do with the application menu
// being part of the title bar on Windows. We need to render
// the app menu in the no-repositories blank slate on Windows but
// the menu doesn't support the light style at the moment so we're
// forcing it to use the dark style.
const titleBarStyle =
inWelcomeFlow || (__DARWIN__ && inNoRepositoriesView) ? 'light' : 'dark'
return (
<TitleBar
showAppIcon={showAppIcon}
titleBarStyle={this.state.titleBarStyle}
titleBarStyle={titleBarStyle}
windowState={this.state.windowState}
windowZoomFactor={this.state.windowZoomFactor}
>