add web client - future plans for loading screen during refresh
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-11-13 18:05:20 -07:00
parent 0a518fd31a
commit 4c904e7196
5 changed files with 64 additions and 7 deletions

3
templates/README.md Normal file
View File

@ -0,0 +1,3 @@
# Templates
This directory contains HTML templates used by the Go templating engine.

22
templates/home.html Normal file
View File

@ -0,0 +1,22 @@
<html>
<head>
<title>YNAB Portfolio Monitor</title>
<script>
req = new XMLHttpRequest();
req.open("GET", "/status");
req.send();
req.onload = () => {
if (req.readyState == 4 && req.status == 200) {
// redirect to budget when refresh complete signal is received
window.location.href = "https://app.ynab.com/{{ .BudgetID }}"
}
};
// do some fancy preloader stuff
</script>
</head>
<body>
<p>Loading...</p>
</body>
</html>