Removed the "devmode" UI
This commit is contained in:
@@ -293,15 +293,6 @@ module.exports = new Vue({
|
||||
update_object(this.config, config, true);
|
||||
this.parse_hash();
|
||||
|
||||
if (!this.devModChecked) {
|
||||
this.devModChecked = true;
|
||||
if (this.config.devmode) {
|
||||
SvelteComponents.createComponent("Devmode",
|
||||
document.getElementById("svelte-devmode-host")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.checkedUpgrade) {
|
||||
this.checkedUpgrade = true;
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ html(lang="en")
|
||||
|
||||
body(v-cloak)
|
||||
#svelte-dialog-host
|
||||
#svelte-devmode-host
|
||||
|
||||
#overlay(v-if="status != 'connected'")
|
||||
span {{status}}
|
||||
|
||||
@@ -246,14 +246,6 @@ class HomeHandler(bbctrl.APIHandler):
|
||||
self.get_ctrl().mach.home(axis)
|
||||
|
||||
|
||||
class DevmodeHandler(bbctrl.APIHandler):
|
||||
def put_ok(self, command, *args):
|
||||
if command == "/probe":
|
||||
self.get_ctrl().mach.fake_probe_contact()
|
||||
else:
|
||||
raise HTTPError(400, 'Not implemented')
|
||||
|
||||
|
||||
class StartHandler(bbctrl.APIHandler):
|
||||
def put_ok(self): self.get_ctrl().mach.start()
|
||||
|
||||
@@ -509,7 +501,6 @@ class Web(tornado.web.Application):
|
||||
(r'/api/file(/[^/]+)?', bbctrl.FileHandler),
|
||||
(r'/api/path/([^/]+)((/positions)|(/speeds))?', PathHandler),
|
||||
(r'/api/home(/[xyzabcXYZABC]((/set)|(/clear))?)?', HomeHandler),
|
||||
(r'/api/devmode((/probe))?', DevmodeHandler),
|
||||
(r'/api/start', StartHandler),
|
||||
(r'/api/estop', EStopHandler),
|
||||
(r'/api/clear', ClearHandler),
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<script lang="ts">
|
||||
import * as api from "$lib/api";
|
||||
import { onMount } from "svelte";
|
||||
|
||||
onMount(() => {
|
||||
document.body.style.backgroundColor = "black";
|
||||
const layout = document.querySelector("#layout") as HTMLElement;
|
||||
layout.style.backgroundColor = "white";
|
||||
layout.style.width = "1280px";
|
||||
layout.style.height = "720px";
|
||||
layout.style.overflowY = "scroll";
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="devmode">
|
||||
<button on:click={() => api.PUT("devmode/probe")}> Probe Contact </button>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.devmode {
|
||||
background-color: greenyellow;
|
||||
z-index: 20000000;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 400px;
|
||||
width: 500px;
|
||||
height: 100px;
|
||||
padding: 6px;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-items: space-between;
|
||||
}
|
||||
</style>
|
||||
@@ -6,7 +6,6 @@ matchAll.shim();
|
||||
import AdminNetworkView from '$components/AdminNetworkView.svelte';
|
||||
import SettingsView from '$components/SettingsView.svelte';
|
||||
import DialogHost, { showDialog } from "$dialogs/DialogHost.svelte";
|
||||
import Devmode from "$components/Devmode.svelte";
|
||||
import { handleConfigUpdate, setDisplayUnits } from '$lib/ConfigStore';
|
||||
import { handleControllerStateUpdate } from "$lib/ControllerState";
|
||||
import { registerControllerMethods } from "$lib/RegisterControllerMethods";
|
||||
@@ -22,9 +21,6 @@ export function createComponent(component: string, target: HTMLElement, props: R
|
||||
case "DialogHost":
|
||||
return new DialogHost({ target, props });
|
||||
|
||||
case "Devmode":
|
||||
return new Devmode({ target, props });
|
||||
|
||||
default:
|
||||
throw new Error("Unknown component");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user