This commit is contained in:
2025-07-18 14:48:58 -05:00
parent eade487b9f
commit 525e43441f
3 changed files with 115 additions and 12 deletions
+33 -1
View File
@@ -1,11 +1,25 @@
const ws = new WebSocket("ws://localhost:5273");
/*
pub enum Method {
Install(App),
SetEnabled(String, bool),
Edit(String, App),
Uninstall(String),
Toggle(String, bool),
Start(String),
Stop(String),
Restart(String),
}
*/
ws.onmessage = (msg) => console.log("Received:", msg.data);
ws.onopen = () => {
ws.send("my-key");
ws.send(
JSON.stringify({
Uninstall: {
Install: {
repo: "[email protected]:osui-rs/osui.git",
branch: "master",
install_command: "",
@@ -13,4 +27,22 @@ ws.onopen = () => {
}
})
);
ws.send(
JSON.stringify({
SetEnabled: ["osui-rs/osui", true]
})
);
ws.send(
JSON.stringify({
Start: "osui-rs/osui"
})
);
// ws.send(
// JSON.stringify({
// Uninstall: "[email protected]:osui-rs/osui.git"
// })
// );
};