Skip to content

Commit 9dd6787

Browse files
committed
Unified version management - single source of truth
- Created frontend/src/lib/version.js as single source for APP_VERSION - All components now import from version.js instead of hardcoding - Version only needs to be updated in one place (version.js) - Updated: App.svelte, AboutTab.svelte, settings.js
1 parent 1796a91 commit 9dd6787

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json.md5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7e528c2bb45911eeee9e336e4cc1efc3
1+
5db36fdc40b9759b108d401dc0ceb972

frontend/src/App.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script>
22
import { onMount, onDestroy } from 'svelte';
33
import { RotateCcw, Database, Settings, FileText, Info, Github, User, Sliders, Clock } from 'lucide-svelte';
4+
import { APP_VERSION } from './lib/version.js';
45
import ResetTab from './lib/ResetTab.svelte';
56
import SessionsTab from './lib/SessionsTab.svelte';
67
import ConfigTab from './lib/ConfigTab.svelte';
@@ -138,7 +139,7 @@
138139
<header class="h-12 bg-[var(--bg-elevated)] border-b border-[var(--border)] flex items-center justify-between px-4 transition-colors">
139140
<h1 class="text-lg font-semibold text-[var(--text-primary)]">
140141
SurfManager
141-
<span class="text-xs text-[var(--text-muted)] ml-2">v2.0.2</span>
142+
<span class="text-xs text-[var(--text-muted)] ml-2">v{APP_VERSION}</span>
142143
</h1>
143144
<div class="flex items-center gap-4 text-sm text-[var(--text-muted)]">
144145
<span class="flex items-center gap-1.5 px-3 py-1 rounded-full bg-[var(--bg-card)] border border-[var(--border)]">

frontend/src/lib/AboutTab.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { onMount } from 'svelte';
33
import { Github, Heart, ExternalLink, Star, GitFork } from 'lucide-svelte';
44
import { GetPlatformInfo } from '../../wailsjs/go/main/App.js';
5+
import { APP_VERSION } from './version.js';
56
67
let platform = {};
78
@@ -49,7 +50,7 @@
4950
<div class="space-y-5">
5051
<!-- Version -->
5152
<div>
52-
<span class="text-[var(--primary-light)] font-bold text-2xl">v2.0.2</span>
53+
<span class="text-[var(--primary-light)] font-bold text-2xl">v{APP_VERSION}</span>
5354
<span class="text-[var(--text-muted)] text-sm ml-2">Go + Wails + Svelte</span>
5455
</div>
5556

frontend/src/lib/stores/settings.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Settings store with localStorage persistence
22
import { writable, get } from 'svelte/store';
3+
import { APP_VERSION } from '../version.js';
34

45
const STORAGE_KEY = 'surfmanager-settings';
5-
const SETTINGS_VERSION = '2.0.2';
66

77
const defaultSettings = {
88
// General
@@ -82,7 +82,7 @@ function createSettingsStore() {
8282
exportSettings: () => {
8383
const currentSettings = get({ subscribe });
8484
const exportData = {
85-
version: SETTINGS_VERSION,
85+
version: APP_VERSION,
8686
exported_at: new Date().toISOString(),
8787
settings: {
8888
// General

frontend/src/lib/version.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Single source of truth for app version
2+
export const APP_VERSION = '2.0.2';

0 commit comments

Comments
 (0)