Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/translations loaders #294

Merged
merged 21 commits into from
Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1a3cfcb
Web: Common: added new loaders
gopienkonikita Jun 30, 2021
d163e09
Web: Components: added isLoading prop to modal-dialog
gopienkonikita Jun 30, 2021
fff65d1
Web: Files: added tReady to file dialogs
gopienkonikita Jun 30, 2021
41f7a87
Web: Files: added tReady to file panels
gopienkonikita Jun 30, 2021
2a013c9
Web: Common: refactoring tree menu loader
gopienkonikita Jun 30, 2021
f915dee
Web: Files: added translation loaders to the file module
gopienkonikita Jun 30, 2021
2576784
Web: Common: added borderRadius prop
gopienkonikita Jun 30, 2021
d9eca86
Web: People: added tReady to file dialogs
gopienkonikita Jun 30, 2021
c5da5a1
Web: Client: added tReady for confirm pages
gopienkonikita Jun 30, 2021
2c1bdf0
Web: People: added loaders to people translations
gopienkonikita Jun 30, 2021
bcf7ceb
Merge branch 'develop' into feature/translations-loaders
gopienkonikita Jul 1, 2021
abfcba8
Web: People: added withLoader HOC to MainButton
gopienkonikita Jul 1, 2021
b195036
Web: People: added withLoader HOC to Section Header
gopienkonikita Jul 1, 2021
513ec04
Merge branch 'develop' into feature/translations-loaders
gopienkonikita Jul 1, 2021
c940aae
Web: refactoring translation loaders
gopienkonikita Jul 2, 2021
4f9e032
Web: Files: added filter cleaning
gopienkonikita Jul 2, 2021
45920f7
Web: fixed MainButton loader
gopienkonikita Jul 2, 2021
2a44887
Web: hid temp loaders
gopienkonikita Jul 2, 2021
88ca0fb
Web: Files: fixed selection
Jul 2, 2021
8abb14c
Merge branch 'feature/translations-loaders' of github.com:ONLYOFFICE/…
Jul 2, 2021
658b705
Web: Client: About: Removed useless component
gopienkonikita Jul 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from "react";
import Loaders from "../../Loaders";
import StyledDialogAsideLoader from "./StyledDialogAsideLoader";
import Aside from "@appserver/components/aside";
import Backdrop from "@appserver/components/backdrop";

const DialogAsideLoader = ({ isPanel, withoutAside }) => {
const zIndex = 310;

const renderClearDialogAsideLoader = () => {
return (
<StyledDialogAsideLoader visible isPanel={isPanel}>
<div className="dialog-loader-header">
<Loaders.Rectangle />
</div>
<div className="dialog-loader-body">
<Loaders.Rectangle height="200px" />
</div>

<div className="dialog-loader-footer">
<Loaders.Rectangle />
</div>
</StyledDialogAsideLoader>
);
};

return withoutAside ? (
renderClearDialogAsideLoader()
) : (
<>
<Backdrop visible isAside />
<StyledDialogAsideLoader visible isPanel={isPanel}>
<Aside className="dialog-aside-loader" visible zIndex={zIndex}>
{renderClearDialogAsideLoader()}
</Aside>
</StyledDialogAsideLoader>
</>
);
};

export default DialogAsideLoader;
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import styled, { css } from "styled-components";

const StyledDialogAsideLoader = styled.div`
${(props) =>
props.isPanel &&
css`
.dialog-aside-loader {
padding: 0;
transform: translateX(${(props) => (props.visible ? "0" : "500px")});
width: 500px;

@media (max-width: 550px) {
width: 320px;
transform: translateX(${(props) => (props.visible ? "0" : "320px")});
}
}
`}

${(props) =>
props.isPanel
? css`
.dialog-loader-header {
padding: 12px 16px;
}

.dialog-loader-body {
padding: 16px;
}

.dialog-loader-footer {
padding: 12px 16px;
position: fixed;
bottom: 0;
width: 468px;

@media (max-width: 550px) {
width: 288px;
}
}
`
: css`
.dialog-loader-header {
border-bottom: 1px solid rgb(222, 226, 230);
padding: 12px 0;
}

.dialog-loader-body {
padding: 16px 0;
}

.dialog-loader-footer {
position: fixed;
bottom: 16px;
width: 293px;
}
`}
`;

export default StyledDialogAsideLoader;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default from "./DialogAsideLoader";
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from "react";
import Loaders from "../../Loaders";
import StyledDialogLoader from "./StyledDialogLoader";

const DialogLoader = () => {
return (
<StyledDialogLoader>
<div className="dialog-loader-header">
<Loaders.Rectangle height="28px" width="470px" />
<Loaders.Rectangle
className="dialog-loader-icon"
height="28px"
width="28px"
/>
</div>
<div className="dialog-loader-body">
<Loaders.Rectangle height="150px" />
</div>

<div className="dialog-loader-footer">
<Loaders.Rectangle height="30px" width="120px" />
<Loaders.Rectangle
className="dialog-loader-icon"
height="30px"
width="100px"
/>
</div>
</StyledDialogLoader>
);
};

export default DialogLoader;
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import styled from "styled-components";

const StyledDialogLoader = styled.div`
.dialog-loader-header {
border-bottom: 1px solid rgb(222, 226, 230);
display: flex;
padding: 12px 0;
}

.dialog-loader-body {
display: flex;
flex-direction: column;
justify-content: center;
padding-top: 12px;
}

.dialog-loader-footer {
display: flex;
padding-top: 12px;
}

.dialog-loader-icon {
margin-left: auto;
}
`;

export default StyledDialogLoader;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default from "./DialogLoader";
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import PropTypes from "prop-types";
import { StyledTreeFolder, StyledContainer } from "./StyledTreeFolderLoader";
import RectangleLoader from "../RectangleLoader";
import CircleLoader from "../CircleLoader";
import TreeNodeLoader from "../TreeNodeLoader";

const TreeFolderLoader = ({ id, className, style, ...rest }) => {
const {
Expand All @@ -19,173 +19,19 @@ const TreeFolderLoader = ({ id, className, style, ...rest }) => {
return (
<div id={id} className={className} style={style}>
<StyledTreeFolder>
<CircleLoader
title={title}
height="32"
radius="3"
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="100%"
height="24"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<CircleLoader
title={title}
height="32"
radius="3"
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="100%"
height="24"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<CircleLoader
title={title}
height="32"
radius="3"
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="100%"
height="24"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<TreeNodeLoader {...rest} />
<TreeNodeLoader {...rest} />
<TreeNodeLoader {...rest} />
</StyledTreeFolder>

<StyledTreeFolder>
<CircleLoader
title={title}
height="32"
radius="3"
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="100%"
height="24"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<CircleLoader
title={title}
height="32"
radius="3"
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="100%"
height="24"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<CircleLoader
title={title}
height="32"
radius="3"
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="100%"
height="24"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<TreeNodeLoader {...rest} />
<TreeNodeLoader {...rest} />
<TreeNodeLoader {...rest} />
</StyledTreeFolder>

<StyledTreeFolder>
<CircleLoader
title={title}
radius="3"
height="32"
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<RectangleLoader
title={title}
width="100%"
height="24"
borderRadius={borderRadius}
backgroundColor={backgroundColor}
foregroundColor={foregroundColor}
backgroundOpacity={backgroundOpacity}
foregroundOpacity={foregroundOpacity}
speed={speed}
animate={animate}
/>
<TreeNodeLoader {...rest} />
</StyledTreeFolder>

<StyledContainer>
Expand Down
Loading