Skip to content

Commit 67a2ca1

Browse files
authored
Add version display to settings modal (#21)
* Add version display to settings modal Display the FleetCode version at the bottom of the settings modal to help users identify which version they're running. * Make version display dynamic from package.json Instead of hardcoding the version in HTML, the app now reads it dynamically from package.json when the settings modal is opened. * Use Electron's app.getVersion() for better performance Replaced manual file reading with Electron's built-in app.getVersion() method which is more efficient and reliable.
1 parent 3a6b531 commit 67a2ca1

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ <h2 class="modal-title">Terminal Settings</h2>
247247
<span class="text-xs text-gray-400 mt-1 block">Directory where session worktrees will be stored</span>
248248
</div>
249249

250+
<div class="text-center text-xs text-gray-500 mt-6 pt-4 border-t border-gray-700">
251+
<span id="app-version">FleetCode v...</span>
252+
</div>
253+
250254
<div class="btn-group">
251255
<button id="cancel-settings" class="btn-secondary">Cancel</button>
252256
<button id="reset-settings" class="btn-secondary">Reset to Default</button>

main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,11 @@ ipcMain.handle("save-terminal-settings", (_event, settings: any) => {
606606
(store as any).set("terminalSettings", settings);
607607
});
608608

609+
// Get app version
610+
ipcMain.handle("get-app-version", () => {
611+
return app.getVersion();
612+
});
613+
609614
// MCP Server management functions
610615
async function listMcpServers() {
611616
try {

renderer.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,8 +1450,16 @@ function applySettingsToAllTerminals() {
14501450
}
14511451

14521452
// Open settings modal
1453-
openSettingsBtn?.addEventListener("click", () => {
1453+
openSettingsBtn?.addEventListener("click", async () => {
14541454
populateSettingsForm();
1455+
1456+
// Load and display app version
1457+
const version = await ipcRenderer.invoke("get-app-version");
1458+
const versionElement = document.getElementById("app-version");
1459+
if (versionElement) {
1460+
versionElement.textContent = `FleetCode v${version}`;
1461+
}
1462+
14551463
settingsModal?.classList.remove("hidden");
14561464
});
14571465

0 commit comments

Comments
 (0)