mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
74 lines
1.8 KiB
Plaintext
74 lines
1.8 KiB
Plaintext
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>Maloja</title>
|
|
<script src="javascript/cookies.js"></script>
|
|
|
|
<pyhp include="common/header.html" />
|
|
|
|
<script>
|
|
neo.xhttprequest("https://maloja.krateng.ch/api/serverinfo",{},"GET",json=true).then((response)=>{
|
|
result = JSON.parse(response.responseText);
|
|
latestvers = result.version;
|
|
|
|
neo.xhttprequest("/api/serverinfo",{},"GET",json=true).then((response)=>{
|
|
|
|
result = JSON.parse(response.responseText);
|
|
thisvers = result.version;
|
|
|
|
document.getElementById("latestversion").innerHTML = latestvers.join(".");
|
|
document.getElementById("currentversion").innerHTML = thisvers.join(".");
|
|
|
|
if (latestvers <= thisvers) {
|
|
document.getElementById("currentversion").style.color = "green";
|
|
}
|
|
else {
|
|
document.getElementById("currentversion").style.color = "red";
|
|
document.getElementById("updatestatus").innerHTML = "Consider updating to take advantage of new features";
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
<table class="top_info">
|
|
<tr>
|
|
<td class="image">
|
|
<div style="background-image:url('/favicon.png')"></div>
|
|
</td>
|
|
<td class="text">
|
|
<h1>Maloja</h1><br/>
|
|
|
|
<p class="desc">Welcome to your own Maloja server!</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Update</h2>
|
|
|
|
Currently installed Maloja version: <span id="currentversion">Loading...</span><br/>
|
|
Latest recommended Maloja version: <span id="latestversion">Loading...</span><br/>
|
|
<span id="updatestatus"></span>
|
|
|
|
|
|
<h2>Admin Mode</h2>
|
|
|
|
Activate admin mode to manually scrobble from various places on the website
|
|
|
|
<h2>Links</h2>
|
|
|
|
<a class="textlink" href="/setup">Server Setup</a><br/>
|
|
<a class="textlink" href="/manual">Manual Scrobbling</a>
|
|
|
|
<pyhp include="common/footer.html" />
|
|
</body>
|
|
</html>
|