-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/set-coordinates
- Loading branch information
Showing
19 changed files
with
155 additions
and
204 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
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
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
21 changes: 21 additions & 0 deletions
21
src/features/ModelView/ModelFilesView/ModelFilesView.styled.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,21 @@ | ||
import { Table } from '@equinor/eds-core-react'; | ||
import styled from 'styled-components'; | ||
import { spacings } from '../../../tokens/spacings'; | ||
|
||
export const TableWrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: ${spacings.LARGE}; | ||
width: 85%; | ||
`; | ||
|
||
export const FileTable = styled(Table)` | ||
width: 100%; | ||
min-width: 256px; | ||
`; | ||
|
||
export const TableCell = styled(Table.Cell)` | ||
width: 80%; | ||
padding-right: ${spacings.X_LARGE}; | ||
`; |
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,23 +1,20 @@ | ||
import { Table, Typography } from '@equinor/eds-core-react'; | ||
import { UploadList } from '../../../api/generated'; | ||
import { useFetchModel } from '../../../hooks/useFetchModel'; | ||
import * as Styled from './ModelSourceView.styled'; | ||
import * as Styled from './ModelFilesView.styled'; | ||
|
||
export const ModelSourceView = () => { | ||
export const ModelFilesView = () => { | ||
const { isLoading, data } = useFetchModel(); | ||
|
||
if (isLoading || !data?.success) return <p>Loading ...</p>; | ||
|
||
return ( | ||
<Styled.FileTable> | ||
<Typography variant="h3">Source</Typography> | ||
<p>Uploaded by [email protected] on Sep 13, 2023</p> | ||
<Table> | ||
<Styled.TableWrapper> | ||
<Typography variant="h3">Files</Typography> | ||
<Styled.FileTable> | ||
<Table.Head> | ||
<Table.Row className="table-row"> | ||
<Table.Cell className="table-first-col"> | ||
Model input files | ||
</Table.Cell> | ||
<Styled.TableCell>Model input files</Styled.TableCell> | ||
<Table.Cell>Size</Table.Cell> | ||
</Table.Row> | ||
</Table.Head> | ||
|
@@ -27,9 +24,7 @@ export const ModelSourceView = () => { | |
data.data.fileUploads?.length > 0) ? ( | ||
data.data.fileUploads?.map((file: UploadList) => ( | ||
<Table.Row key={file.uploadId} className="table-row"> | ||
<Table.Cell className="table-first-col"> | ||
{file.originalFileName} | ||
</Table.Cell> | ||
<Styled.TableCell>{file.originalFileName}</Styled.TableCell> | ||
<Table.Cell>**Size**</Table.Cell> | ||
</Table.Row> | ||
)) | ||
|
@@ -40,7 +35,7 @@ export const ModelSourceView = () => { | |
</Table.Row> | ||
)} | ||
</Table.Body> | ||
</Table> | ||
</Styled.FileTable> | ||
</Styled.FileTable> | ||
</Styled.TableWrapper> | ||
); | ||
}; |
47 changes: 24 additions & 23 deletions
47
src/features/ModelView/ModelMetadataView/ModelMetadataView.styled.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,34 +1,35 @@ | ||
import { Table } from '@equinor/eds-core-react'; | ||
import styled from 'styled-components'; | ||
import { spacings } from '../../../tokens/spacings'; | ||
|
||
export const Metadata = styled.div` | ||
width: 100%; | ||
min-width: 256px; | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: ${spacings.LARGE}; | ||
> button { | ||
width: fit-content; | ||
} | ||
`; | ||
export const MetadataTable = styled.div` | ||
width: 100%; | ||
min-width: 256px; | ||
|
||
> table { | ||
width: 85%; | ||
const DataTable = styled(Table)` | ||
min-width: 256px; | ||
width: 85%; | ||
`; | ||
|
||
> tbody { | ||
> tr { | ||
> .table-first-col { | ||
width: 20%; | ||
padding-right: ${spacings.X_LARGE}; | ||
} | ||
export const NameCell = styled(Table.Cell)` | ||
width: 20%; | ||
padding-right: ${spacings.X_LARGE}; | ||
`; | ||
|
||
> .table-second-col { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
export const DataCell = styled(Table.Cell)` | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
> p { | ||
padding-right: 10px; | ||
} | ||
} | ||
} | ||
} | ||
> p { | ||
padding-right: 10px; | ||
} | ||
`; | ||
|
||
export { DataTable as Table }; |
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
25 changes: 0 additions & 25 deletions
25
src/features/ModelView/ModelSourceView/ModelSourceView.styled.tsx
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.