-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Create
ProcessIndicator
component for Syncing workflow
- Loading branch information
Showing
3 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
packages/neos-ui/src/Containers/Modals/SyncWorkspaceDialog/ProcessIndicator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* This file is part of the Neos.Neos.Ui package. | ||
* | ||
* (c) Contributors of the Neos Project - www.neos.io | ||
* | ||
* This package is Open Source Software. For the full copyright and license | ||
* information, please view the LICENSE file which was distributed with this | ||
* source code. | ||
*/ | ||
import React from 'react'; | ||
|
||
import {Dialog, Icon} from '@neos-project/react-ui-components'; | ||
import I18n from '@neos-project/neos-ui-i18n'; | ||
import {SyncingPhase} from '@neos-project/neos-ui-redux-store/src/CR/Syncing'; | ||
|
||
import {Diagram} from './Diagram'; | ||
import style from './style.module.css'; | ||
|
||
export const ProcessIndicator: React.FC<{ | ||
workspaceName: string; | ||
baseWorkspaceName: string; | ||
}> = (props) => { | ||
return ( | ||
<Dialog | ||
actions={[]} | ||
title={ | ||
<div className={style.modalTitle}> | ||
<Icon icon="refresh" spin /> | ||
<I18n | ||
id="Neos.Neos.Ui:SyncWorkspaceDialog:process.title" | ||
params={props} | ||
fallback={`Synchronizing workspace "${props.workspaceName}"...`} | ||
/> | ||
</div> | ||
} | ||
type={undefined as any} | ||
isOpen | ||
autoFocus | ||
preventClosing | ||
theme={undefined as any} | ||
style={undefined as any} | ||
> | ||
<div className={style.modalContents}> | ||
<Diagram | ||
phase={SyncingPhase.ONGOING} | ||
workspaceName={props.workspaceName} | ||
baseWorkspaceName={props.baseWorkspaceName} | ||
/> | ||
<I18n | ||
id="Neos.Neos.Ui:SyncWorkspaceDialog:process.message" | ||
params={props} | ||
fallback={`Please wait, while workspace "${props.workspaceName}" is being synchronized with recent changes in workspace "${props.baseWorkspaceName}". This may take a while.`} | ||
/> | ||
</div> | ||
</Dialog> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters