Webview: minor improvements
This commit is contained in:
parent
af19950dfa
commit
720fb4af63
|
@ -6,6 +6,7 @@ import {
|
|||
createEffect,
|
||||
} from "solid-js";
|
||||
import { OperationResponse, pyApi } from "./api";
|
||||
import { currClanURI } from "./App";
|
||||
|
||||
export const makeMachineContext = () => {
|
||||
const [machines, setMachines] =
|
||||
|
@ -27,7 +28,10 @@ export const makeMachineContext = () => {
|
|||
getMachines: () => {
|
||||
// When the gtk function sends its data the loading state will be set to false
|
||||
setLoading(true);
|
||||
pyApi.list_machines.dispatch({ debug: true, flake_url: "." });
|
||||
pyApi.list_machines.dispatch({
|
||||
debug: true,
|
||||
flake_url: currClanURI(),
|
||||
});
|
||||
},
|
||||
},
|
||||
] as const;
|
||||
|
|
|
@ -14,7 +14,6 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) {
|
|||
);
|
||||
}
|
||||
|
||||
console.log(import.meta.env);
|
||||
if (import.meta.env.DEV) {
|
||||
console.log("Development mode");
|
||||
// Load the debugger in development mode
|
||||
|
@ -27,7 +26,7 @@ if (import.meta.env.DEV) {
|
|||
console.debug("Python API call", { method, data });
|
||||
setTimeout(() => {
|
||||
const mock = getFakeResponse(method, data);
|
||||
console.log("mock", { mock });
|
||||
console.log("Returning mock-data: ", { mock });
|
||||
|
||||
window.clan[method](JSON.stringify(mock));
|
||||
}, 200);
|
||||
|
|
Loading…
Reference in New Issue
Block a user