-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui-debug): add import and export buttons on data views
* add `path` URL parameter * display filename
- Loading branch information
Showing
10 changed files
with
249 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 11 additions & 2 deletions
13
webapp/src/components/App/Singlestudy/explore/Debug/Data/Image.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
import { useTranslation } from "react-i18next"; | ||
import EmptyView from "../../../../../common/page/SimpleContent"; | ||
import ImageIcon from "@mui/icons-material/Image"; | ||
import { Filename, Flex, Menubar } from "./styles"; | ||
import type { DataCompProps } from "../utils"; | ||
|
||
function Image() { | ||
function Image({ filename }: DataCompProps) { | ||
const { t } = useTranslation(); | ||
|
||
return <EmptyView icon={ImageIcon} title={t("study.debug.file.image")} />; | ||
return ( | ||
<Flex> | ||
<Menubar> | ||
<Filename>{filename}</Filename> | ||
</Menubar> | ||
<EmptyView icon={ImageIcon} title={t("study.debug.file.image")} /> | ||
</Flex> | ||
); | ||
} | ||
|
||
export default Image; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
webapp/src/components/App/Singlestudy/explore/Debug/Data/styles.ts
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
webapp/src/components/App/Singlestudy/explore/Debug/Data/styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { styled } from "@mui/material"; | ||
|
||
export const Flex = styled("div")(({ theme }) => ({ | ||
height: "100%", | ||
display: "flex", | ||
flexDirection: "column", | ||
gap: theme.spacing(1), | ||
})); | ||
|
||
export const Menubar = styled("div")(({ theme }) => ({ | ||
display: "flex", | ||
justifyContent: "flex-end", | ||
alignItems: "center", | ||
gap: theme.spacing(1), | ||
})); | ||
|
||
export const Filename = styled((props: { children?: string }) => ( | ||
<div title={props.children} {...props} /> | ||
))({ | ||
flex: 1, | ||
overflow: "hidden", | ||
textOverflow: "ellipsis", | ||
}); |
Oops, something went wrong.