54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
import { GetWebAppConfigValue } from "../../config_storage/actions";
|
|
import { FirmwareConfig } from "farmbot/dist/resources/configs/firmware";
|
|
import {
|
|
SourceFwConfig, SourceFbosConfig, UserEnv, ShouldDisplay,
|
|
SaveFarmwareEnv, BotState, ControlPanelState,
|
|
} from "../../devices/interfaces";
|
|
import { ResourceIndex } from "../../resources/interfaces";
|
|
import { TaggedDevice, Alert } from "farmbot";
|
|
import { TimeSettings } from "../../interfaces";
|
|
import { DeviceSetting } from "../../constants";
|
|
import {
|
|
BooleanConfigKey as WebAppBooleanConfigKey,
|
|
} from "farmbot/dist/resources/configs/web_app";
|
|
|
|
export interface DesignerSettingsPropsBase {
|
|
dispatch: Function;
|
|
getConfigValue: GetWebAppConfigValue;
|
|
}
|
|
|
|
export interface DesignerSettingsProps extends DesignerSettingsPropsBase {
|
|
firmwareConfig: FirmwareConfig | undefined;
|
|
sourceFwConfig: SourceFwConfig;
|
|
sourceFbosConfig: SourceFbosConfig;
|
|
resources: ResourceIndex;
|
|
deviceAccount: TaggedDevice;
|
|
env: UserEnv;
|
|
alerts: Alert[];
|
|
shouldDisplay: ShouldDisplay;
|
|
saveFarmwareEnv: SaveFarmwareEnv;
|
|
timeSettings: TimeSettings;
|
|
bot: BotState;
|
|
searchTerm: string;
|
|
}
|
|
|
|
export interface DesignerSettingsSectionProps {
|
|
dispatch: Function;
|
|
controlPanelState: ControlPanelState;
|
|
getConfigValue: GetWebAppConfigValue;
|
|
}
|
|
|
|
export interface SettingDescriptionProps {
|
|
setting?: WebAppBooleanConfigKey;
|
|
title: DeviceSetting;
|
|
description: string;
|
|
invert?: boolean;
|
|
callback?: () => void;
|
|
children?: React.ReactChild;
|
|
defaultOn?: boolean;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export interface SettingProps
|
|
extends DesignerSettingsPropsBase, SettingDescriptionProps { }
|