admin: link HFS name to website

Massimo Melina committed Jun 11, 2024 at 09:37 UTC ae15747cabfb3526388f1d8bf6c7ed9c8344f546
1 file changed +5 -4
admin/src/MainMenu.ts
+5 -4
@@ -17,7 +17,7 @@ import LogoutPage from './LogoutPage';
17 import LangPage from './LangPage'
18 import LogsPage from './LogsPage';
19 import PluginsPage from './PluginsPage';
20 -import { getHFS, replaceStringToReact } from '@hfs/shared'
20 +import { getHFS, replaceStringToReact, REPO_URL } from '@hfs/shared'
21 import CustomHtmlPage from './CustomHtmlPage';
22 import InternetPage from './InternetPage'
23 import { useWindowSize } from 'usehooks-ts'
@@ -60,8 +60,9 @@ export default function Menu({ onSelect, itemTitle }: { onSelect: ()=>void, item
60 display: 'flex', flexDirection: 'column', '&>a': { flex: '0' },
61 }
62 },
63 - h(Box, { display: 'flex', px: 2, py: .5, gap: 2, alignItems: 'center' },
64 - h(Box, { fontSize: 'min(3rem, max(5vw, 4vh))' }, 'HFS'),
63 + h(Box, { id: 'hfs-name', display: 'flex', px: 2, py: .5, gap: 2, alignItems: 'center' },
64 + h('a', { href: REPO_URL, target: 'website', style: { textDecoration: 'none' } },
65 + h(Box, { color: 'primary.contrastText', fontSize: 'min(3rem, max(5vw, 4vh))' }, 'HFS')),
66 h(Box, { fontSize: 'small' }, replaceStringToReact(VERSION||'', /-/, () => h('br'))),
67 short && h('img', { src: logo, style: { height: '2.5em' } }),
68 ),
@@ -79,7 +80,7 @@ export default function Menu({ onSelect, itemTitle }: { onSelect: ()=>void, item
80 ),
81 { key: it.path, placement: 'right' }
82 )),
82 - !short && h(Box, { sx: { flex: 1, opacity: .7, background: `url(${logo}) no-repeat bottom`, backgroundSize: 'contain', margin: 2 } }),
83 + !short && h(Box, { id: 'hfs-logo', sx: { flex: 1, opacity: .7, background: `url(${logo}) no-repeat bottom`, backgroundSize: 'contain', margin: 2 } }),
84 )
85 )
86 }