Don't show the "Welcome to the FarmBot Web App" or "Choose your FarmBot" message center cards

pull/1240/head
Rick Carlino 2019-06-18 14:02:13 -05:00
parent c703d912ea
commit b210f7deaa
3 changed files with 16 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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 = () => {