-
-
-
-
{ optimoleDashboardApp.strings.options_strings.offload_disable_warning_title }
+ )}
+
+ {'offload_images' === errorMedia && (
+
+ )}
+
+ {'rollback_images' === errorMedia && (
+
+ )}
+
+ { 0 < offloadConflicts.length && (
+
+
+
+ {offloadConflicts.map( ( conflict ) => (
+ - {conflict}
+ ) )}
+
+
+
{options_strings.offload_conflicts_part_2}
+
+
+
+ )}
+
+
+ {! isInProgress && (
+
+ )}
-
-
-
-
- ) }
+ { ! isInProgress && offloadLimitReached && (
+
+ )}
- { isOffloadMediaEnabled && (
- <>
-
-
-
-
-
-
-
-
- { 'enableOffloading' === modal && (
- setModal( false ) }
- onConfirm={ () => {
- setModal( false );
- onOffloadMedia();
- } }
- />
- )}
+ { modal && (
+
+ )}
- { loadingSync && (
- <>
-
-
- { 'disableOffloading' === modal && (
- setModal( false ) }
- onConfirm={ () => {
- setModal( false );
- const options = settings;
- options.offloading_status = 'disabled';
- saveSettings( options );
- } }
- variant="warning"
- />
- )}
- >
- ) }
-
-
-
- { loadingSync && (
- <>
-
-
-
{ optimoleDashboardApp.strings.options_strings.sync_media_progress }
-
-
-
-
-
-
- { 0 === totalNumberOfImages ? (
-
{ optimoleDashboardApp.strings.options_strings.calculating_estimated_time }
- ) : (
-
{ optimoleDashboardApp.strings.options_strings.images_processing }
- ) }
-
-
-
- >
- ) }
-
- { true === offloadLibraryLink && (
-
{ optimoleDashboardApp.strings.options_strings.sync_media_link } { optimoleDashboardApp.strings.options_strings.here }
- ) }
-
- { 'offload_images' === errorMedia && (
-
-
-
-
-
{ optimoleDashboardApp.strings.options_strings.sync_media_error }
-
-
-
{ optimoleDashboardApp.strings.options_strings.sync_media_error_desc }
-
- ) }
- >
- ) }
+ { offloadLibraryLink && (
+
{options_strings.sync_media_link} {options_strings.here}
+ )}
- { ( isOffloadMediaEnabled || loadingRollback ) && (
- <>
-
-
-
-
-
-
-
-
- { 'enableRollback' === modal && (
- setModal( false ) }
- onConfirm={ () => {
- setModal( false );
- onRollbackdMedia();
- } }
- />
- )}
-
- { loadingRollback && (
- <>
-
-
- { 'disableRollback' === modal && (
- setModal( false ) }
- onConfirm={ () => {
- setModal( false );
- const options = settings;
- options.rollback_status = 'disabled';
- saveSettings( options );
- } }
- variant="warning"
- />
- )}
- >
- ) }
-
-
-
- { loadingRollback && (
- <>
-
-
-
{ optimoleDashboardApp.strings.options_strings.rollback_media_progress }
-
-
-
-
-
-
- { 0 === totalNumberOfImages ? (
-
{ optimoleDashboardApp.strings.options_strings.calculating_estimated_time }
- ) : (
-
{ optimoleDashboardApp.strings.options_strings.images_processing }
- ) }
-
-
-
- >
- ) }
-
- { Boolean( offloadConflicts.length ) && (
-
-
{ optimoleDashboardApp.strings.options_strings.offload_conflicts_part_1 }
-
- { offloadConflicts.map( ( conflict, index ) => (
-
- { conflict }
-
- ) ) }
-
-
{ optimoleDashboardApp.strings.options_strings.offload_conflicts_part_2 }
-
-
-
- ) }
-
- { true === rollbackLibraryLink && (
-
{ optimoleDashboardApp.strings.options_strings.rollback_media_link } { optimoleDashboardApp.strings.options_strings.here }
- ) }
-
- { 'rollback_images' === errorMedia && (
-
-
-
-
-
{ optimoleDashboardApp.strings.options_strings.rollback_media_error }
-
-
-
{ optimoleDashboardApp.strings.options_strings.rollback_media_error_desc }
-
- ) }
- >
+ { rollbackLibraryLink && (
+
{ options_strings.rollback_media_link } { optimoleDashboardApp.strings.options_strings.here }
) }
- >
+
+
);
};
diff --git a/assets/src/dashboard/parts/connected/settings/Resize.js b/assets/src/dashboard/parts/connected/settings/Resize.js
index f843b4b4..3663bf58 100644
--- a/assets/src/dashboard/parts/connected/settings/Resize.js
+++ b/assets/src/dashboard/parts/connected/settings/Resize.js
@@ -17,6 +17,7 @@ import {
import { useSelect } from '@wordpress/data';
import { useState } from '@wordpress/element';
+import Notice from '../../components/Notice';
const Resize = ({
settings,
@@ -161,12 +162,8 @@ const Resize = ({
/>