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/ViewSelector.jsx | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

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

diff --git a/web/src/js/components/ContentView/ViewSelector.jsx b/web/src/js/components/ContentView/ViewSelector.jsx
index 89b36231..c3e1e105 100644
--- a/web/src/js/components/ContentView/ViewSelector.jsx
+++ b/web/src/js/components/ContentView/ViewSelector.jsx
@@ -24,7 +24,7 @@ ViewButton = connect(state => ({
 ViewSelector.propTypes = {
     message: PropTypes.object.isRequired,
 }
-export default function ViewSelector({ message }) {
+function ViewSelector({ message, contentViews }) {
 
     let autoView = ContentViews.ViewAuto.findView(message)
     let autoViewName = (autoView.displayName || autoView.name)
@@ -42,6 +42,15 @@ export default function ViewSelector({ message }) {
                 <ViewButton key={name} name={name}>{name.toLowerCase().replace('view', '')}</ViewButton>
             )}
 
+            {contentViews.map(name =>
+                <ViewButton key={name} name={name}>{name.toLowerCase().replace('view', '')}</ViewButton>
+            )}
+
         </div>
     )
 }
+
+export default connect (
+    state => ({
+        contentViews: state.settings.contentViews
+    }))(ViewSelector)
-- 
cgit v1.2.3

