Skip to content

Commit

Permalink
Open STAC browser in new tab (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschumpr authored Jul 18, 2024
2 parents 7d1b5b7 + 779c060 commit f677a82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Rename _Abgabe_ to _Lieferung_.
- Refactored delivery overview to use only [MUI](https://mui.com/material-ui/) components.
- Use Typescript for new components.
- STAC browser now opens in a new tab.

## v1.0.93 - 2024-05-14

Expand Down
7 changes: 6 additions & 1 deletion src/Geopilot.Frontend/src/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
List,
ListItem,
ListItemButton,
ListItemIcon,
ListItemText,
Toolbar,
Typography,
Expand All @@ -22,6 +23,7 @@ import { AdminTemplate } from "./auth/AdminTemplate.js";
import { useLocation, useNavigate } from "react-router-dom";
import { ClientSettings } from "./AppInterfaces";
import { FC, useState } from "react";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";

interface HeaderProps {
clientSettings: ClientSettings;
Expand Down Expand Up @@ -135,9 +137,12 @@ export const Header: FC<HeaderProps> = ({ clientSettings, hasDrawerToggle, handl
<ListItem key={t("stacBrowser").toUpperCase()} disablePadding>
<ListItemButton
onClick={() => {
window.location.href = "/browser";
window.open("/browser", "_blank");
}}>
<ListItemText primary={t("stacBrowser").toUpperCase()} />
<ListItemIcon>
<OpenInNewIcon fontSize="small" />
</ListItemIcon>
</ListItemButton>
</ListItem>
</AdminTemplate>
Expand Down

0 comments on commit f677a82

Please sign in to comment.