this.state.expanded ? collapse() : expand()}>
-
- {((inline && name) ? (name + ": ") : "") + (this.props.value || "select a value")}
-
+
{fieldValue}
{options}
diff --git a/frontend/src/components/fields/ChoiceField.scss b/frontend/src/components/fields/ChoiceField.scss
index 7f32b0e..e7683b7 100644
--- a/frontend/src/components/fields/ChoiceField.scss
+++ b/frontend/src/components/fields/ChoiceField.scss
@@ -16,7 +16,7 @@
border: none;
color: $color-primary-4;
border-radius: 5px;
- padding: 7px 10px;
+ padding: 7px 25px 7px 10px;
cursor: pointer;
&:after {
diff --git a/frontend/src/components/fields/extensions/ColorField.js b/frontend/src/components/fields/extensions/ColorField.js
index edcb720..c1c210f 100644
--- a/frontend/src/components/fields/extensions/ColorField.js
+++ b/frontend/src/components/fields/extensions/ColorField.js
@@ -1,5 +1,5 @@
import React, {Component} from 'react';
-import {Button, ButtonGroup, Form, OverlayTrigger, Popover} from "react-bootstrap";
+import {OverlayTrigger, Popover} from "react-bootstrap";
import './ColorField.scss';
import InputField from "../InputField";
@@ -9,7 +9,6 @@ class ColorField extends Component {
super(props);
this.state = {
- invalid: false
};
this.colors = ["#E53935", "#D81B60", "#8E24AA", "#5E35B1", "#3949AB", "#1E88E5", "#039BE5", "#00ACC1",
@@ -18,8 +17,7 @@ class ColorField extends Component {
render() {
const colorButtons = this.colors.map((color) =>
-
{
this.setState({color: color});
if (typeof this.props.onChange === "function") {
@@ -44,16 +42,19 @@ class ColorField extends Component {
);
+ let buttonStyles = {};
+ if (this.state.color) {
+ buttonStyles["backgroundColor"] = this.state.color;
+ }
+
return (
-
+
);
}
diff --git a/frontend/src/components/fields/extensions/ColorField.scss b/frontend/src/components/fields/extensions/ColorField.scss
index c8f617c..1c3931f 100644
--- a/frontend/src/components/fields/extensions/ColorField.scss
+++ b/frontend/src/components/fields/extensions/ColorField.scss
@@ -16,15 +16,14 @@
.color-picker {
margin-bottom: 5.5px;
- .btn-picker {
- padding: 8.5px 15px;
+ .picker-button {
+ font-size: 0.8em;
+ padding: 8px 15px;
border-bottom-right-radius: 5px;
border-top-right-radius: 5px;
- background-color: $color-indigo;
+ background-color: $color-primary-1;
}
}
-
-
}
.colors-container {
diff --git a/frontend/src/components/panels/PcapPane.js b/frontend/src/components/panels/PcapPane.js
index 7e0fa6c..a491dff 100644
--- a/frontend/src/components/panels/PcapPane.js
+++ b/frontend/src/components/panels/PcapPane.js
@@ -3,10 +3,11 @@ import './PcapPane.scss';
import Table from "react-bootstrap/Table";
import backend from "../../backend";
import {createCurlCommand, formatSize, timestampToTime2} from "../../utils";
-import {Button, Col, Container, Row} from "react-bootstrap";
+import {Col, Container, Row} from "react-bootstrap";
import InputField from "../fields/InputField";
import CheckField from "../fields/CheckField";
import TextField from "../fields/TextField";
+import ButtonField from "../fields/ButtonField";
class PcapPane extends Component {
@@ -167,7 +168,7 @@ class PcapPane extends Component {
this.setState({uploadFlushAll: v})}/>
-
+