From e5bf1e930a5b6ba0b3300b02daf792d65d795202 Mon Sep 17 00:00:00 2001
From: Jason <jason.daurus@gmail.com>
Date: Tue, 14 Jun 2016 23:52:00 +0800
Subject: [web] FlowView and ContentView

---
 .../js/components/ContentView/ContentErrors.jsx    | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 web/src/js/components/ContentView/ContentErrors.jsx

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

diff --git a/web/src/js/components/ContentView/ContentErrors.jsx b/web/src/js/components/ContentView/ContentErrors.jsx
new file mode 100644
index 00000000..11594c7f
--- /dev/null
+++ b/web/src/js/components/ContentView/ContentErrors.jsx
@@ -0,0 +1,28 @@
+import React from 'react'
+import { ViewImage } from './ContentViews'
+import {formatSize} from '../../utils.js'
+
+export function ContentEmpty({ flow, message }) {
+    return (
+        <div className="alert alert-info">
+            No {flow.request === message ? 'request' : 'response'} content.
+        </div>
+    )
+}
+
+export function ContentMissing({ flow, message }) {
+    return (
+        <div className="alert alert-info">
+            {flow.request === message ? 'Request' : 'Response'} content missing.
+        </div>
+    )
+}
+
+export function ContentTooLarge({ message, onClick }) {
+    return (
+        <div className="alert alert-warning">
+            <button onClick={onClick} className="btn btn-xs btn-warning pull-right">Display anyway</button>
+            {formatSize(message.contentLength)} content size.
+        </div>
+    )
+}
-- 
cgit v1.2.3

