diff --git a/public/css/main.css b/public/css/main.css index 56da8af..630412e 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -119,7 +119,7 @@ Feedback field position: relative; text-align: center; top:200px; - background:rgba(0, 0, 0, 0.4); + background:rgba(0, 0, 0, 0.4); width: 550px; height: 225px; color: white; diff --git a/src/actions/index.js b/src/actions/index.js index d70edc6..ae354ce 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -38,11 +38,19 @@ export const GET_KUBAM_IP = 'GET_KUBAM_IP'; export const RECEIVED_KUBAM_IP = 'RECEIVED_KUBAM_IP'; export const GET_PROXY = 'GET_PROXY'; export const RECEIVED_PROXY = 'RECEIVED_PROXY'; + +export const GET_ORG = 'GET_ORG'; +export const RECEIVED_ORG = 'RECEIVED_ORG'; + export const UPDATE_SETTINGS = 'UPDATE_SETTINGS'; export const DID_UPDATE_SETTINGS = 'DID_UPDATE_SETTINGS'; export const DEPLOY = 'DEPLOY'; export const DESTROY = 'DESTROY'; export const DID_DEPLOY = 'DID_DEPLOY'; +/* Feedback */ +export const POST_FEEDBACK = 'POST_FEEDBACK'; +export const POSTED_FEEDBACK = 'POSTED_FEEDBACK'; + export const selectTab = (selected) => ({ type: SELECTED_TAB, @@ -183,17 +191,28 @@ export const receivedProxy = (proxy) => ({ proxy, }) +export const getOrg = () => ({ + type: GET_ORG, +}) + +export const receivedOrg = (org) => ({ + type: RECEIVED_ORG, + org, +}) + + export const receivedKeys = (keys) => ({ type: RECEIVED_KEYS, keys, }) // update settings -export const updateSettings = (kubam_ip, keys, proxy) => ({ +export const updateSettings = (kubam_ip, keys, proxy, org) => ({ type: UPDATE_SETTINGS, kubam_ip, keys, proxy, + org, }) @@ -223,3 +242,15 @@ export const receivedCatalog = (catalog) => ({ type: RECEIVED_CATALOG, catalog, }) + +export const postFeedback = (feedback) => ({ + type: POST_FEEDBACK, + feedback, +}) + +export const postedFeedback = (response) => ({ + type: POSTED_FEEDBACK, + response, +}) + + diff --git a/src/components/Feedbackfield.js b/src/components/Feedbackfield.js index a49d4d9..816cce2 100644 --- a/src/components/Feedbackfield.js +++ b/src/components/Feedbackfield.js @@ -1,51 +1,76 @@ -import React from 'react' +import React, {Component } from 'react' +import { connect } from 'react-redux' +import {postFeedback} from '../actions' //import PropTypes from 'prop-types' -var Feedbackfield = ({selected, onClick}) => ( -
- -
- - Tell us something... - -
- -
-
-
- X -
-
- Tell us something... -

- -

- - -
-
-
-
-); - -Feedbackfield.propTypes = { - // onClick: PropTypes.func.isRequired, -} - -export default Feedbackfield - -function activateLasers(){ +class Feedbackfield extends Component { + activateLasers = () => { var feedbackoverlay=document.getElementById("feedbackoverlay"); feedbackoverlay.style.display = 'inline'; return; -} + } -function deactivateLasers(){ + deactivateLasers = () => { var feedbackoverlay=document.getElementById("feedbackoverlay"); feedbackoverlay.style.display = 'none'; return; + } + + submitFeedback = (e) => { + e.preventDefault(); + var m = document.getElementById("message") + this.props.postFeedback(m.value) + m.value = "" + this.deactivateLasers() + } + + render() { + return ( +
+
+ + Tell us something... + +
+ +
+
+
+ × +
+
+ Tell us something... +

+