diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx
index b4f1fc824..ee955c0ca 100644
--- a/client/homebrew/editor/editor.jsx
+++ b/client/homebrew/editor/editor.jsx
@@ -341,6 +341,14 @@ const Editor = createClass({
return this.refs.codeEditor?.undo();
},
+ foldCode : function(){
+ return this.refs.codeEditor?.foldAllCode();
+ },
+
+ unfoldCode : function(){
+ return this.refs.codeEditor?.unfoldAllCode();
+ },
+
render : function(){
return (
@@ -354,6 +362,8 @@ const Editor = createClass({
theme={this.props.brew.theme}
undo={this.undo}
redo={this.redo}
+ foldCode={this.foldCode}
+ unfoldCode={this.unfoldCode}
historySize={this.historySize()}
currentEditorTheme={this.state.editorTheme}
updateEditorTheme={this.updateEditorTheme}
diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx
index 246d534a9..d60e51388 100644
--- a/client/homebrew/editor/snippetbar/snippetbar.jsx
+++ b/client/homebrew/editor/snippetbar/snippetbar.jsx
@@ -37,6 +37,8 @@ const Snippetbar = createClass({
undo : ()=>{},
redo : ()=>{},
historySize : ()=>{},
+ foldCode : ()=>{},
+ unfoldCode : ()=>{},
updateEditorTheme : ()=>{},
cursorPos : {}
};
@@ -144,6 +146,22 @@ const Snippetbar = createClass({
renderEditorButtons : function(){
if(!this.props.showEditButtons) return;
+ let foldButtons;
+ if(this.props.view == 'text'){
+ foldButtons =
+ <>
+
+
+
+
+
+
+ >
+
+ }
+
return
@@ -154,6 +172,7 @@ const Snippetbar = createClass({
+ {foldButtons}
diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less
index ed2dcebce..8dc6a8b9d 100644
--- a/client/homebrew/editor/snippetbar/snippetbar.less
+++ b/client/homebrew/editor/snippetbar/snippetbar.less
@@ -10,7 +10,6 @@
top : 0px;
right : 0px;
height : @menuHeight;
- width : 125px;
justify-content : space-between;
&>div{
height : @menuHeight;
@@ -46,6 +45,22 @@
color : black;
}
}
+ &.foldAll{
+ .tooltipLeft('Fold All');
+ font-size : 0.75em;
+ color : grey;
+ &.active{
+ color : black;
+ }
+ }
+ &.unfoldAll{
+ .tooltipLeft('Unfold All');
+ font-size : 0.75em;
+ color : grey;
+ &.active{
+ color : black;
+ }
+ }
&.editorTheme{
.tooltipLeft('Editor Themes');
font-size : 0.75em;