add version display in UI sidebar + version bump rules
- VERSION file at repo root (0.3.0) - vite.config.ts reads VERSION at build time, injects __OIKOS_VERSION__ - App.svelte shows version in sidebar tooltip + subtle text below logo - AGENTS.md §9: every commit to main MUST bump VERSION (patch=bugfix, minor=new features, major=breaking changes)
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
import { Button } from '$lib/components/ui/button'
|
||||
import { Badge } from '$lib/components/ui/badge'
|
||||
import { Separator } from '$lib/components/ui/separator'
|
||||
import { VERSION } from '$lib/version'
|
||||
import { Toaster } from '$lib/components/ui/sonner'
|
||||
import PlusIcon from '@lucide/svelte/icons/plus'
|
||||
import LayoutDashboardIcon from '@lucide/svelte/icons/layout-dashboard'
|
||||
@@ -99,7 +100,7 @@
|
||||
<Sidebar.MenuButton
|
||||
class="data-[slot=sidebar-menu-button]:!p-1.5"
|
||||
onclick={() => navigate('overview')}
|
||||
tooltipContent="Oikos"
|
||||
tooltipContent={`Oikos ${VERSION}`}
|
||||
>
|
||||
{#snippet child({ props })}
|
||||
<button {...props}>
|
||||
@@ -112,6 +113,9 @@
|
||||
</Sidebar.MenuButton>
|
||||
</Sidebar.MenuItem>
|
||||
</Sidebar.Menu>
|
||||
<div class="group-data-[collapsible=icon]:hidden px-2.5 pb-1">
|
||||
<span class="text-[11px] text-muted-foreground select-none">{VERSION}</span>
|
||||
</div>
|
||||
<Sidebar.Menu>
|
||||
<Sidebar.MenuItem>
|
||||
<Sidebar.MenuButton
|
||||
|
||||
1
web/src/lib/version.ts
Normal file
1
web/src/lib/version.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const VERSION: string = __OIKOS_VERSION__
|
||||
1
web/src/vite-env.d.ts
vendored
Normal file
1
web/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare const __OIKOS_VERSION__: string
|
||||
Reference in New Issue
Block a user