diff --git a/web/src/js/components/ContentView/ContentViews.jsx b/web/src/js/components/ContentView/ContentViews.jsx index 89e97267b..a1bee54ef 100644 --- a/web/src/js/components/ContentView/ContentViews.jsx +++ b/web/src/js/components/ContentView/ContentViews.jsx @@ -39,8 +39,11 @@ function ViewAuto({ message, flow, readonly, onChange }) { return } -function ViewServer({content, contentView}){ + +function ViewServer({content, contentView, message, flow}){ let data = JSON.parse(content) + let showImage = isImage.test(MessageUtils.getContentType(message)) + return
{contentView != data.description &&
{data.description}
@@ -56,6 +59,11 @@ function ViewServer({content, contentView}){
)} + {showImage && +
+ preview +
+ } } diff --git a/web/src/js/components/ContentView/ViewSelector.jsx b/web/src/js/components/ContentView/ViewSelector.jsx index 423cc157d..e031b51f5 100644 --- a/web/src/js/components/ContentView/ViewSelector.jsx +++ b/web/src/js/components/ContentView/ViewSelector.jsx @@ -35,10 +35,8 @@ function ViewSelector({ message, contentViews }) { return (
- auto: {autoViewName} - {Object.keys(ContentViews).map(name => - name !== "ViewAuto" && name !== "ViewServer" && + name === "ViewRaw" && {name.toLowerCase().replace('view', '')} )} diff --git a/web/src/js/ducks/ui/flow.js b/web/src/js/ducks/ui/flow.js index c94356765..549efb1d0 100644 --- a/web/src/js/ducks/ui/flow.js +++ b/web/src/js/ducks/ui/flow.js @@ -14,7 +14,7 @@ export const SET_CONTENT_VIEW = 'UI_FLOWVIEW_SET_CONTENT_VIEW', const defaultState = { displayLarge: false, modifiedFlow: false, - contentView: 'ViewAuto', + contentView: 'Auto', tab: 'request', }