File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
src/webviews/apps/plus/home/components Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,10 @@ export class GlBranchSection extends LitElement {
5858 @property ( { type : Boolean } ) isFetching = false ;
5959
6060 private renderSectionLabel ( ) {
61- if ( this . isFetching ) {
61+ if ( this . isFetching || this . branches . length === 0 ) {
6262 return this . label ;
6363 }
64- if ( ! this . branches . length ) {
65- return `No ${ this . label } branches` ;
66- }
64+
6765 return `${ this . label } (${ this . branches . length } )` ;
6866 }
6967
@@ -75,6 +73,14 @@ export class GlBranchSection extends LitElement {
7573 ${ this . branches . map (
7674 branch => html `< gl-branch-card .repo =${ this . repo } .branch =${ branch } > </ gl-branch-card > ` ,
7775 ) }
76+ ${ when (
77+ this . branches . length > 0 ,
78+ ( ) =>
79+ this . branches . map (
80+ branch => html `< gl-branch-card .repo =${ this . repo } .branch =${ branch } > </ gl-branch-card > ` ,
81+ ) ,
82+ ( ) => html `< p > No ${ this . label } branches</ p > ` ,
83+ ) }
7884 </ gl-section >
7985 ` ;
8086 }
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export class GlOverview extends SignalWatcher(LitElement) {
9696 const { repository } = overview ;
9797 return html `
9898 < gl-branch-section
99- label ="Recent "
99+ label ="recent "
100100 .isFetching =${ isFetching }
101101 .repo =${ repository . path }
102102 .branches=${ repository . branches . recent }
@@ -120,7 +120,7 @@ export class GlOverview extends SignalWatcher(LitElement) {
120120 this . _overviewState . filter . stale ?. show === true ,
121121 ( ) => html `
122122 < gl-branch-section
123- label ="Stale "
123+ label ="stale "
124124 .repo =${ repository . path }
125125 .branches =${ repository . branches . stale }
126126 > </ gl-branch-section >
You can’t perform that action at this time.
0 commit comments