Install farmbot@8.0.1-rc8
parent
8c9d97d14a
commit
adda53433b
|
@ -307,6 +307,7 @@ export function fakeWebAppConfig(): TaggedWebAppConfig {
|
|||
photo_filter_begin: "2018-01-11T20:20:38.362Z",
|
||||
photo_filter_end: "2018-01-22T15:32:41.970Z",
|
||||
discard_unsaved: false,
|
||||
discard_unsaved_sequences: false,
|
||||
xy_swap: false,
|
||||
home_button_homing: false,
|
||||
show_motor_plot: false,
|
||||
|
|
|
@ -4,7 +4,6 @@ import { EnvName } from "./interfaces";
|
|||
import { all } from "../resources/selectors";
|
||||
import { getWebAppConfig } from "../resources/getters";
|
||||
import { TaggedResource, TaggedWebAppConfig } from "farmbot";
|
||||
import { BooleanConfigKey } from "farmbot/dist/resources/configs/web_app";
|
||||
|
||||
export function stopThem() { return "You have unsaved work."; }
|
||||
export function dontStopThem() { }
|
||||
|
@ -16,7 +15,7 @@ const shouldStop =
|
|||
const discardUnsaved = config && config.body.discard_unsaved;
|
||||
const sequenceResources = allResources.filter(r => r.kind === "Sequence");
|
||||
const discardUnsavedSequences =
|
||||
config && config.body["discard_unsaved_sequences" as BooleanConfigKey];
|
||||
config && config.body["discard_unsaved_sequences"];
|
||||
|
||||
/**
|
||||
* For the unsaved notification to show, a user must:
|
||||
|
|
|
@ -97,7 +97,7 @@ export const SequenceSettingsMenu =
|
|||
label={t("Open options by default")}
|
||||
description={Content.EXPAND_STEP_OPTIONS} />
|
||||
<Setting {...commonProps}
|
||||
setting={"discard_unsaved_sequences" as BooleanConfigKey}
|
||||
setting={"discard_unsaved_sequences"}
|
||||
confirmation={Content.DISCARD_UNSAVED_SEQUENCE_CHANGES_CONFIRM}
|
||||
label={t("Discard unsaved sequence changes")}
|
||||
description={Content.DISCARD_UNSAVED_SEQUENCE_CHANGES} />
|
||||
|
|
|
@ -33,6 +33,7 @@ export const BooleanSetting: Record<BooleanConfigKey, BooleanConfigKey> = {
|
|||
confirm_step_deletion: "confirm_step_deletion",
|
||||
show_pins: "show_pins",
|
||||
expand_step_options: "expand_step_options",
|
||||
discard_unsaved_sequences: "discard_unsaved_sequences",
|
||||
|
||||
/** App settings */
|
||||
disable_i18n: "disable_i18n",
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
"coveralls": "3.0.4",
|
||||
"enzyme": "3.10.0",
|
||||
"enzyme-adapter-react-16": "1.14.0",
|
||||
"farmbot": "8.0.1-rc7",
|
||||
"farmbot": "8.0.1-rc8",
|
||||
"farmbot-toastr": "1.0.3",
|
||||
"i18next": "17.0.4",
|
||||
"jest": "24.8.0",
|
||||
|
|
Loading…
Reference in New Issue