it helps if you use the right naming conventions

Signed-off-by: Xe Iaso <me@christine.website>
This commit is contained in:
Cadey Ratio 2022-05-09 18:13:31 +00:00
parent 1b093a16f5
commit aefc830ce5
2 changed files with 10 additions and 1 deletions

View File

@ -4,6 +4,9 @@ import pathlib
import subprocess
class Plugin:
async def log(self, message=""):
print("frontend: " + message)
async def whoami(self, *args):
return os.getuid()

View File

@ -5,6 +5,10 @@
<link rel="stylesheet" href="/steam_resource/css/library.css">
<script src="/static/library.js"></script>
<script>
async function log(message) {
return call_plugin_method("log", {"message": message});
}
async function getUID() {
return call_plugin_method("whoami", {});
}
@ -14,10 +18,12 @@
}
async function onReady() {
await log("got here");
let status = document.getElementById("status");
let install_status = await getInstallState();
status.inner_text = install_status;
status.innerText = install_status;
await log(install_status);
}
onReady();