-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #535 from ramyakrishnai/migration-screens
Migration screens
- Loading branch information
Showing
13 changed files
with
180 additions
and
17 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
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
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
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,17 @@ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
const getContents = () => { | ||
return { | ||
heading: __( | ||
"Let's migrate your existing site to your new account", | ||
'wp-module-onboarding' | ||
), | ||
description: __( | ||
'Please wait a few seconds while we get your new account ready to import your existing WordPress site. ', | ||
'wp-module-onboarding' | ||
), | ||
importtext: __( 'Preparing your account', 'wp-module-onboarding' ), | ||
}; | ||
}; | ||
|
||
export default getContents; |
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,56 @@ | ||
import CommonLayout from '../../../components/Layouts/Common'; | ||
|
||
import { useEffect } from '@wordpress/element'; | ||
import { useDispatch } from '@wordpress/data'; | ||
|
||
import { store as nfdOnboardingStore } from '../../../store'; | ||
import { FOOTER_SITEGEN, HEADER_SITEGEN } from '../../../../constants'; | ||
|
||
import getContents from './contents'; | ||
import HeadingWithSubHeading from '../../../components/HeadingWithSubHeading/SiteGen'; | ||
import { getSiteMigrateUrl } from '../../../utils/api/siteGen'; | ||
|
||
const Migrate = () => { | ||
const { | ||
setIsHeaderEnabled, | ||
setSidebarActiveView, | ||
setHeaderActiveView, | ||
setDrawerActiveView, | ||
setIsHeaderNavigationEnabled, | ||
setFooterActiveView, | ||
setHideFooterNav, | ||
} = useDispatch( nfdOnboardingStore ); | ||
|
||
const loadData = async () => { | ||
const migrateUrl = await getSiteMigrateUrl(); | ||
migrateUrl?.body && window.open(migrateUrl?.body, "_self") | ||
Check failure on line 26 in src/OnboardingSPA/steps/SiteGen/Migration/index.js GitHub Actions / Run Lint Checks
|
||
}; | ||
|
||
useEffect( () => { | ||
setHideFooterNav( true ); | ||
setIsHeaderEnabled( false ); | ||
setSidebarActiveView( false ); | ||
setIsHeaderNavigationEnabled( false ); | ||
setHeaderActiveView( HEADER_SITEGEN ); | ||
setDrawerActiveView( false ); | ||
setFooterActiveView( FOOTER_SITEGEN ); | ||
loadData() | ||
} ); | ||
|
||
const content = getContents(); | ||
return ( | ||
<CommonLayout | ||
// isCentered | ||
className="nfd-onboarding-step--site-gen__migration" | ||
> | ||
<HeadingWithSubHeading title={ content?.heading } /> | ||
<div className="nfd-onboarding-step--site-gen__migration__contain"> | ||
<div className="nfd-onboarding-step--site-gen__migration__loader"></div>{ ' ' } | ||
<p className="importtext">{ content?.importtext }</p> | ||
</div> | ||
<p className="description">{ content?.description }</p> | ||
</CommonLayout> | ||
); | ||
}; | ||
|
||
export default Migrate; |
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,19 @@ | ||
import { copy } from '@wordpress/icons'; | ||
import { lazy } from '@wordpress/element'; | ||
import { __ } from '@wordpress/i18n'; | ||
import { Step } from '../../../data/models/Step'; | ||
|
||
const StepMigration = lazy( () => import( './index' ) ); | ||
|
||
export const stepMigration = new Step( { | ||
path: '/sitegen/step/migration', | ||
title: __( 'Migration', 'wp-module-onboarding' ), | ||
Component: StepMigration, | ||
icon: copy, | ||
drawerNavigation: false, | ||
sidebars: { | ||
LearnMore: { | ||
SidebarComponents: [], | ||
}, | ||
}, | ||
} ); |
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,41 @@ | ||
.nfd-onboarding-step--site-gen__migration { | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
justify-content: flex-start; | ||
font-weight: 500; | ||
.description{ | ||
font-size: 18px; | ||
color: var(--nfd-onboarding-primary); | ||
margin: 50px 0; | ||
} | ||
.nfd-onboarding-step--site-gen__migration__contain { | ||
display: flex; | ||
align-items: center; | ||
border-radius: 12px; | ||
gap: 16px; | ||
padding: 24px; | ||
background-color: var(--nfd-onboarding-card-background); | ||
justify-content: center; | ||
width: 436px; | ||
.importtext{ | ||
color: var(--nfd-onboarding-primary); | ||
font-size: 16px; | ||
font-weight: 500; | ||
} | ||
.nfd-onboarding-step--site-gen__migration__loader { | ||
border: 5px solid var(--nfd-onboarding-progress-bar-background); | ||
border-top: 5px solid var(--nfd-onboarding-progress-bar-fill); | ||
border-radius: 50%; | ||
width: 29px; | ||
height: 28px; | ||
animation: spin 2s linear infinite; | ||
} | ||
|
||
@keyframes spin { | ||
0% { transform: rotate(0deg); } | ||
100% { transform: rotate(360deg); } | ||
} | ||
} | ||
|
||
} |
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
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
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
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
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
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