Jelajahi Sumber

adjust behavior

itizawa 5 tahun lalu
induk
melakukan
a6c5e11fa0
2 mengubah file dengan 6 tambahan dan 52 penghapusan
  1. 3 3
      src/client/js/components/LoginForm.jsx
  2. 3 49
      src/client/styles/scss/_login.scss

+ 3 - 3
src/client/js/components/LoginForm.jsx

@@ -250,8 +250,8 @@ class LoginForm extends React.Component {
       <div className="login-dialog mx-auto flipper" id="login-dialog">
       <div className="login-dialog mx-auto flipper" id="login-dialog">
         <div className="row mx-0">
         <div className="row mx-0">
           <div className="col-12">
           <div className="col-12">
-            <ReactCardFlip isFlipped={this.state.isRegistering} flipDirection="horizontal">
-              <div>
+            <ReactCardFlip isFlipped={this.state.isRegistering} flipDirection="horizontal" cardZIndex="3">
+              <div className="front">
                 {isLocalOrLdapStrategiesEnabled && this.renderLocalOrLdapLoginForm()}
                 {isLocalOrLdapStrategiesEnabled && this.renderLocalOrLdapLoginForm()}
                 {isSomeExternalAuthEnabled && this.renderExternalAuthLoginForm()}
                 {isSomeExternalAuthEnabled && this.renderExternalAuthLoginForm()}
                 {isRegistrationEnabled && (
                 {isRegistrationEnabled && (
@@ -264,7 +264,7 @@ class LoginForm extends React.Component {
                   </div>
                   </div>
               )}
               )}
               </div>
               </div>
-              <div>
+              <div className="back">
                 {isRegistrationEnabled && this.renderRegisterForm()}
                 {isRegistrationEnabled && this.renderRegisterForm()}
               </div>
               </div>
             </ReactCardFlip>
             </ReactCardFlip>

+ 3 - 49
src/client/styles/scss/_login.scss

@@ -273,55 +273,9 @@
     z-index: 2;
     z-index: 2;
   }
   }
 
 
-  // flip animation
-  .login-dialog.flipper {
-    transition: min-height 0.2s;
-
-    &.to-flip {
-      min-height: 295px;
-
-      // has-error
-      &.has-error {
-        min-height: #{295px + 32px};
-      }
-    }
-
-    .front,
-    .back {
-      transition: 0.4s;
-      backface-visibility: hidden;
-      transform-style: preserve-3d;
-      // fix https://github.com/weseek/growi/issues/330
-      -webkit-backface-visibility: hidden;
-      -webkit-transform-style: preserve-3d;
-    }
-
-    .front {
-      z-index: 2;
-    }
-
-    .back {
-      position: absolute;
-      top: 0;
-      right: 15px;
-      left: 15px;
-    }
-
-    .back,
-    &.to-flip .front {
-      transform: rotateY(180deg);
-
-      // fix https://github.com/weseek/growi/issues/330
-      // 'backface-visibility: hidden' and 'z-index: -1' breaks layout in iOS
-      ::after {
-        z-index: 0;
-        opacity: 0.3;
-      }
-    }
-
-    &.to-flip .back {
-      transform: rotateY(0deg);
-    }
+  .react-card-front,
+  .react-card-back {
+    height: 0% !important;
   }
   }
 }
 }