diff --git a/frontend/css/global.scss b/frontend/css/global.scss index 922ec3f44..2b34374ee 100644 --- a/frontend/css/global.scss +++ b/frontend/css/global.scss @@ -146,6 +146,7 @@ fieldset { .connectivity-diagram svg { max-height: 200px !important; } + .network-info, .fbos-info { @media (max-width:767px) { display: none; @@ -219,6 +220,7 @@ fieldset { } } +.network-info, .fbos-info { margin: auto; margin-bottom: 2rem; @@ -855,9 +857,6 @@ ul { a { color: $panel_yellow; } - .empty-state-graphic { - filter: sepia(1) contrast(1.2) saturate(1.2); - } } &.points { p, @@ -882,9 +881,6 @@ ul { a { color: $panel_blue; } - // .empty-state-graphic { - // filter: hue-rotate(60deg) saturate(0.6); - // } } } diff --git a/frontend/css/steps.scss b/frontend/css/steps.scss index c2410c7ba..ae0b2d2c0 100644 --- a/frontend/css/steps.scss +++ b/frontend/css/steps.scss @@ -88,6 +88,9 @@ &.if-step { background: $purple; } + &.assertion-step { + background: $purple; + } &.execute-step { background: $gray; } @@ -180,18 +183,21 @@ } &.if-step { background: $light_purple; - h4 { - margin: 0 0 0.4rem; - font-style: italic; - &:not(.top) { - margin: 1.4rem 0 0.4rem; - } - } input { height: 3rem; } - .execute-row{ - margin-top:1rem; + .execute-row { + margin-top: 1rem; + } + } + &.assertion-step { + background: $light_purple; + input { + height: 3rem; + } + .assertion-sequence, + .assertion-type { + margin-top: 10px; } } &.execute-step { diff --git a/frontend/devices/connectivity/qos_panel.tsx b/frontend/devices/connectivity/qos_panel.tsx index 9090fe1aa..bd6ee17c5 100644 --- a/frontend/devices/connectivity/qos_panel.tsx +++ b/frontend/devices/connectivity/qos_panel.tsx @@ -53,15 +53,15 @@ export class QosPanel extends React.Component { const errorRateDecimal = ((r.complete) / r.total); const errorRate = Math.round(100 * errorRateDecimal).toFixed(0); - return
+ return
-
- - - - - - +
+ + + + + +
; diff --git a/frontend/farm_designer/farm_events/farm_events.tsx b/frontend/farm_designer/farm_events/farm_events.tsx index 275fe1d3c..c82e4008f 100644 --- a/frontend/farm_designer/farm_events/farm_events.tsx +++ b/frontend/farm_designer/farm_events/farm_events.tsx @@ -141,7 +141,7 @@ export class PureFarmEvents title={t("No events scheduled.")} text={t(Content.NOTHING_SCHEDULED)} colorScheme="events" - graphic={EmptyStateGraphic.no_farm_events}> + graphic={EmptyStateGraphic.farm_events}> {this.renderCalendarRows()}
diff --git a/frontend/farm_designer/point_groups/__tests__/group_detail_active_test.tsx b/frontend/farm_designer/point_groups/__tests__/group_detail_active_test.tsx index 635e195de..4073f8f96 100644 --- a/frontend/farm_designer/point_groups/__tests__/group_detail_active_test.tsx +++ b/frontend/farm_designer/point_groups/__tests__/group_detail_active_test.tsx @@ -1,6 +1,7 @@ jest.mock("../../../api/crud", () => ({ save: jest.fn(), - overwrite: jest.fn() + overwrite: jest.fn(), + edit: jest.fn(), })); jest.mock("../../actions", () => ({ @@ -13,7 +14,7 @@ import { mount, shallow } from "enzyme"; import { fakePointGroup, fakePlant } from "../../../__test_support__/fake_state/resources"; -import { save, overwrite } from "../../../api/crud"; +import { save, overwrite, edit } from "../../../api/crud"; import { toggleHoveredPlant } from "../../actions"; describe("", () => { @@ -27,6 +28,7 @@ describe("", () => { return { dispatch: jest.fn(), group, plants }; } const icon = "doge.jpg"; + it("removes points onClick", () => { const { plants, dispatch, group } = fakeProps(); const el = shallow(", () => { const el = mount(); expect(el.find("input").prop("defaultValue")).toContain("XYZ"); }); + + it("changes group name", () => { + const NEW_NAME = "new group name"; + const wrapper = shallow(); + wrapper.find("input").first().simulate("change", { + currentTarget: { value: NEW_NAME } + }); + expect(edit).toHaveBeenCalledWith(expect.any(Object), { name: NEW_NAME }); + }); }); diff --git a/frontend/farm_designer/point_groups/group_list_panel.tsx b/frontend/farm_designer/point_groups/group_list_panel.tsx index e96f13fe3..64e9abb89 100644 --- a/frontend/farm_designer/point_groups/group_list_panel.tsx +++ b/frontend/farm_designer/point_groups/group_list_panel.tsx @@ -56,7 +56,7 @@ export class GroupListPanel extends React.Component title={t("No groups yet.")} text={t(Content.NO_GROUPS)} colorScheme="groups" - graphic={EmptyStateGraphic.no_groups}> + graphic={EmptyStateGraphic.groups}> {this.props.groups .filter(p => p.body.name.toLowerCase() .includes(this.state.searchTerm.toLowerCase())) diff --git a/frontend/nav/additional_menu.tsx b/frontend/nav/additional_menu.tsx index b156f0c92..4bd49fa32 100644 --- a/frontend/nav/additional_menu.tsx +++ b/frontend/nav/additional_menu.tsx @@ -40,7 +40,7 @@ export const AdditionalMenu = (props: AccountMenuProps) => {
; diff --git a/frontend/sequences/step_tiles/tile_assertion.tsx b/frontend/sequences/step_tiles/tile_assertion.tsx index ae40ebfb9..583b8bbfc 100644 --- a/frontend/sequences/step_tiles/tile_assertion.tsx +++ b/frontend/sequences/step_tiles/tile_assertion.tsx @@ -12,8 +12,7 @@ export interface AssertionStepProps extends StepParams { currentStep: Assertion; } -const CLASS_NAME = "if-step"; -const MOVE_THIS_CSS_PLZ = { marginTop: "10px" }; +const CLASS_NAME = "assertion-step"; export function TileAssertion(props: StepParams) { const step = props.currentStep; @@ -37,9 +36,13 @@ export function TileAssertion(props: StepParams) { - -
-
+ + + + + + + ; diff --git a/frontend/sequences/step_tiles/tile_assertion/sequence_part.tsx b/frontend/sequences/step_tiles/tile_assertion/sequence_part.tsx index 9bb8e8214..ba77876b7 100644 --- a/frontend/sequences/step_tiles/tile_assertion/sequence_part.tsx +++ b/frontend/sequences/step_tiles/tile_assertion/sequence_part.tsx @@ -4,6 +4,7 @@ import { Assertion } from "farmbot/dist/corpus"; import React from "react"; import { SequenceSelectBox } from "../../sequence_select_box"; import { AssertionStepProps } from "../tile_assertion"; +import { t } from "../../../i18next_wrapper"; export function SequencePart(props: AssertionStepProps) { const onChange = (ddi: DropDownItem) => props.dispatch(editStep({ @@ -23,8 +24,8 @@ export function SequencePart(props: AssertionStepProps) { if (_then.kind == "execute") { sequenceId = _then.args.sequence_id; } - return - + return + = { "continue": { label: "Continue", value: "continue" }, @@ -13,8 +14,8 @@ const ASSERTION_TYPES: Record = { export function TypePart(props: AssertionStepProps) { const { assertion_type } = props.currentStep.args; - return - + return +