-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathupdates.html
More file actions
56 lines (55 loc) · 4.25 KB
/
updates.html
File metadata and controls
56 lines (55 loc) · 4.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>WeighMyBru</title>
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="stylesheet" href="/output.css">
<script src="/js/alpine.min.js" defer></script>
<link rel="stylesheet" href="/css/all.min.css">
</head>
<body class="bg-black-background text-white">
<div class="md:flex flex-col md:flex-row md:min-h-screen w-full font-light">
<div @click.away="open = false" class="flex flex-col w-full md:w-64 text-gray-700 bg-black-discord dark-mode:text-gray-200 dark-mode:bg-gray-800 flex-shrink-0" x-data="{ open: false }">
<div class="flex-shrink-0 px-8 py-4 flex flex-row items-center justify-between">
<a href="#" class="text-lg font-semibold tracking-widest text-green-600 bg-black-discord uppercase rounded-lg dark-mode:text-white focus:outline-none focus:shadow-outline">WeighMyBru</a>
<button class="rounded-lg md:hidden focus:outline-none focus:shadow-outline" @click="open = !open">
<svg fill="currentColor" viewBox="0 0 20 20" class="w-6 h-6">
<path x-show="!open" fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM9 15a1 1 0 011-1h6a1 1 0 110 2h-6a1 1 0 01-1-1z" clip-rule="evenodd"></path>
<path x-show="open" fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path>
</svg>
</button>
</div>
<nav :class="{'block': open, 'hidden': !open}" class="flex-grow md:block bg-black-discord px-4 pb-4 md:pb-0 md:overflow-y-auto">
<a class="block px-4 py-2 mt-2 text-sm font-semibold text-gray-400 bg-transparent rounded-lg hover:text-stone-50 focus:text-stone-50 hover:bg-black-hover focus:bg-black-select focus:outline-none focus:shadow-outline" href="/"><i class="fa fa-tachometer mr-2" aria-hidden="true" style="color: rgb(71, 168, 100);"></i>Dashboard</a>
<a class="block px-4 py-2 mt-2 text-sm font-semibold text-gray-400 bg-transparent rounded-lg hover:text-stone-50 focus:text-stone-50 hover:bg-black-hover focus:bg-black-select focus:outline-none focus:shadow-outline" href="/calibration.html"><i class="fa fa-balance-scale mr-2" aria-hidden="true" style="color: rgb(71, 168, 100);"></i>Calibration</a>
<a class="block px-4 py-2 mt-2 text-sm font-semibold text-gray-400 bg-transparent rounded-lg hover:text-stone-50 focus:text-stone-50 hover:bg-black-hover focus:bg-black-select focus:outline-none focus:shadow-outline" href="/settings.html"><i class="fa fa-cogs mr-2" aria-hidden="true" style="color: rgb(71, 168, 100);"></i>Settings</a>
<a class="block px-4 py-2 mt-2 text-sm font-semibold text-stone-50 bg-black-select rounded-lg dark-mode:bg-gray-700 dark-mode:hover:bg-black-discord dark-mode:focus:bg-black-select dark-mode:focus:text-stone-50 dark-mode:hover:text-stone-50 dark-mode:text-gray-500 hover:text-stone-50 focus:text-stone-50 hover:bg-black-hover focus:black-select focus:outline-none focus:shadow-outline" href="/updates.html"><i class="fa fa-upload mr-2" aria-hidden="true" style="color: rgb(71, 168, 100);"></i>Updates</a>
</nav>
</div>
<main class="flex-grow overflow-y-auto p-8">
<h1 class="text-3xl text-white font-bold mb-4">Updates</h1>
<div class="bg-black-select p-6 rounded shadow max-w-xl">
<h2 class="text-2xl font-semibold mb-4">Firmware & Software Updates</h2>
<ul class="list-disc list-inside text-lg mb-4">
<li>Current version: <span id="firmware-version">Loading...</span></li>
<li>Hardcoded version: 2.2.0</li>
</ul>
<p class="text-base text-gray-200">Check back here for the latest updates to your WeighMyBru device. OTA coming soon.</p>
</div>
</main>
</div>
<script>
// Fetch actual firmware version from API
fetch('/api/dashboard')
.then(response => response.json())
.then(data => {
document.getElementById('firmware-version').textContent = data.device_version || 'Unknown';
})
.catch(err => {
document.getElementById('firmware-version').textContent = 'Error loading';
});
</script>
</body>
</html>