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

changed the loading message and added a component and its style #193

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
54 changes: 54 additions & 0 deletions src/constants/Loader.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.loader {
width: 48px;
height: 48px;
border-radius: 50%;
display: inline-block;
position: relative;
border: 3px solid;
border-color: #FFF #FFF transparent transparent;
box-sizing: border-box;
animation: rotation 1s linear infinite;
}
.loader::after,
.loader::before {
content: '';
box-sizing: border-box;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
border: 3px solid;
border-color: transparent transparent #FF3D00 #FF3D00;
width: 40px;
height: 40px;
border-radius: 50%;
box-sizing: border-box;
animation: rotationBack 0.5s linear infinite;
transform-origin: center center;
}
.loader::before {
width: 32px;
height: 32px;
border-color: #FFF #FFF transparent transparent;
animation: rotation 1.5s linear infinite;
}

@keyframes rotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes rotationBack {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-360deg);
}
}

10 changes: 10 additions & 0 deletions src/constants/Loader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'
import './Loader.css'

function Loader() {
return (
<span class="loader"></span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<span class="loader"></span>
<span className="loader"/>

)
}

export default Loader
4 changes: 3 additions & 1 deletion src/constants/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import React from 'react'
import Loader from "./Loader";
DevEmmy marked this conversation as resolved.
Show resolved Hide resolved

const messages = {
forbiddenResource: "Requested resource is forbidden",
Expand All @@ -26,7 +28,7 @@ const messages = {
groupCreate: "Successfully created the group",
deletedUser: "Successfully deleted the user",
confirmDeletion: "Deletion not confirmed",
loading: "Loading...",
loading: `${<Loader />}`,
jobsAdded: "Your jobs have been added to job queue",
createdFolder: "Successfully created the folder",
deletedFolder: "Successfully deleted the folder",
Expand Down