2017-06-29 12:54:02 -06:00
|
|
|
import { BotState } from "../devices/interfaces";
|
2019-04-09 18:45:51 -06:00
|
|
|
import { TaggedUser, TaggedLog, TaggedDevice } from "farmbot";
|
2018-08-30 19:25:58 -06:00
|
|
|
import { GetWebAppConfigValue } from "../config_storage/actions";
|
2019-04-09 23:17:03 -06:00
|
|
|
import { TimeSettings } from "../interfaces";
|
2019-09-05 19:51:49 -06:00
|
|
|
import { PingDictionary } from "../devices/connectivity/qos";
|
2017-06-29 12:54:02 -06:00
|
|
|
|
2019-03-04 15:14:35 -07:00
|
|
|
export interface SyncButtonProps {
|
2017-06-29 12:54:02 -06:00
|
|
|
dispatch: Function;
|
|
|
|
bot: BotState;
|
2017-11-20 12:44:46 -07:00
|
|
|
consistent: boolean;
|
2017-06-29 12:54:02 -06:00
|
|
|
onClick?: () => void;
|
2019-04-11 21:17:18 -06:00
|
|
|
autoSync: boolean;
|
2017-06-29 12:54:02 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface NavBarProps {
|
2017-11-13 10:52:32 -07:00
|
|
|
consistent: boolean;
|
2018-05-17 14:12:33 -06:00
|
|
|
logs: TaggedLog[];
|
2017-06-29 12:54:02 -06:00
|
|
|
bot: BotState;
|
|
|
|
user: TaggedUser | undefined;
|
|
|
|
dispatch: Function;
|
2019-04-09 23:17:03 -06:00
|
|
|
timeSettings: TimeSettings;
|
2018-08-30 19:25:58 -06:00
|
|
|
getConfigValue: GetWebAppConfigValue;
|
2018-10-15 17:23:58 -06:00
|
|
|
tour: string | undefined;
|
2019-04-09 18:45:51 -06:00
|
|
|
device: TaggedDevice;
|
2019-04-11 21:17:18 -06:00
|
|
|
autoSync: boolean;
|
2019-04-16 11:03:44 -06:00
|
|
|
alertCount: number;
|
2019-09-05 19:51:49 -06:00
|
|
|
pings: PingDictionary;
|
2017-06-29 12:54:02 -06:00
|
|
|
}
|
2017-07-07 03:52:39 -06:00
|
|
|
|
|
|
|
export interface NavBarState {
|
|
|
|
mobileMenuOpen: boolean;
|
2017-07-07 10:50:52 -06:00
|
|
|
tickerListOpen: boolean;
|
2017-10-04 01:50:20 -06:00
|
|
|
accountMenuOpen: boolean;
|
2017-07-07 03:52:39 -06:00
|
|
|
}
|
|
|
|
|
2018-09-14 06:58:59 -06:00
|
|
|
type ToggleEventHandler = (e: React.MouseEvent<HTMLElement>) => void;
|
2017-07-24 11:38:23 -06:00
|
|
|
|
2017-07-07 03:52:39 -06:00
|
|
|
export interface MobileMenuProps {
|
2017-09-05 19:51:38 -06:00
|
|
|
close: (property: keyof NavBarState) => ToggleEventHandler;
|
2017-07-07 03:52:39 -06:00
|
|
|
mobileMenuOpen: boolean;
|
2019-04-16 11:03:44 -06:00
|
|
|
alertCount: number;
|
2017-07-07 03:52:39 -06:00
|
|
|
}
|
2017-07-07 10:50:52 -06:00
|
|
|
|
|
|
|
export interface TickerListProps {
|
2017-07-24 11:38:23 -06:00
|
|
|
toggle: (property: keyof NavBarState) => ToggleEventHandler;
|
2018-05-17 14:12:33 -06:00
|
|
|
logs: TaggedLog[]
|
2017-07-07 10:50:52 -06:00
|
|
|
tickerListOpen: boolean;
|
2019-04-09 23:17:03 -06:00
|
|
|
timeSettings: TimeSettings;
|
2018-08-30 19:25:58 -06:00
|
|
|
getConfigValue: GetWebAppConfigValue;
|
2017-07-07 10:50:52 -06:00
|
|
|
}
|
2017-08-11 15:48:20 -06:00
|
|
|
|
|
|
|
export interface NavLinksProps {
|
2017-09-05 19:51:38 -06:00
|
|
|
close: (property: keyof NavBarState) => ToggleEventHandler;
|
2019-04-16 11:03:44 -06:00
|
|
|
alertCount: number;
|
2017-08-11 15:48:20 -06:00
|
|
|
}
|
2017-10-04 01:50:20 -06:00
|
|
|
|
|
|
|
export interface AccountMenuProps {
|
|
|
|
close: (property: keyof NavBarState) => ToggleEventHandler;
|
|
|
|
logout: () => void;
|
|
|
|
}
|