File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2637,7 +2637,7 @@ class GitGraphView {
26372637 }
26382638 html += '</div><div id="cdvControls"><div id="cdvClose" class="cdvControlBtn" title="Close">' + SVG_ICONS . close + '</div>' +
26392639 ( codeReviewPossible ? '<div id="cdvCodeReview" class="cdvControlBtn">' + SVG_ICONS . review + '</div>' : '' ) +
2640- ( ! expandedCommit . loading ? '<div id="cdvFileViewTypeTree " class="cdvControlBtn cdvFileViewTypeBtn" title="File Tree View">' + SVG_ICONS . fileTree + '</div><div id="cdvFileViewTypeList " class="cdvControlBtn cdvFileViewTypeBtn" title="File List View">' + SVG_ICONS . fileList + '</div><div id="cdvCollapse" class="cdvControlBtn" title="Collapse/Expand Folders">' + SVG_ICONS . collapseAll + '</div><div id="cdvExpand" class="cdvControlBtn" title="Expand Folders">' + SVG_ICONS . expandAll + '</div>' : '' ) +
2640+ ( ! expandedCommit . loading ? '<div id="cdvFileViewTypeList " class="cdvControlBtn cdvFileViewTypeBtn" title="File List View">' + SVG_ICONS . fileList + '</div><div id="cdvFileViewTypeTree " class="cdvControlBtn cdvFileViewTypeBtn" title="File Tree View">' + SVG_ICONS . fileTree + '</div><div id="cdvCollapse" class="cdvControlBtn cdvFolderBtn " title="Collapse/Expand Folders">' + SVG_ICONS . collapseAll + '</div><div id="cdvExpand" class="cdvControlBtn cdvFolderBtn " title="Expand Folders">' + SVG_ICONS . expandAll + '</div>' : '' ) +
26412641 ( externalDiffPossible ? '<div id="cdvExternalDiff" class="cdvControlBtn">' + SVG_ICONS . linkExternal + '</div>' : '' ) +
26422642 '</div><div class="cdvHeightResize"></div>' ;
26432643
@@ -3200,6 +3200,16 @@ class GitGraphView {
32003200 let listView = this . getFileViewType ( ) === GG . FileViewType . List ;
32013201 alterClass ( treeBtnElem , CLASS_ACTIVE , ! listView ) ;
32023202 alterClass ( listBtnElem , CLASS_ACTIVE , listView ) ;
3203+ setFolderBtns ( ) ;
3204+ function setFolderBtns ( ) {
3205+ let btns = document . getElementsByClassName ( 'cdvFolderBtn' ) ;
3206+ for ( let i = 0 ; i < btns . length ; i ++ ) {
3207+ if ( listView )
3208+ btns [ i ] . classList . add ( 'hidden' ) ;
3209+ else
3210+ btns [ i ] . classList . remove ( 'hidden' ) ;
3211+ }
3212+ }
32033213 }
32043214
32053215 private renderCdvExternalDiffBtn ( ) {
Original file line number Diff line number Diff line change @@ -349,6 +349,9 @@ table { border-collapse: collapse; }
349349.cdvControlBtn .active : hover {
350350 background-color : rgba (128 , 128 , 128 , 0.35 );
351351}
352+ .cdvFolderBtn .hidden {
353+ display : none;
354+ }
352355
353356# cdvCodeReview {
354357 border-radius : 4px ;
You can’t perform that action at this time.
0 commit comments