Skip to content

Commit

Permalink
Photo Picker: Update migration connection notification (#96005)
Browse files Browse the repository at this point in the history
  • Loading branch information
bogiii authored Nov 4, 2024
1 parent c50e9f3 commit bec6206
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
15 changes: 15 additions & 0 deletions client/my-sites/marketing/connections/google-photos-migration.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { localize } from 'i18n-calypso';
import { Fragment } from 'react';

const GooglePhotosMigration = ( { translate } ) => (
<Fragment>
<h3>{ translate( 'Your Google Photos connection is being upgraded!' ) }</h3>
<p>
{ translate(
'We are moving to a new Google Photos Picker service. You will need to disconnect and reconnect to continue accessing your photos.'
) }
</p>
</Fragment>
);

export default localize( GooglePhotosMigration );
15 changes: 0 additions & 15 deletions client/my-sites/marketing/connections/picasa-migration.jsx

This file was deleted.

9 changes: 5 additions & 4 deletions client/my-sites/marketing/connections/service.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ import { isJetpackSite } from 'calypso/state/sites/selectors';
import { getSelectedSiteId } from 'calypso/state/ui/selectors';
import AccountDialog from './account-dialog';
import Connection from './connection';
import GooglePhotosMigration from './google-photos-migration';
import MailchimpSettings, { renderMailchimpLogo } from './mailchimp-settings';
import PicasaMigration from './picasa-migration';
import ServiceAction from './service-action';
import ServiceConnectedAccounts from './service-connected-accounts';
import ServiceDescription from './service-description';
Expand Down Expand Up @@ -495,7 +495,7 @@ export class SharingService extends Component {
return true;
}

if ( this.isPicasaMigration( status ) ) {
if ( this.isGooglePhotosMigration( status ) ) {
return true;
}

Expand All @@ -513,7 +513,8 @@ export class SharingService extends Component {
return get( this, 'props.service.ID' ) === 'mailchimp';
};

isPicasaMigration( status ) {
// Is the service a Google Photos that requires migration to Google Photos Picker API
isGooglePhotosMigration( status ) {
if ( status === 'must-disconnect' && get( this, 'props.service.ID' ) === 'google_photos' ) {
return true;
}
Expand Down Expand Up @@ -664,7 +665,7 @@ export class SharingService extends Component {
connections={ connections }
/>

{ this.isPicasaMigration( connectionStatus ) && <PicasaMigration /> }
{ this.isGooglePhotosMigration( connectionStatus ) && <GooglePhotosMigration /> }

{ ! this.isMailchimpService( connectionStatus ) && (
<ServiceConnectedAccounts
Expand Down

0 comments on commit bec6206

Please sign in to comment.