import devices from "./components/screens/devices/devices.js";
import scripts from "./components/screens/scripts/scripts.js";
function routes(screens, sh_api) {
screens.add("/", {
alias: "home",
renderer: () => {
return `<h2 class="mt-4">Hello world</h2>`;
},
initer: scr => {
setTimeout(() => scr.ready(), 1000);
setTimeout(() => scr.error("Error", "Just testing"), 2000);
}
});
screens.add("-", {
alias: "not-found-screen",
renderer: () => {
return `<h2 class="mt-4">404 NOT FOUND</h2>`;
},
initer: scr => {
scr.ready();
}
});
screens.add("/devices", devices.list(sh_api));
screens.add("/devices/scanning", devices.scanning(sh_api));
screens.add("/scripts/scopes", scripts.scopes(sh_api));
screens.add("/scripts/regular", scripts.regular(sh_api));
}
export {
routes
}