File tree Expand file tree Collapse file tree 4 files changed +29
-0
lines changed
Expand file tree Collapse file tree 4 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,11 @@ import { NavProjects } from "@/components/nav-projects";
55import {
66 Sidebar ,
77 SidebarContent ,
8+ SidebarFooter ,
89 SidebarHeader ,
910 useSidebar ,
1011} from "@/components/ui/sidebar" ;
12+ import { VersionDisplay } from "@/components/version-display" ;
1113import { WorkspaceSwitcher } from "@/components/workspace-switcher" ;
1214import { shortcuts } from "@/constants/shortcuts" ;
1315import { useRegisterShortcuts } from "@/hooks/use-keyboard-shortcuts" ;
@@ -34,6 +36,9 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
3436 < NavMain />
3537 < NavProjects />
3638 </ SidebarContent >
39+ < SidebarFooter >
40+ < VersionDisplay />
41+ </ SidebarFooter >
3742 </ Sidebar >
3843 ) ;
3944}
Original file line number Diff line number Diff line change 1+ export function VersionDisplay ( ) {
2+ const version = __APP_VERSION__ ;
3+ const changelogUrl =
4+ "https://github.com/usekaneo/kaneo/blob/main/CHANGELOG.md" ;
5+
6+ return (
7+ < div className = "flex items-center justify-center px-2 py-1.5" >
8+ < a
9+ href = { changelogUrl }
10+ target = "_blank"
11+ rel = "noopener noreferrer"
12+ className = "text-xs text-muted-foreground hover:text-foreground transition-colors duration-200"
13+ >
14+ v{ version }
15+ </ a >
16+ </ div >
17+ ) ;
18+ }
Original file line number Diff line number Diff line change 11/// <reference types="vite/client" />
22/// <reference types="vite/types/importMeta.d.ts" />
33
4+ declare const __APP_VERSION__ : string ;
5+
46interface ImportMetaEnv {
57 readonly KANEO_API_URL : string ;
68}
Original file line number Diff line number Diff line change @@ -3,8 +3,12 @@ import tailwindcss from "@tailwindcss/vite";
33import { tanstackRouter } from "@tanstack/router-plugin/vite" ;
44import react from "@vitejs/plugin-react" ;
55import { defineConfig } from "vite" ;
6+ import packageJson from "../../package.json" ;
67
78export default defineConfig ( {
9+ define : {
10+ __APP_VERSION__ : JSON . stringify ( packageJson . version ) ,
11+ } ,
812 base : "/" ,
913 plugins : [
1014 tanstackRouter ( { autoCodeSplitting : true } ) ,
You can’t perform that action at this time.
0 commit comments