open all links in new tabs

This commit is contained in:
hsjobeki 2023-01-14 01:23:08 +01:00
parent 672f1b28c9
commit 6c4ae98227

View File

@ -102,12 +102,12 @@ export const Preview = (props: PreviewProps) => {
<ListItem sx={{ flexDirection: { xs: "column", sm: "row" }, px: 0 }}> <ListItem sx={{ flexDirection: { xs: "column", sm: "row" }, px: 0 }}>
<ListItemIcon> <ListItemIcon>
<Tooltip title={"read docs"}> <Tooltip title={"read docs"}>
<MuiLink sx={{ m: "auto", color: "primary.light" }}> <MuiLink
<Link sx={{ m: "auto", color: "primary.light" }}
target="_blank"
href={!id.includes("builtins") ? libDocsRef : builtinsDocsRef} href={!id.includes("builtins") ? libDocsRef : builtinsDocsRef}
> >
<LocalLibraryIcon sx={{ m: "auto" }} /> <LocalLibraryIcon sx={{ m: "auto" }} />
</Link>
</MuiLink> </MuiLink>
</Tooltip> </Tooltip>
</ListItemIcon> </ListItemIcon>
@ -131,15 +131,14 @@ export const Preview = (props: PreviewProps) => {
primary={ primary={
!id.includes("builtins") ? ( !id.includes("builtins") ? (
<Tooltip title={"browse source code"}> <Tooltip title={"browse source code"}>
<MuiLink> <MuiLink
<Link target={"_blank"}
href={`https://github.com/NixOS/nixpkgs/blob/master/${category.replace( href={`https://github.com/NixOS/nixpkgs/blob/master/${category.replace(
"./", "./",
"" ""
)}`} )}`}
> >
{"github:NixOS/nixpkgs/" + category.replace("./", "")} {"github:NixOS/nixpkgs/" + category.replace("./", "")}
</Link>
</MuiLink> </MuiLink>
</Tooltip> </Tooltip>
) : ( ) : (
@ -193,15 +192,15 @@ export const Preview = (props: PreviewProps) => {
<ListItem sx={{ flexDirection: { xs: "column", sm: "row" }, px: 0 }}> <ListItem sx={{ flexDirection: { xs: "column", sm: "row" }, px: 0 }}>
<ListItemIcon> <ListItemIcon>
<Tooltip title={"browse source code"}> <Tooltip title={"browse source code"}>
<MuiLink sx={{ m: "auto", color: "primary.light" }}> <MuiLink
<Link sx={{ m: "auto", color: "primary.light" }}
target="_blank"
href={`https://github.com/NixOS/nixpkgs/blob/master/${category.replace( href={`https://github.com/NixOS/nixpkgs/blob/master/${category.replace(
"./", "./",
"" ""
)}`} )}`}
> >
<InputIcon sx={{ m: "auto" }} /> <InputIcon sx={{ m: "auto" }} />
</Link>
</MuiLink> </MuiLink>
</Tooltip> </Tooltip>
</ListItemIcon> </ListItemIcon>