Don't show the "Welcome to the FarmBot Web App" or "Choose your FarmBot" message center cards
parent
c703d912ea
commit
b210f7deaa
|
@ -53,6 +53,9 @@ module Devices
|
|||
|
||||
# WEBCAM FEEDS ===========================
|
||||
:webcam_feeds,
|
||||
|
||||
# EVERYTHING ELSE ========================
|
||||
:misc,
|
||||
]
|
||||
|
||||
unless Rails.env.production?
|
||||
|
@ -236,6 +239,7 @@ module Devices
|
|||
end
|
||||
|
||||
def webcam_feeds; end
|
||||
def misc; end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,6 +8,7 @@ module Devices
|
|||
"Genesis XL" => "Genesis_XL_Demo_Webcam.jpg",
|
||||
"Genesis" => "Genesis_Demo_Webcam.jpg",
|
||||
}
|
||||
UNUSED_ALERTS = ["api.seed_data.missing", "api.user.not_welcomed"]
|
||||
|
||||
def webcam_feeds
|
||||
# device.webcam_feeds.destroy_all!
|
||||
|
@ -18,6 +19,13 @@ module Devices
|
|||
WebcamFeeds::Create.run!(p)
|
||||
end
|
||||
end
|
||||
|
||||
def misc
|
||||
device
|
||||
.alerts
|
||||
.where(problem_tag: UNUSED_ALERTS)
|
||||
.destroy_all
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,13 +18,13 @@ interface State {
|
|||
// CONSTANTS =====================================
|
||||
|
||||
const WS_CONFIG = {
|
||||
username: "farmbot_guest",
|
||||
username: "farmbot_demo",
|
||||
password: "required, but not used.",
|
||||
};
|
||||
|
||||
const SECRET = uuid().split("-").join("");
|
||||
const MQTT_CHAN = "guest_registry/" + SECRET;
|
||||
const HTTP_URL = "/api/guest_account";
|
||||
const MQTT_CHAN = "demos/" + SECRET;
|
||||
const HTTP_URL = "/api/demo_account";
|
||||
|
||||
// APPLICATION CODE ==============================
|
||||
|
||||
|
@ -49,7 +49,7 @@ export class DemoLoader extends React.Component<{}, State> {
|
|||
handleMessage =
|
||||
(_chan: string, _buffer: Buffer) => {
|
||||
localStorage.setItem("session", _buffer.toString());
|
||||
location.assign("/app/messages");
|
||||
location.assign("/app/designer/plants");
|
||||
}
|
||||
|
||||
requestAccount = () => {
|
||||
|
|
Loading…
Reference in New Issue