Web: Files: Fixed aside panel.
This commit is contained in:
parent
ebe35242c0
commit
19c925fcbf
@ -14,6 +14,7 @@ import Button from "@appserver/components/button";
|
||||
import Loaders from "@appserver/common/components/Loaders";
|
||||
import Loader from "@appserver/components/loader";
|
||||
import EmptyContainer from "../../EmptyContainer/EmptyContainer";
|
||||
import ModalDialog from "@appserver/components/modal-dialog";
|
||||
const DISPLAY_TYPE = "aside";
|
||||
const SelectFileDialogAsideView = ({
|
||||
t,
|
||||
@ -52,27 +53,22 @@ const SelectFileDialogAsideView = ({
|
||||
|
||||
return (
|
||||
<StyledAsidePanel visible={isPanelVisible}>
|
||||
<Backdrop
|
||||
onClick={onClose}
|
||||
<ModalDialog
|
||||
visible={isPanelVisible}
|
||||
zIndex={zIndex}
|
||||
isAside={true}
|
||||
/>
|
||||
<Aside visible={isPanelVisible} zIndex={zIndex}>
|
||||
{isTranslationsReady ? (
|
||||
<StyledSelectFilePanel
|
||||
displayType={DISPLAY_TYPE}
|
||||
isHeaderChildren={isHeaderChildren}
|
||||
>
|
||||
<StyledHeaderContent className="select-file-dialog_aside-header">
|
||||
<Heading
|
||||
size="medium"
|
||||
className="select-file-dialog_aside-header_title"
|
||||
>
|
||||
{headerName ? headerName : t("SelectFile")}
|
||||
</Heading>
|
||||
</StyledHeaderContent>
|
||||
|
||||
onClose={onClose}
|
||||
//className="select-file-modal-dialog"
|
||||
//style={{ maxWidth: "890px" }}
|
||||
contentHeight="100%"
|
||||
displayType="aside"
|
||||
//bodyPadding="0"
|
||||
removeScroll
|
||||
>
|
||||
<ModalDialog.Header>
|
||||
{headerName ? headerName : t("SelectFile")}
|
||||
</ModalDialog.Header>
|
||||
<ModalDialog.Body className="select-file_body-modal-dialog">
|
||||
<StyledSelectFilePanel isHeaderChildren={isHeaderChildren}>
|
||||
<div className="select-file-dialog_aside-body_wrapper">
|
||||
<div className="select-file-dialog_aside-children">{header}</div>
|
||||
<Text fontWeight="600" fontSize="14px">
|
||||
@ -126,6 +122,10 @@ const SelectFileDialogAsideView = ({
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</StyledSelectFilePanel>
|
||||
</ModalDialog.Body>
|
||||
<ModalDialog.Footer>
|
||||
<StyledSelectFilePanel isHeaderChildren={isHeaderChildren}>
|
||||
<div className="select-file-dialog-aside_buttons">
|
||||
<Button
|
||||
className="select-file-dialog-buttons-save"
|
||||
@ -142,10 +142,8 @@ const SelectFileDialogAsideView = ({
|
||||
/>
|
||||
</div>
|
||||
</StyledSelectFilePanel>
|
||||
) : (
|
||||
<Loaders.DialogAsideLoader withoutAside isPanel />
|
||||
)}
|
||||
</Aside>
|
||||
</ModalDialog.Footer>
|
||||
</ModalDialog>
|
||||
</StyledAsidePanel>
|
||||
);
|
||||
};
|
||||
|
@ -659,36 +659,28 @@ const StyledSelectFolderPanel = styled.div`
|
||||
}
|
||||
`;
|
||||
const StyledSelectFilePanel = styled.div`
|
||||
height: 100%;
|
||||
.select-file-dialog_empty-container {
|
||||
.ec-header {
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
${(props) =>
|
||||
props.displayType === "aside" &&
|
||||
css`
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
`}
|
||||
|
||||
.select-file-dialog-modal_buttons {
|
||||
${(props) =>
|
||||
props.isHeaderChildren ? "margin-top: 40px" : "margin-top:20px"};
|
||||
}
|
||||
.select-file-dialog_aside-body_wrapper {
|
||||
height: ${(props) =>
|
||||
props.isHeaderChildren ? "calc(100% - 260px);" : "calc(100% - 212px);"};
|
||||
props.isHeaderChildren ? "calc(100% - 147px);" : "calc(100% - 100px);"};
|
||||
}
|
||||
.select-file-dialog_aside-body_wrapper,
|
||||
|
||||
.select-folder-dialog_aside-body_wrapper {
|
||||
width: 320px;
|
||||
padding: 0 16px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.select-folder-dialog_aside-body_wrapper {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.select-file-dialog_aside-children {
|
||||
${(props) => props.isHeaderChildren && `padding-bottom: 16px;`}
|
||||
}
|
||||
@ -697,19 +689,7 @@ const StyledSelectFilePanel = styled.div`
|
||||
height: 100%;
|
||||
width: 290px;
|
||||
}
|
||||
.select-file-dialog_aside-header_title {
|
||||
margin: 0px;
|
||||
line-height: 56px;
|
||||
max-width: 474px;
|
||||
width: 400px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.select-file-dialog_aside-header {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.select-file-dialog_aside-header,
|
||||
|
||||
.file-name {
|
||||
border-bottom: 1px solid #eceef1;
|
||||
}
|
||||
@ -767,7 +747,6 @@ const StyledSelectFilePanel = styled.div`
|
||||
}
|
||||
.select-file-dialog-buttons-save {
|
||||
margin-right: 8px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
.select-file-modal-dialog-buttons-save {
|
||||
margin-right: 8px;
|
||||
|
Loading…
Reference in New Issue
Block a user