Skip to content

Commit

Permalink
Fixes for new queue add flow
Browse files Browse the repository at this point in the history
relates to xibosignage/xibo#3486

- Fix to remove stuck loading icon
- Catch reloadData promise error to avoid console.error
  • Loading branch information
maurofmferrao committed Sep 27, 2024
1 parent 3cb10d1 commit fb6f926
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion ui/src/editor-core/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@ Widget.prototype.saveElements = function(
// Clear request var after response
self.saveElementsRequest = undefined;

lD.common.hideLoadingScreen();

if (res.success) {
return reloadLayout();
} else {
Expand All @@ -1085,7 +1087,6 @@ Widget.prototype.saveElements = function(
}
}
}
lD.common.hideLoadingScreen();
});

// If this request is forced, save flag and return request
Expand Down
10 changes: 5 additions & 5 deletions ui/src/layout-editor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2928,7 +2928,7 @@ lD.addModuleToPlaylist = function(
{
refreshEditor: true,
resetPropertiesPanelOpenedTab: true,
});
}).catch(console.debug);

resolve();
});
Expand All @@ -2938,7 +2938,7 @@ lD.addModuleToPlaylist = function(
{
refreshEditor: true,
resetPropertiesPanelOpenedTab: true,
});
}).catch(console.debug);

resolve();
}
Expand Down Expand Up @@ -3052,7 +3052,7 @@ lD.addModuleToPlaylist = function(
{
refreshEditor: true,
resetPropertiesPanelOpenedTab: true,
});
}).catch(console.debug);
} else {
const newWidgetId = res.data.widgetId;
// Reload data ( and viewer )
Expand All @@ -3074,7 +3074,7 @@ lD.addModuleToPlaylist = function(
);
},
},
);
).catch(console.debug);
}

lD.common.hideLoadingScreen();
Expand Down Expand Up @@ -5759,7 +5759,7 @@ lD.addElementsToWidget = function(

// Update viewer to revalidate all elements
lD.viewer.update();
});
}).catch(console.debug);
});
});
};
Expand Down

0 comments on commit fb6f926

Please sign in to comment.