Improve file bar

This commit is contained in:
Yang Luo 2023-09-10 17:10:38 +08:00
parent 4b790440af
commit dab87ae97e
1 changed files with 29 additions and 19 deletions

View File

@ -811,15 +811,22 @@ class FileTree extends React.Component {
<Descriptions.Item label={i18next.t("factorset:File name")}>
{file.title}
</Descriptions.Item>
{
!Conf.EnableExtraPages ? null : (
<Descriptions.Item label={i18next.t("store:File type")}>
{Setting.getExtFromFile(file)}
</Descriptions.Item>
)
}
<Descriptions.Item label={i18next.t("factorset:File size")}>
{Setting.getFriendlyFileSize(file.size)}
</Descriptions.Item>
<Descriptions.Item label={i18next.t("general:Created time")}>
{Setting.getFormattedDate(file.createdTime)}
</Descriptions.Item>
{
!Conf.EnableExtraPages ? null : (
<React.Fragment>
<Descriptions.Item label={i18next.t("store:Collected time")}>
{Setting.getFormattedDate(Setting.getCollectedTime(file.title))}
<DatePicker key={file.key} showTime defaultValue={this.getMomentTime(this.getPropertyValue(file, "collectedTime"))} onChange={(value, dateString) => {
@ -835,6 +842,9 @@ class FileTree extends React.Component {
}
</Select>
</Descriptions.Item>
</React.Fragment>
)
}
</Descriptions>
</div>
);
@ -847,7 +857,7 @@ class FileTree extends React.Component {
filePaneHeight = 0;
}
return `calc(100vh - ${filePaneHeight + 186}px)`;
return `calc(100vh - ${filePaneHeight + 186 - (Conf.EnableExtraPages ? 0 : 50)}px)`;
}
render() {