Taichi Masuyama 4 лет назад
Родитель
Сommit
ff36e8978d

+ 1 - 6
packages/app/src/client/services/AdminAppContainer.js

@@ -453,14 +453,9 @@ export default class AdminAppContainer extends Container {
   /**
    * Start v5 page migration
    * @memberOf AdminAppContainer
-   * @property action takes either 'notNow' or 'upgrade'. 'upgrade' will start or resume migration
+   * @property action takes only 'upgrade' for now. 'upgrade' will start or resume migration
    */
   async v5PageMigrationHandler(action) {
-    // not wait response and immediately set state to give priority to response time
-    if (action === 'notNow') {
-      this.changeIsV5Compatible(false);
-    }
-
     const response = await this.appContainer.apiv3.post('/pages/v5-schema-migration', { action });
     const { isV5Compatible } = response.data;
     return { isV5Compatible };

+ 0 - 8
packages/app/src/components/Admin/App/V5PageMigration.tsx

@@ -17,10 +17,6 @@ const V5PageMigration: FC<any> = (props) => {
     await adminAppContainer.v5PageMigrationHandler('upgrade');
   };
 
-  const onNotNowClicked = async() => {
-    await adminAppContainer.v5PageMigrationHandler('notNow');
-  };
-
   return (
     <>
       <V5PageMigrationModal
@@ -39,10 +35,6 @@ const V5PageMigration: FC<any> = (props) => {
       </p>
       <div className="row my-3">
         <div className="mx-auto">
-          {
-            isV5Compatible == null
-            && (<button type="button" className="btn btn-secondary mr-3" onClick={() => onNotNowClicked()}>Not now</button>)
-          }
           <button type="button" className="btn btn-warning" onClick={() => setIsV5PageMigrationModalShown(true)}>Upgrade to v5</button>
         </div>
       </div>

+ 0 - 13
packages/app/src/server/routes/apiv3/pages.js

@@ -689,19 +689,6 @@ module.exports = (crowi) => {
     const { action } = req.body;
 
     switch (action) {
-      case 'notNow':
-        try {
-          // set notNow
-          await crowi.configManager.updateConfigsInTheSameNamespace('crowi', {
-            'app:isV5Compatible': false,
-          });
-        }
-        catch (err) {
-          // not throw since this is not important
-          logger.error('Error occurred while updating app:isV5Compatible.', err);
-        }
-        break;
-
       case 'upgrade':
         try {
           const Page = crowi.model('Page');