feat: add modelCompose icon and created time (#466)

This commit is contained in:
alex-krasn 2020-08-03 08:18:58 -07:00 коммит произвёл GitHub
Родитель 78996ea656
Коммит 2fa32ef5f7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 24 добавлений и 5 удалений

Просмотреть файл

@ -2,7 +2,7 @@
// Licensed under the MIT license.
import React from "react";
import { Customizer, IColumn, ICustomizations, Modal, DetailsList, SelectionMode, DetailsListLayoutMode, PrimaryButton, TextField } from "@fluentui/react";
import { Customizer, IColumn, ICustomizations, Modal, DetailsList, SelectionMode, DetailsListLayoutMode, PrimaryButton, TextField, FontIcon } from "@fluentui/react";
import { getDarkGreyTheme, getPrimaryGreenTheme, getPrimaryGreyTheme } from "../../../../common/themes";
import { strings } from "../../../../common/strings";
import { IModel } from "./modelCompose";
@ -43,18 +43,37 @@ export default class ComposeModelView extends React.Component<IComposeModelViewP
const columns: IColumn[] = [
{
key: "column1",
name: strings.modelCompose.column.icon.name,
minWidth: 16,
maxWidth: 16,
className: "composed-icon-cell",
ariaLabel: strings.modelCompose.columnAria.icon,
isIconOnly: true,
onRender: (model) => model.attributes?.isComposed ? <FontIcon iconName={"Merge"} className="model-fontIcon" /> : null
},
{
key: "column2",
name: strings.modelCompose.column.id.headerName,
minWidth: 250,
maxWidth: 250,
minWidth: 150,
maxWidth: 300,
isResizable: true,
onRender: (model) => <span>{model.modelId}</span>,
},
{
key: "column2",
key: "column3",
name: strings.modelCompose.column.name.headerName,
minWidth: 50,
maxWidth: 300,
isResizable: true,
onRender: (model) => <span>{model.modelName}</span>,
},
{
key: "column4",
name: strings.modelCompose.column.created.headerName,
minWidth: 100,
maxWidth: 200,
isResizable: true,
onRender: (model) => <span>{new Date(model.createdDateTime).toLocaleString()}</span>,
}
];

Просмотреть файл

@ -123,7 +123,7 @@ h4 {
}
.modal-list-container {
margin: 0.5rem;
margin-top: 1rem;
max-height: 40vh;
overflow-x: hidden;
}