From 1d09f662aa141c6d8e645e5c2a5b30a8e5aacece Mon Sep 17 00:00:00 2001 From: Manuel Date: Wed, 9 Aug 2023 22:14:25 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Open=20external=20links=20in=20m?= =?UTF-8?q?anage=20nav=20in=20new=20tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/Templates/ManageLayout.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/layout/Templates/ManageLayout.tsx b/src/components/layout/Templates/ManageLayout.tsx index 305410ef3..5634ee10a 100644 --- a/src/components/layout/Templates/ManageLayout.tsx +++ b/src/components/layout/Templates/ManageLayout.tsx @@ -122,6 +122,7 @@ type Icon = (props: TablerIconsProps) => JSX.Element; type NavigationLinkHref = { icon: Icon; href: string; + target?: '_self' | '_blank'; onlyAdmin?: boolean; }; @@ -182,7 +183,7 @@ const CustomNavigationLink = forwardRef< const matchesActive = router.pathname.endsWith(item.href); if (item.href.startsWith('http')) { - return ; + return ; } return ; @@ -228,18 +229,22 @@ const navigationLinks: NavigationLinks = { documentation: { icon: IconBook2, href: 'https://homarr.dev/docs/about', + target: '_blank' }, report: { icon: IconBrandGithub, href: 'https://github.com/ajnart/homarr/issues/new/choose', + target: '_blank' }, discord: { icon: IconBrandDiscord, href: 'https://discord.com/invite/aCsmEV5RgA', + target: '_blank' }, contribute: { icon: IconGitFork, href: 'https://github.com/ajnart/homarr', + target: '_blank' }, }, },