@@ -29,6 +29,8 @@ interface IAppearanceProps {
2929 readonly onShowRecentRepositoriesChanged : ( show : boolean ) => void
3030 readonly showWorktrees : boolean
3131 readonly onShowWorktreesChanged : ( show : boolean ) => void
32+ readonly showCompareTab : boolean
33+ readonly onShowCompareTabChanged : ( show : boolean ) => void
3234 readonly showBranchNameInRepoList : ShowBranchNameInRepoListSetting
3335 readonly onShowBranchNameInRepoListChanged : (
3436 value : ShowBranchNameInRepoListSetting
@@ -45,6 +47,7 @@ interface IAppearanceState {
4547 readonly titleBarStyle : TitleBarStyle
4648 readonly showRecentRepositories : boolean
4749 readonly showWorktrees : boolean
50+ readonly showCompareTab : boolean
4851}
4952
5053function getTitleBarStyleDescription ( titleBarStyle : TitleBarStyle ) : string {
@@ -73,6 +76,7 @@ export class Appearance extends React.Component<
7376 titleBarStyle : props . titleBarStyle ,
7477 showRecentRepositories : props . showRecentRepositories ,
7578 showWorktrees : props . showWorktrees ,
79+ showCompareTab : props . showCompareTab ,
7680 }
7781
7882 if ( ! usePropTheme ) {
@@ -124,6 +128,14 @@ export class Appearance extends React.Component<
124128 this . props . onShowWorktreesChanged ( show )
125129 }
126130
131+ private onShowCompareTabChanged = (
132+ event : React . FormEvent < HTMLInputElement >
133+ ) => {
134+ const show = event . currentTarget . checked
135+ this . setState ( { showCompareTab : show } )
136+ this . props . onShowCompareTabChanged ( show )
137+ }
138+
127139 private onSelectedTabSizeChanged = (
128140 event : React . FormEvent < HTMLSelectElement >
129141 ) => {
@@ -340,17 +352,30 @@ export class Appearance extends React.Component<
340352
341353 private renderWorktreeVisibility ( ) {
342354 return (
343- < div className = "advanced-section" >
344- < h2 id = "worktree-heading" > { 'Worktrees' } </ h2 >
345-
346- < Checkbox
347- label = "Show worktrees dropdown in toolbar"
348- value = {
349- this . state . showWorktrees ? CheckboxValue . On : CheckboxValue . Off
350- }
351- onChange = { this . onShowWorktreesChanged }
352- />
353- </ div >
355+ < >
356+ < div className = "advanced-section" >
357+ < h2 id = "worktree-heading" > { 'Worktrees' } </ h2 >
358+
359+ < Checkbox
360+ label = "Show worktrees dropdown in toolbar"
361+ value = {
362+ this . state . showWorktrees ? CheckboxValue . On : CheckboxValue . Off
363+ }
364+ onChange = { this . onShowWorktreesChanged }
365+ />
366+ </ div >
367+ < div className = "advanced-section" >
368+ < h2 > { 'Commit list' } </ h2 >
369+
370+ < Checkbox
371+ label = "Show Compare tab"
372+ value = {
373+ this . state . showCompareTab ? CheckboxValue . On : CheckboxValue . Off
374+ }
375+ onChange = { this . onShowCompareTabChanged }
376+ />
377+ </ div >
378+ </ >
354379 )
355380 }
356381
0 commit comments