| 
									
										
										
										
											2020-03-23 15:35:58 +01:00
										 |  |  | /* | 
					
						
							| 
									
										
										
										
											2024-09-24 09:42:07 +02:00
										 |  |  |  * Copyright (c) 2020 - present Cloudogu GmbH | 
					
						
							| 
									
										
										
										
											2020-03-23 15:35:58 +01:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2024-09-24 09:42:07 +02:00
										 |  |  |  * This program is free software: you can redistribute it and/or modify it under | 
					
						
							|  |  |  |  * the terms of the GNU Affero General Public License as published by the Free | 
					
						
							|  |  |  |  * Software Foundation, version 3. | 
					
						
							| 
									
										
										
										
											2020-03-23 15:35:58 +01:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2024-09-24 09:42:07 +02:00
										 |  |  |  * This program is distributed in the hope that it will be useful, but WITHOUT | 
					
						
							|  |  |  |  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | 
					
						
							|  |  |  |  * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more | 
					
						
							|  |  |  |  * details. | 
					
						
							| 
									
										
										
										
											2020-03-23 15:35:58 +01:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2024-09-24 09:42:07 +02:00
										 |  |  |  * You should have received a copy of the GNU Affero General Public License | 
					
						
							|  |  |  |  * along with this program. If not, see https://www.gnu.org/licenses/.
 | 
					
						
							| 
									
										
										
										
											2020-03-23 15:35:58 +01:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2024-09-24 09:42:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-20 16:59:02 +02:00
										 |  |  | import React from "react"; | 
					
						
							| 
									
										
										
										
											2019-10-23 15:47:08 +02:00
										 |  |  | import { WithTranslation, withTranslation } from "react-i18next"; | 
					
						
							| 
									
										
										
										
											2021-09-15 17:40:08 +02:00
										 |  |  | import classNames from "classnames"; | 
					
						
							| 
									
										
										
										
											2019-10-20 16:59:02 +02:00
										 |  |  | import styled from "styled-components"; | 
					
						
							|  |  |  | import Image from "./Image"; | 
					
						
							| 
									
										
										
										
											2018-09-03 16:17:36 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-23 15:47:08 +02:00
										 |  |  | type Props = WithTranslation & { | 
					
						
							| 
									
										
										
										
											2019-10-19 16:38:07 +02:00
										 |  |  |   message?: string; | 
					
						
							| 
									
										
										
										
											2018-09-03 16:17:36 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-08 16:42:08 +02:00
										 |  |  | const Wrapper = styled.div`
 | 
					
						
							|  |  |  |   min-height: 256px; | 
					
						
							|  |  |  | `;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const FixedSizedImage = styled(Image)`
 | 
					
						
							|  |  |  |   width: 128px; | 
					
						
							|  |  |  |   height: 128px; | 
					
						
							|  |  |  | `;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-24 10:38:17 +01:00
										 |  |  | /** | 
					
						
							|  |  |  |  * @deprecated Please import the identical module from "@scm-manager/ui-core" | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-03 16:17:36 +02:00
										 |  |  | class Loading extends React.Component<Props> { | 
					
						
							|  |  |  |   render() { | 
					
						
							| 
									
										
										
										
											2019-10-08 16:42:08 +02:00
										 |  |  |     const { message, t } = this.props; | 
					
						
							| 
									
										
										
										
											2018-09-03 16:17:36 +02:00
										 |  |  |     return ( | 
					
						
							| 
									
										
										
										
											2021-09-15 17:40:08 +02:00
										 |  |  |       <Wrapper | 
					
						
							|  |  |  |         className={classNames( | 
					
						
							|  |  |  |           "is-flex", | 
					
						
							|  |  |  |           "is-flex-direction-column", | 
					
						
							|  |  |  |           "is-justify-content-center", | 
					
						
							|  |  |  |           "is-align-items-center" | 
					
						
							|  |  |  |         )} | 
					
						
							|  |  |  |       > | 
					
						
							|  |  |  |         <FixedSizedImage className="mb-3" src="/images/loading.svg" alt={t("loading.alt")} /> | 
					
						
							| 
									
										
										
										
											2019-10-08 16:42:08 +02:00
										 |  |  |         <p className="has-text-centered">{message}</p> | 
					
						
							|  |  |  |       </Wrapper> | 
					
						
							| 
									
										
										
										
											2018-09-03 16:17:36 +02:00
										 |  |  |     ); | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-23 15:47:08 +02:00
										 |  |  | export default withTranslation("commons")(Loading); |