Skip to content

Commit

Permalink
add version
Browse files Browse the repository at this point in the history
  • Loading branch information
randallard committed Jan 8, 2025
1 parent 0d5a5ab commit ce93f84
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions css/components/version-info.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.version-info {
position: fixed;
top: 20px;
right: 70px; /* positions it next to theme toggle */
padding: 5px 10px;
font-size: 12px;
color: var(--text-color);
opacity: 0.7;
}
3 changes: 3 additions & 0 deletions index_hosted.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<link rel="stylesheet" href="/ble-connect/css/components/connections.css">
<link rel="stylesheet" href="/ble-connect/css/components/theme-toggle.css">
<link rel="stylesheet" href="/ble-connect/css/components/message-area.css">
<link rel="stylesheet" href="/ble-connect/css/components/version-info.css">
</head>
<body>

Expand All @@ -33,6 +34,8 @@
<!-- Add hidden class to other sections -->
<div id="mainContent" class="hidden">
<button id="themeToggle" class="theme-toggle" title="Toggle dark mode"></button>
<div id="themeToggle" class="theme-toggle" title="Toggle dark mode"></div>
<div id="versionInfo" class="version-info"></div>
<p>Bluetooth and Messaging</p>
<div class="section">
<div id="setupArea">
Expand Down
7 changes: 7 additions & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ import { themeService } from './services/theme.js';
import { userService } from './services/user.js';
import MessageUI from './ui/messageUI.js';
import ConnectionUI from './ui/connectionUI.js';
import { VERSION } from './version.js';

console.log('UUID available:', typeof uuid !== 'undefined');

// Initialize services and UI
const initializeApp = () => {

const versionElement = document.getElementById('versionInfo');
if (versionElement) {
versionElement.textContent = `v${VERSION}`;
}

// First check if we need initial setup
const playerId = storageService.getItem('playerId');
setupEventListeners();
Expand Down
1 change: 1 addition & 0 deletions js/version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const VERSION = '0.0.0'; // This will be automatically updated by the build process

0 comments on commit ce93f84

Please sign in to comment.