it helps if you use the right naming conventions
Signed-off-by: Xe Iaso <me@christine.website>
This commit is contained in:
parent
1b093a16f5
commit
aefc830ce5
3
main.py
3
main.py
|
@ -4,6 +4,9 @@ import pathlib
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
class Plugin:
|
class Plugin:
|
||||||
|
async def log(self, message=""):
|
||||||
|
print("frontend: " + message)
|
||||||
|
|
||||||
async def whoami(self, *args):
|
async def whoami(self, *args):
|
||||||
return os.getuid()
|
return os.getuid()
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
<link rel="stylesheet" href="/steam_resource/css/library.css">
|
<link rel="stylesheet" href="/steam_resource/css/library.css">
|
||||||
<script src="/static/library.js"></script>
|
<script src="/static/library.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
async function log(message) {
|
||||||
|
return call_plugin_method("log", {"message": message});
|
||||||
|
}
|
||||||
|
|
||||||
async function getUID() {
|
async function getUID() {
|
||||||
return call_plugin_method("whoami", {});
|
return call_plugin_method("whoami", {});
|
||||||
}
|
}
|
||||||
|
@ -14,10 +18,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onReady() {
|
async function onReady() {
|
||||||
|
await log("got here");
|
||||||
let status = document.getElementById("status");
|
let status = document.getElementById("status");
|
||||||
let install_status = await getInstallState();
|
let install_status = await getInstallState();
|
||||||
|
|
||||||
status.inner_text = install_status;
|
status.innerText = install_status;
|
||||||
|
await log(install_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
onReady();
|
onReady();
|
||||||
|
|
Loading…
Reference in New Issue