| @@ -1,9 +1,9 @@ | ||
| 1 | +import { WaitingOverlay } from '@auto-launch/components/Waiting'; | |
| 1 | 2 | import { forceReinstallPlugin, runUpdates } from '@auto-launch/functions/setup'; |
| 3 | +import { launchStrings } from '@auto-launch/strings'; | |
| 2 | 4 | import { digest } from '@shared/api/digest'; |
| 3 | -import { Spinner } from '@wordpress/components'; | |
| 4 | 5 | import { useCallback, useEffect } from '@wordpress/element'; |
| 5 | -import { __ } from '@wordpress/i18n'; | |
| 6 | 6 | |
| 7 | 7 | // The reload is also the retry; the server bounds how many, so it can't loop. |
| 8 | 8 | export const LaunchUpdate = ({ |
| 9 | 9 | pluginUpdateNeeded, |
| @@ -11,10 +11,8 @@ | ||
| 11 | 11 | pluginUpdateViaRest, |
| 12 | 12 | pluginSlug, |
| 13 | 13 | attempt, |
| 14 | 14 | }) => { |
| 15 | - const cardClass = 'flex w-full flex-col items-center p-6 text-center lg:p-10'; | |
| 16 | - | |
| 17 | 15 | const applyUpdates = useCallback(async () => { |
| 18 | 16 | // Run serially, not concurrently: two WP upgraders fight over the shared |
| 19 | 17 | // maintenance flag and filesystem. |
| 20 | 18 | const phpUpdateNeeded = |
| @@ -48,19 +46,14 @@ | ||
| 48 | 46 | useEffect(() => { |
| 49 | 47 | applyUpdates(); |
| 50 | 48 | }, [applyUpdates]); |
| 51 | 49 | |
| 50 | + const strings = launchStrings(); | |
| 51 | + | |
| 52 | 52 | return ( |
| 53 | - <div className={cardClass}> | |
| 54 | - <Spinner className="h-10 w-10 text-design-main" /> | |
| 55 | - <h2 className="mt-6 mb-0 p-0 text-lg font-semibold text-gray-900"> | |
| 56 | - {__('Updating your site', 'extendify-local')} | |
| 57 | - </h2> | |
| 58 | - <p className="mx-auto mt-3 mb-0 max-w-md p-0 text-base text-gray-900"> | |
| 59 | - {__( | |
| 60 | - "We're installing the latest updates. Please don't close this window — it will only take a moment.", | |
| 61 | - 'extendify-local', | |
| 62 | - )} | |
| 63 | - </p> | |
| 64 | - </div> | |
| 53 | + <WaitingOverlay | |
| 54 | + show | |
| 55 | + message={strings.updating} | |
| 56 | + note={strings.updatingNote} | |
| 57 | + /> | |
| 65 | 58 | ); |
| 66 | 59 | }; |