File tree Expand file tree Collapse file tree
features/instance/config/overview/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,10 +2,14 @@ import { badgeVariants } from '@/components/ui/badgeVariants';
22import { cn } from '@/lib/cn' ;
33
44export function Version ( ) {
5+ let studioVersion = import . meta. env . VITE_STUDIO_VERSION ;
6+ const link = studioVersion ?. startsWith ( 'v' )
7+ ? `https://github.com/HarperFast/studio/releases/tag/${ studioVersion } `
8+ : 'https://github.com/HarperFast/studio/releases' ;
59 return (
6- < a href = "https://github.com/HarperFast/studio/releases" target = "_blank" rel = "noopener noreferrer" >
10+ < a href = { link } target = "_blank" rel = "noopener noreferrer" >
711 < span className = { cn ( badgeVariants ( { variant : 'default' } ) , 'text-xs inline-block ml-2 align-text-top' ) } >
8- { import . meta . env . VITE_STUDIO_VERSION } BETA
12+ { studioVersion } BETA
913 </ span >
1014 </ a >
1115 ) ;
Original file line number Diff line number Diff line change @@ -8,11 +8,22 @@ export const HarperVersion = ({
88 loadingRegistration ?: boolean ;
99 registrationInfo ?: RegistrationInfoResponse ;
1010} ) => {
11+ const link = ! ! registrationInfo ?. version
12+ && parseInt ( registrationInfo . version [ 0 ] , 10 ) >= 5
13+ && `https://github.com/HarperFast/harper/releases/tag/v${ registrationInfo . version } ` ;
1114 return (
1215 < >
1316 < dt className = "font-bold text-sm/6" > Harper Version</ dt >
1417 < dd className = "text-sm/6 sm:mt-2" >
15- { loadingRegistration ? < TextLoadingSkeleton className = "w-10" /> : registrationInfo ?. version || 'Unknown' }
18+ { loadingRegistration
19+ ? < TextLoadingSkeleton className = "w-10" />
20+ : link
21+ ? (
22+ < a href = { link } target = "_blank" className = "underline hover:text-blue-300" rel = "noopener noreferrer" >
23+ { registrationInfo . version }
24+ </ a >
25+ )
26+ : registrationInfo ?. version || 'Unknown' }
1627 </ dd >
1728 </ >
1829 ) ;
You can’t perform that action at this time.
0 commit comments