Просмотр исходного кода

Modified the code to fix login page.

Shunm634-source 3 лет назад
Родитель
Сommit
10044224e7

+ 0 - 11
packages/app/src/components/Layout/Login.module.scss

@@ -1,17 +1,6 @@
 @use '~/styles/bootstrap/init' as bs;
 
 
-.nologin {
-  .link-switch {
-    color: bs.$gray-200;
-
-    &:hover {
-      color: white;
-    }
-  }
-}
-
-
 .login-page {
   // layout
   .main .row .login-header,

+ 8 - 0
packages/app/src/components/Layout/NoLoginLayout.module.scss

@@ -156,6 +156,14 @@
   }
 }
 
+.link-switch {
+  color: $gray-200;
+
+  &:hover {
+    color: white;
+  }
+}
+
 .nologin.error {
   .alert h2 {
     line-height: 1em;

+ 1 - 1
packages/app/src/components/LoginForm.jsx

@@ -291,7 +291,7 @@ class LoginForm extends React.Component {
     const isSomeExternalAuthEnabled = true;
 
     return (
-      <div className="login-dialog mx-auto" id="login-dialog">
+      <div className="noLogin-dialog mx-auto" id="noLogin-dialog">
         <div className="row mx-0">
           <div className="col-12">
             <ReactCardFlip isFlipped={this.state.isRegistering} flipDirection="horizontal" cardZIndex="3">

+ 2 - 2
packages/app/src/pages/login.page.tsx

@@ -35,7 +35,7 @@ const LoginPage: NextPage<Props> = (props: Props) => {
   // page
   useCurrentPathname(props.currentPathname);
 
-  const classNames: string[] = [];
+  const classNames: string[] = ['login-page'];
 
   const LoginForm = dynamic(() => import('~/components/LoginForm'), {
     ssr: false,
@@ -43,7 +43,7 @@ const LoginPage: NextPage<Props> = (props: Props) => {
 
   return (
     <NoLoginLayout title={useCustomTitle(props, 'GROWI')} className={classNames.join(' ')}>
-      <div id="login-page">
+      <div className="col-md-12">
         <LoginForm objOfIsExternalAuthEnableds={props.enabledStrategies} isLocalStrategySetup={true} isLdapStrategySetup={true}
           isRegistrationEnabled={true} registrationWhiteList={props.registrationWhiteList} isPasswordResetEnabled={true} />
       </div>