@@ -11,7 +11,6 @@ import { useConfig } from '@/contexts/ConfigContext';
1111import { cn } from '@/lib/utils' ;
1212import {
1313 BarChart2 ,
14- Github ,
1514 Globe ,
1615 History ,
1716 Inbox ,
@@ -24,22 +23,6 @@ import * as React from 'react';
2423import { Link , useLocation } from 'react-router-dom' ;
2524import { AppBarContext } from './contexts/AppBarContext' ;
2625
27- // Discord SVG Icon component
28- function DiscordIcon ( { className } : { className ?: string } ) {
29- return (
30- < svg
31- className = { className }
32- width = "16"
33- height = "16"
34- viewBox = "0 0 24 24"
35- fill = "currentColor"
36- xmlns = "http://www.w3.org/2000/svg"
37- >
38- < path d = "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z" />
39- </ svg >
40- ) ;
41- }
42-
4326// Reusable Icon component using Lucide React
4427function Icon ( {
4528 children,
@@ -275,46 +258,21 @@ export const mainListItems = React.forwardRef<
275258 </ div >
276259 ) }
277260 </ nav >
278- { /* Discord Community link */ }
279- < div className = "px-1 pb-0.5" >
280- < a
281- href = "https://discord.gg/gpahPUjGRk"
282- target = "_blank"
283- rel = "noopener noreferrer"
284- className = { cn (
285- 'flex items-center transition-all duration-200' ,
286- isOpen
287- ? 'h-7 px-2 rounded hover:bg-sidebar-foreground/5 text-sidebar-foreground/60 hover:text-sidebar-foreground justify-start'
288- : 'w-7 h-7 rounded hover:bg-sidebar-foreground/5 text-sidebar-foreground/60 hover:text-sidebar-foreground justify-center'
289- ) }
290- title = "Discord Community"
291- >
292- < DiscordIcon />
293- { isOpen && < span className = "ml-2 text-xs font-medium" > Discord</ span > }
294- </ a >
261+ { /* User Menu */ }
262+ < div className = { cn ( 'px-1' , isOpen ? '' : 'flex justify-center' ) } >
263+ < UserMenu isCollapsed = { ! isOpen } />
295264 </ div >
296- { /* GitHub link */ }
297- < div className = "px-1 pb-4 md:pb-1" >
298- < a
299- href = "https://github.com/dagu-org/dagu"
300- target = "_blank"
301- rel = "noopener noreferrer"
265+ { /* Version tag at the bottom */ }
266+ { config . version && (
267+ < div
302268 className = { cn (
303- 'flex items-center transition-all duration-200' ,
304- isOpen
305- ? 'h-7 px-2 rounded hover:bg-sidebar-foreground/5 text-sidebar-foreground/60 hover:text-sidebar-foreground justify-start'
306- : 'w-7 h-7 rounded hover:bg-sidebar-foreground/5 text-sidebar-foreground/60 hover:text-sidebar-foreground justify-center'
269+ 'px-2 pb-2 pt-1 text-[10px] text-sidebar-foreground/50' ,
270+ isOpen ? 'text-left' : 'text-center'
307271 ) }
308- title = "GitHub Repository"
309272 >
310- < Github size = { 16 } />
311- { isOpen && < span className = "ml-2 text-xs font-medium" > GitHub</ span > }
312- </ a >
313- </ div >
314- { /* User Menu - at the very bottom */ }
315- < div className = { cn ( 'px-1 pb-2' , isOpen ? '' : 'flex justify-center' ) } >
316- < UserMenu isCollapsed = { ! isOpen } />
317- </ div >
273+ { isOpen ? config . version : config . version . split ( '.' ) [ 0 ] }
274+ </ div >
275+ ) }
318276 </ div >
319277 ) ;
320278} ) ;
0 commit comments