Skip to content

Commit

Permalink
Fix patch.Error display
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Sep 9, 2020
1 parent 18bd6be commit 28c8045
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/ux/src/components/PageActivities.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class PageActivities extends Component {
</div>
</Sticky>
<div style={{paddingBottom: 6, paddingTop: 6}}>
{patch.Error && <div>{patch.Error}</div>}
{patch.Error && <div style={{color:Colors.error, padding: 10}}><Icon iconName={"Warning"}/> {patch.Error}</div>}
{patch.Root.Children.map((c,i) =>
<PatchNode
key={key+ "-" + i}
Expand Down
1 change: 0 additions & 1 deletion app/ux/src/models/Patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ class Patch {
this.Error = data.Error;
}
// Fix direction value
console.log("NEW PATCH", this, syncConfig);
if(this.Stats && this.Stats.Source === syncConfig.RightURI){
this.Root.reverseOperations();
}
Expand Down
4 changes: 2 additions & 2 deletions app/ux/src/task/PatchNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class PatchNode extends React.Component {
render(){
const {patch, patchError, level, stats, openPath, t, flatMode} = this.props;
const {open} = this.state;
if(!patch.hasOperations()){
if(!patch.hasOperations() && !patchError){
return null;
}
const isLeaf = patch.Node.Type === 1;
Expand Down Expand Up @@ -127,7 +127,7 @@ class PatchNode extends React.Component {
newLevel = level > 0 ? level -1 : level;
}
}
//console.log(hideMain, patch, level, newLevel);
console.log(hideMain, patchError, level, newLevel);
return (
<div style={{paddingLeft}}>
{!hideMain &&
Expand Down

0 comments on commit 28c8045

Please sign in to comment.