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

Fix /me and User setting rayout

satof3 2 лет назад
Родитель
Сommit
920874abae

+ 12 - 12
apps/app/src/components/Me/BasicInfoSettings.tsx

@@ -49,7 +49,7 @@ export const BasicInfoSettings = (): JSX.Element => {
   return (
   return (
     <>
     <>
 
 
-      <div className="row">
+      <div className="row mb-3">
         <label htmlFor="userForm[name]" className="text-start text-md-end col-md-3 col-form-label">{t('Name')}</label>
         <label htmlFor="userForm[name]" className="text-start text-md-end col-md-3 col-form-label">{t('Name')}</label>
         <div className="col-md-6">
         <div className="col-md-6">
           <input
           <input
@@ -62,7 +62,7 @@ export const BasicInfoSettings = (): JSX.Element => {
         </div>
         </div>
       </div>
       </div>
 
 
-      <div className="row">
+      <div className="row mb-3">
         <label htmlFor="userForm[email]" className="text-start text-md-end col-md-3 col-form-label">{t('Email')}</label>
         <label htmlFor="userForm[email]" className="text-start text-md-end col-md-3 col-form-label">{t('Email')}</label>
         <div className="col-md-6">
         <div className="col-md-6">
           <input
           <input
@@ -83,10 +83,10 @@ export const BasicInfoSettings = (): JSX.Element => {
         </div>
         </div>
       </div>
       </div>
 
 
-      <div className="row">
+      <div className="row mb-3">
         <label className="text-start text-md-end col-md-3 col-form-label">{t('Disclose E-mail')}</label>
         <label className="text-start text-md-end col-md-3 col-form-label">{t('Disclose E-mail')}</label>
-        <div className="col-md-6">
-          <div className="form-check form-check-inline">
+        <div className="col-md-6 my-auto">
+          <div className="form-check form-check-inline me-4">
             <input
             <input
               type="radio"
               type="radio"
               id="radioEmailShow"
               id="radioEmailShow"
@@ -95,7 +95,7 @@ export const BasicInfoSettings = (): JSX.Element => {
               checked={personalSettingsInfo?.isEmailPublished === true}
               checked={personalSettingsInfo?.isEmailPublished === true}
               onChange={() => changePersonalSettingsHandler({ isEmailPublished: true })}
               onChange={() => changePersonalSettingsHandler({ isEmailPublished: true })}
             />
             />
-            <label className="form-label form-check-label" htmlFor="radioEmailShow">{t('Show')}</label>
+            <label className="form-label form-check-label mb-0" htmlFor="radioEmailShow">{t('Show')}</label>
           </div>
           </div>
           <div className="form-check form-check-inline">
           <div className="form-check form-check-inline">
             <input
             <input
@@ -106,21 +106,21 @@ export const BasicInfoSettings = (): JSX.Element => {
               checked={personalSettingsInfo?.isEmailPublished === false}
               checked={personalSettingsInfo?.isEmailPublished === false}
               onChange={() => changePersonalSettingsHandler({ isEmailPublished: false })}
               onChange={() => changePersonalSettingsHandler({ isEmailPublished: false })}
             />
             />
-            <label className="form-label form-check-label" htmlFor="radioEmailHide">{t('Hide')}</label>
+            <label className="form-label form-check-label mb-0" htmlFor="radioEmailHide">{t('Hide')}</label>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
 
 
-      <div className="row">
+      <div className="row mb-3">
         <label className="text-start text-md-end col-md-3 col-form-label">{t('Language')}</label>
         <label className="text-start text-md-end col-md-3 col-form-label">{t('Language')}</label>
-        <div className="col-md-6">
+        <div className="col-md-6 my-auto">
           {
           {
             i18nConfig.locales.map((locale) => {
             i18nConfig.locales.map((locale) => {
               if (i18n == null) { return }
               if (i18n == null) { return }
               const fixedT = i18n.getFixedT(locale);
               const fixedT = i18n.getFixedT(locale);
 
 
               return (
               return (
-                <div key={locale} className="form-check form-check-inline">
+                <div key={locale} className="form-check form-check-inline me-4">
                   <input
                   <input
                     type="radio"
                     type="radio"
                     id={`radioLang${locale}`}
                     id={`radioLang${locale}`}
@@ -129,7 +129,7 @@ export const BasicInfoSettings = (): JSX.Element => {
                     checked={personalSettingsInfo?.lang === locale}
                     checked={personalSettingsInfo?.lang === locale}
                     onChange={() => changePersonalSettingsHandler({ lang: locale })}
                     onChange={() => changePersonalSettingsHandler({ lang: locale })}
                   />
                   />
-                  <label className="form-label form-check-label" htmlFor={`radioLang${locale}`}>{fixedT('meta.display_name') as string}</label>
+                  <label className="form-label form-check-label mb-0" htmlFor={`radioLang${locale}`}>{fixedT('meta.display_name') as string}</label>
                 </div>
                 </div>
               );
               );
             })
             })
@@ -150,7 +150,7 @@ export const BasicInfoSettings = (): JSX.Element => {
         </div>
         </div>
       </div>
       </div>
 
 
-      <div className="row my-3">
+      <div className="row my-4">
         <div className="offset-4 col-5">
         <div className="offset-4 col-5">
           <button
           <button
             data-testid="grw-besic-info-settings-update-button"
             data-testid="grw-besic-info-settings-update-button"

+ 2 - 2
apps/app/src/components/Me/UserSettings.tsx

@@ -11,11 +11,11 @@ const UserSettings = React.memo((): JSX.Element => {
   return (
   return (
     <div data-testid="grw-user-settings">
     <div data-testid="grw-user-settings">
       <div className="mb-5">
       <div className="mb-5">
-        <h2 className="border-bottom my-4">{t('Basic Info')}</h2>
+        <h4 className="border-bottom mt-4 mb-3 mb-md-5 pb-1">{t('Basic Info')}</h4>
         <BasicInfoSettings />
         <BasicInfoSettings />
       </div>
       </div>
       <div className="mb-5">
       <div className="mb-5">
-        <h2 className="border-bottom my-4">{t('Set Profile Image')}</h2>
+        <h4 className="border-bottom mt-4 mb-5 pb-1">{t('Set Profile Image')}</h4>
         <ProfileImageSettings />
         <ProfileImageSettings />
       </div>
       </div>
     </div>
     </div>

+ 5 - 5
apps/app/src/pages/me/[[...path]].page.tsx

@@ -1,6 +1,6 @@
 import React, { type ReactNode, useMemo } from 'react';
 import React, { type ReactNode, useMemo } from 'react';
 
 
-import {
+import type {
   GetServerSideProps, GetServerSidePropsContext,
   GetServerSideProps, GetServerSidePropsContext,
 } from 'next';
 } from 'next';
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
@@ -10,7 +10,7 @@ import Head from 'next/head';
 import { useRouter } from 'next/router';
 import { useRouter } from 'next/router';
 
 
 import { BasicLayout } from '~/components/Layout/BasicLayout';
 import { BasicLayout } from '~/components/Layout/BasicLayout';
-import { CrowiRequest } from '~/interfaces/crowi-request';
+import type { CrowiRequest } from '~/interfaces/crowi-request';
 import type { RendererConfig } from '~/interfaces/services/renderer';
 import type { RendererConfig } from '~/interfaces/services/renderer';
 import {
 import {
   useCurrentUser, useIsSearchPage, useGrowiCloudUri,
   useCurrentUser, useIsSearchPage, useGrowiCloudUri,
@@ -21,7 +21,7 @@ import {
 import { useSWRxCurrentPage } from '~/stores/page';
 import { useSWRxCurrentPage } from '~/stores/page';
 import loggerFactory from '~/utils/logger';
 import loggerFactory from '~/utils/logger';
 
 
-import { NextPageWithLayout } from '../_app.page';
+import type { NextPageWithLayout } from '../_app.page';
 import type { CommonProps } from '../utils/commons';
 import type { CommonProps } from '../utils/commons';
 import {
 import {
   getNextI18NextConfig, getServerSideCommonProps, generateCustomTitle, useInitSidebarConfig,
   getNextI18NextConfig, getServerSideCommonProps, generateCustomTitle, useInitSidebarConfig,
@@ -122,8 +122,8 @@ const MePage: NextPageWithLayout<Props> = (props: Props) => {
       </Head>
       </Head>
       <div className="dynamic-layout-root">
       <div className="dynamic-layout-root">
         <header className="py-3">
         <header className="py-3">
-          <div className="container-fluid">
-            <h1 className="title">{ targetPage.title }</h1>
+          <div className="container">
+            <h3 className="title mt-5">{ targetPage.title }</h3>
           </div>
           </div>
         </header>
         </header>