26 lines
698 B
Cheetah
26 lines
698 B
Cheetah
<hr/>
|
|
<button id="update-imports" type="button" {{if not CanUpdate}}disabled{{end}}>Update Imports</button>
|
|
<br/><br/>
|
|
<strong>Vanity Version:</strong>
|
|
{{AppVer}}
|
|
<br/><br/>
|
|
<strong>Go Version:</strong>
|
|
{{GoVer}}
|
|
|
|
<script>
|
|
const updateImports = document.querySelector('#update-imports');
|
|
updateImports.addEventListener('click', () => {
|
|
updateImports.disabled = true;
|
|
updateImports.innerHTML = 'Updating...';
|
|
fetch('{{if .Index}}{{else}}../{{end}}_/update', {
|
|
method: 'GET'
|
|
}).then(() => {
|
|
location.reload();
|
|
}).catch(() => {
|
|
updateImports.innerHTML = 'Update Failed';
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|