From 3e6c284757ffbb42aef34281567cf1adedd21ae9 Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Wed, 27 Jul 2016 17:27:01 +0200
Subject: add contentviews to client

---
 web/src/js/components/ContentView.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'web/src/js/components/ContentView.jsx')

diff --git a/web/src/js/components/ContentView.jsx b/web/src/js/components/ContentView.jsx
index 75662509..a93ce395 100644
--- a/web/src/js/components/ContentView.jsx
+++ b/web/src/js/components/ContentView.jsx
@@ -33,10 +33,10 @@ function ContentView(props) {
         return <MetaViews.ContentTooLarge {...props} onClick={displayLarge}/>
     }
 
-    const View = ContentViews[contentView]
+    const View = ContentViews[contentView] || ContentViews['ViewServer']
     return (
         <div>
-            <View flow={flow} message={message} readonly={readonly} onChange={onContentChange}/>
+            <View flow={flow} message={message} contentView={contentView} readonly={readonly} onChange={onContentChange}/>
 
             <div className="view-options text-center">
                 <ViewSelector message={message}/>
-- 
cgit v1.2.3


From ad5bebeda0f1da890d8ed94b6096515e03f44a25 Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Thu, 28 Jul 2016 17:10:06 +0200
Subject: mitmproxy.contentviews added

---
 web/src/js/components/ContentView.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/src/js/components/ContentView.jsx')

diff --git a/web/src/js/components/ContentView.jsx b/web/src/js/components/ContentView.jsx
index a93ce395..de4ffd06 100644
--- a/web/src/js/components/ContentView.jsx
+++ b/web/src/js/components/ContentView.jsx
@@ -35,7 +35,7 @@ function ContentView(props) {
 
     const View = ContentViews[contentView] || ContentViews['ViewServer']
     return (
-        <div>
+        <div className="contentview">
             <View flow={flow} message={message} contentView={contentView} readonly={readonly} onChange={onContentChange}/>
 
             <div className="view-options text-center">
-- 
cgit v1.2.3


From 34fe391afbe18f89d774137f82620024f697ab6a Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Wed, 3 Aug 2016 12:08:10 +0200
Subject: add view all button, add dropdown for contentviews

---
 web/src/js/components/ContentView.jsx | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

(limited to 'web/src/js/components/ContentView.jsx')

diff --git a/web/src/js/components/ContentView.jsx b/web/src/js/components/ContentView.jsx
index de4ffd06..9ec283ca 100644
--- a/web/src/js/components/ContentView.jsx
+++ b/web/src/js/components/ContentView.jsx
@@ -5,6 +5,7 @@ import * as MetaViews from './ContentView/MetaViews'
 import ViewSelector from './ContentView/ViewSelector'
 import UploadContentButton from './ContentView/UploadContentButton'
 import DownloadContentButton from './ContentView/DownloadContentButton'
+import ShowFullContentButton from './ContentView/ShowFullContentButton'
 
 import { setContentView, displayLarge, updateEdit } from '../ducks/ui/flow'
 
@@ -19,7 +20,7 @@ ContentView.propTypes = {
 ContentView.isContentTooLarge = msg => msg.contentLength > 1024 * 1024 * (ContentViews.ViewImage.matches(msg) ? 10 : 0.2)
 
 function ContentView(props) {
-    const { flow, message, contentView, isDisplayLarge, displayLarge, uploadContent, onContentChange, readonly } = props
+    const { flow, message, contentView, isDisplayLarge, displayLarge, uploadContent, onContentChange, readonly, contentViewDescription } = props
 
     if (message.contentLength === 0 && readonly) {
         return <MetaViews.ContentEmpty {...props}/>
@@ -37,13 +38,15 @@ function ContentView(props) {
     return (
         <div className="contentview">
             <View flow={flow} message={message} contentView={contentView} readonly={readonly} onChange={onContentChange}/>
-
-            <div className="view-options text-center">
+            <ShowFullContentButton/>
+            <div className="view-options">
                 <ViewSelector message={message}/>
                 &nbsp;
                 <DownloadContentButton flow={flow} message={message}/>
                 &nbsp;
                 <UploadContentButton uploadContent={uploadContent}/>
+                &nbsp;
+                <span>{contentViewDescription}</span>
             </div>
         </div>
     )
@@ -53,6 +56,7 @@ export default connect(
     state => ({
         contentView: state.ui.flow.contentView,
         isDisplayLarge: state.ui.flow.displayLarge,
+        contentViewDescription: state.ui.flow.viewDescription
     }),
     {
         displayLarge,
-- 
cgit v1.2.3


From a8aa1f2d1c8fe19313ca8abe07f9d6aa431fc3c3 Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Thu, 4 Aug 2016 09:34:36 +0200
Subject: fix get contentview in mitmweb

---
 web/src/js/components/ContentView.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/src/js/components/ContentView.jsx')

diff --git a/web/src/js/components/ContentView.jsx b/web/src/js/components/ContentView.jsx
index 9ec283ca..128d8e81 100644
--- a/web/src/js/components/ContentView.jsx
+++ b/web/src/js/components/ContentView.jsx
@@ -39,7 +39,7 @@ function ContentView(props) {
         <div className="contentview">
             <View flow={flow} message={message} contentView={contentView} readonly={readonly} onChange={onContentChange}/>
             <ShowFullContentButton/>
-            <div className="view-options">
+            <div className="view-options footer navbar-fixed-bottom">
                 <ViewSelector message={message}/>
                 &nbsp;
                 <DownloadContentButton flow={flow} message={message}/>
-- 
cgit v1.2.3


From 9b0b007a5da75d70ec25b141c2a47b1b0010f5a3 Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Fri, 5 Aug 2016 12:47:34 +0200
Subject: change some style

---
 web/src/js/components/ContentView.jsx | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

(limited to 'web/src/js/components/ContentView.jsx')

diff --git a/web/src/js/components/ContentView.jsx b/web/src/js/components/ContentView.jsx
index 128d8e81..398438ab 100644
--- a/web/src/js/components/ContentView.jsx
+++ b/web/src/js/components/ContentView.jsx
@@ -2,12 +2,10 @@ import React, { Component, PropTypes } from 'react'
 import { connect } from 'react-redux'
 import * as ContentViews from './ContentView/ContentViews'
 import * as MetaViews from './ContentView/MetaViews'
-import ViewSelector from './ContentView/ViewSelector'
-import UploadContentButton from './ContentView/UploadContentButton'
-import DownloadContentButton from './ContentView/DownloadContentButton'
 import ShowFullContentButton from './ContentView/ShowFullContentButton'
 
-import { setContentView, displayLarge, updateEdit } from '../ducks/ui/flow'
+
+import { displayLarge, updateEdit } from '../ducks/ui/flow'
 
 ContentView.propTypes = {
     // It may seem a bit weird at the first glance:
@@ -20,7 +18,7 @@ ContentView.propTypes = {
 ContentView.isContentTooLarge = msg => msg.contentLength > 1024 * 1024 * (ContentViews.ViewImage.matches(msg) ? 10 : 0.2)
 
 function ContentView(props) {
-    const { flow, message, contentView, isDisplayLarge, displayLarge, uploadContent, onContentChange, readonly, contentViewDescription } = props
+    const { flow, message, contentView, isDisplayLarge, displayLarge, onContentChange, readonly } = props
 
     if (message.contentLength === 0 && readonly) {
         return <MetaViews.ContentEmpty {...props}/>
@@ -39,15 +37,6 @@ function ContentView(props) {
         <div className="contentview">
             <View flow={flow} message={message} contentView={contentView} readonly={readonly} onChange={onContentChange}/>
             <ShowFullContentButton/>
-            <div className="view-options footer navbar-fixed-bottom">
-                <ViewSelector message={message}/>
-                &nbsp;
-                <DownloadContentButton flow={flow} message={message}/>
-                &nbsp;
-                <UploadContentButton uploadContent={uploadContent}/>
-                &nbsp;
-                <span>{contentViewDescription}</span>
-            </div>
         </div>
     )
 }
@@ -56,7 +45,6 @@ export default connect(
     state => ({
         contentView: state.ui.flow.contentView,
         isDisplayLarge: state.ui.flow.displayLarge,
-        contentViewDescription: state.ui.flow.viewDescription
     }),
     {
         displayLarge,
-- 
cgit v1.2.3

