diff --git a/package.json b/package.json
index 5d0f1693b..cab439efb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "proxmox-simplified",
- "version": "1.0.0",
+ "version": "2.0.0",
"description": "Simplified monitor for Proxmox",
"scripts": {
"dev": "NODE_ENV=development cd server && node index.js",
diff --git a/public/app.js b/public/app.js
index 299973b31..9fc04a1f3 100644
--- a/public/app.js
+++ b/public/app.js
@@ -39,6 +39,7 @@ document.addEventListener('DOMContentLoaded', function() {
const tooltipElement = document.getElementById('custom-tooltip');
const searchInput = document.getElementById('dashboard-search');
const statusElement = document.getElementById('dashboard-status-text');
+ const versionSpan = document.getElementById('app-version'); // Get version span
if (!connectionStatus) {
console.error('Critical element #connection-status not found!');
@@ -842,4 +843,20 @@ document.addEventListener('DOMContentLoaded', function() {
updateSortUI('main-table', document.querySelector('#main-table th[data-sort="id"]'));
// Data is requested on socket 'connect' event
+ // --- Fetch and display version ---
+ fetch('/api/version')
+ .then(response => response.json())
+ .then(data => {
+ if (versionSpan && data.version) {
+ versionSpan.textContent = data.version;
+ }
+ })
+ .catch(error => {
+ console.error('Error fetching version:', error);
+ if (versionSpan) {
+ versionSpan.textContent = 'error';
+ }
+ });
+ // --- End fetch version ---
+
}); // End DOMContentLoaded
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index 3c6717160..2666ade12 100644
--- a/public/index.html
+++ b/public/index.html
@@ -215,5 +215,8 @@
+