Tatsuya Ise 2 лет назад
Родитель
Сommit
d2fa4e425b

+ 2 - 1
apps/app/src/components/Admin/App/QuestionnaireSettings.tsx

@@ -6,6 +6,7 @@ import { useTranslation } from 'next-i18next';
 
 
 import { apiv3Put } from '~/client/util/apiv3-client';
 import { apiv3Put } from '~/client/util/apiv3-client';
 import { toastSuccess, toastError } from '~/client/util/toastr';
 import { toastSuccess, toastError } from '~/client/util/toastr';
+import { LoadingSpinnerPulse } from '~/components/LoadingSpinnerPulse';
 import { useSWRxAppSettings } from '~/stores/admin/app-settings';
 import { useSWRxAppSettings } from '~/stores/admin/app-settings';
 
 
 import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';
 import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';
@@ -65,7 +66,7 @@ const QuestionnaireSettings = (): JSX.Element => {
 
 
       {isLoading && (
       {isLoading && (
         <div className="text-muted text-center mb-5">
         <div className="text-muted text-center mb-5">
-          <i className="fa fa-2x fa-spinner fa-pulse me-1" />
+          <span className="me-1"><LoadingSpinnerPulse /></span>
         </div>
         </div>
       )}
       )}
 
 

+ 2 - 1
apps/app/src/components/Admin/AuditLogManagement.tsx

@@ -11,6 +11,7 @@ import { SupportedActionType } from '~/interfaces/activity';
 import { useSWRxActivity } from '~/stores/activity';
 import { useSWRxActivity } from '~/stores/activity';
 import { useAuditLogEnabled, useAuditLogAvailableActions } from '~/stores/context';
 import { useAuditLogEnabled, useAuditLogAvailableActions } from '~/stores/context';
 
 
+import { LoadingSpinnerPulse } from '../LoadingSpinnerPulse';
 import PaginationWrapper from '../PaginationWrapper';
 import PaginationWrapper from '../PaginationWrapper';
 
 
 import { ActivityTable } from './AuditLog/ActivityTable';
 import { ActivityTable } from './AuditLog/ActivityTable';
@@ -213,7 +214,7 @@ export const AuditLogManagement: FC = () => {
           { isLoading
           { isLoading
             ? (
             ? (
               <div className="text-muted text-center mb-5">
               <div className="text-muted text-center mb-5">
-                <i className="fa fa-2x fa-spinner fa-pulse me-1" />
+                <span className="me-1"><LoadingSpinnerPulse /></span>
               </div>
               </div>
             )
             )
             : (
             : (

+ 2 - 1
apps/app/src/components/Admin/Customize/CustomizeLayoutSetting.tsx

@@ -5,6 +5,7 @@ import React, {
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
 
 
 import { toastSuccess, toastError } from '~/client/util/toastr';
 import { toastSuccess, toastError } from '~/client/util/toastr';
+import { LoadingSpinnerPulse } from '~/components/LoadingSpinnerPulse';
 import { useSWRxLayoutSetting } from '~/stores/admin/customize';
 import { useSWRxLayoutSetting } from '~/stores/admin/customize';
 import { useNextThemes } from '~/stores/use-next-themes';
 import { useNextThemes } from '~/stores/use-next-themes';
 
 
@@ -45,7 +46,7 @@ const CustomizeLayoutSetting = (): JSX.Element => {
   if (isContainerFluid == null) {
   if (isContainerFluid == null) {
     return (
     return (
       <div className="text-muted text-center">
       <div className="text-muted text-center">
-        <i className="fa fa-2x fa-spinner fa-pulse"></i>
+        <LoadingSpinnerPulse />
       </div>
       </div>
     );
     );
   }
   }

+ 3 - 1
apps/app/src/components/Admin/ElasticsearchManagement/ReconnectControls.tsx

@@ -2,6 +2,8 @@ import React from 'react';
 
 
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
 
 
+import { LoadingSpinnerPulse } from '~/components/LoadingSpinnerPulse';
+
 type Props = {
 type Props = {
   isEnabled?: boolean,
   isEnabled?: boolean,
   isProcessing?: boolean,
   isProcessing?: boolean,
@@ -21,7 +23,7 @@ const ReconnectControls = (props: Props): JSX.Element => {
         onClick={() => { props.onReconnectingRequested() }}
         onClick={() => { props.onReconnectingRequested() }}
         disabled={!isEnabled}
         disabled={!isEnabled}
       >
       >
-        { isProcessing && <i className="fa fa-spinner fa-pulse me-2"></i> }
+        { isProcessing && <span className="me-2"><LoadingSpinnerPulse /></span> }
         { t('full_text_search_management.reconnect_button') }
         { t('full_text_search_management.reconnect_button') }
       </button>
       </button>
 
 

+ 2 - 1
apps/app/src/components/Admin/Users/PasswordResetModal.jsx

@@ -10,6 +10,7 @@ import {
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
 import AdminUsersContainer from '~/client/services/AdminUsersContainer';
 import { apiv3Put } from '~/client/util/apiv3-client';
 import { apiv3Put } from '~/client/util/apiv3-client';
 import { toastError } from '~/client/util/toastr';
 import { toastError } from '~/client/util/toastr';
+import { LoadingSpinnerPulse } from '~/components/LoadingSpinnerPulse';
 import { useIsMailerSetup } from '~/stores/context';
 import { useIsMailerSetup } from '~/stores/context';
 
 
 class PasswordResetModal extends React.Component {
 class PasswordResetModal extends React.Component {
@@ -53,7 +54,7 @@ class PasswordResetModal extends React.Component {
           onClick={this.onClickSendNewPasswordButton}
           onClick={this.onClickSendNewPasswordButton}
           disabled={!isMailerSetup || isEmailSending || isEmailSent}
           disabled={!isMailerSetup || isEmailSending || isEmailSent}
         >
         >
-          {isEmailSending && <i className="fa fa-spinner fa-pulse mx-2" />}
+          {isEmailSending && <span className="mx-2"><LoadingSpinnerPulse /></span>}
           {!isEmailSending && (isEmailSent ? t('commons:Done') : t('commons:Send'))}
           {!isEmailSending && (isEmailSent ? t('commons:Done') : t('commons:Send'))}
         </button>
         </button>
         <button type="submit" className="btn btn-danger" onClick={this.props.onClose}>
         <button type="submit" className="btn btn-danger" onClick={this.props.onClose}>

+ 2 - 1
apps/app/src/components/Common/Dropdown/PageItemControl.tsx

@@ -10,6 +10,7 @@ import {
   Dropdown, DropdownMenu, DropdownToggle, DropdownItem,
   Dropdown, DropdownMenu, DropdownToggle, DropdownItem,
 } from 'reactstrap';
 } from 'reactstrap';
 
 
+import { LoadingSpinnerPulse } from '~/components/LoadingSpinnerPulse';
 import { NotAvailableForGuest } from '~/components/NotAvailableForGuest';
 import { NotAvailableForGuest } from '~/components/NotAvailableForGuest';
 import type { IPageOperationProcessData } from '~/interfaces/page-operation';
 import type { IPageOperationProcessData } from '~/interfaces/page-operation';
 import { useSWRxPageInfo } from '~/stores/page';
 import { useSWRxPageInfo } from '~/stores/page';
@@ -133,7 +134,7 @@ const PageItemControlDropdownMenu = React.memo((props: DropdownMenuProps): JSX.E
   if (isLoading) {
   if (isLoading) {
     contents = (
     contents = (
       <div className="text-muted text-center my-2">
       <div className="text-muted text-center my-2">
-        <i className="fa fa-spinner fa-pulse"></i>
+        <LoadingSpinnerPulse />
       </div>
       </div>
     );
     );
   }
   }

+ 4 - 4
apps/app/src/components/InAppNotification/InAppNotificationPage.tsx

@@ -1,6 +1,5 @@
-import React, {
-  FC, useState, useEffect, useCallback,
-} from 'react';
+import type { FC } from 'react';
+import React, { useState, useEffect, useCallback } from 'react';
 
 
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
 
 
@@ -11,6 +10,7 @@ import loggerFactory from '~/utils/logger';
 
 
 import { useSWRxInAppNotifications, useSWRxInAppNotificationStatus } from '../../stores/in-app-notification';
 import { useSWRxInAppNotifications, useSWRxInAppNotificationStatus } from '../../stores/in-app-notification';
 import CustomNavAndContents from '../CustomNavigation/CustomNavAndContents';
 import CustomNavAndContents from '../CustomNavigation/CustomNavAndContents';
+import { LoadingSpinnerPulse } from '../LoadingSpinnerPulse';
 import PaginationWrapper from '../PaginationWrapper';
 import PaginationWrapper from '../PaginationWrapper';
 
 
 import InAppNotificationList from './InAppNotificationList';
 import InAppNotificationList from './InAppNotificationList';
@@ -66,7 +66,7 @@ export const InAppNotificationPage: FC = () => {
       return (
       return (
         <div className="wiki" data-testid="grw-in-app-notification-page-spinner">
         <div className="wiki" data-testid="grw-in-app-notification-page-spinner">
           <div className="text-muted text-center">
           <div className="text-muted text-center">
-            <i className="fa fa-2x fa-spinner fa-pulse me-1"></i>
+            <span className="me-1"><LoadingSpinnerPulse /></span>
           </div>
           </div>
         </div>
         </div>
       );
       );

+ 2 - 3
apps/app/src/components/LoginForm.tsx

@@ -14,7 +14,7 @@ import { RegistrationMode } from '~/interfaces/registration-mode';
 import { toArrayIfNot } from '~/utils/array-utils';
 import { toArrayIfNot } from '~/utils/array-utils';
 
 
 import { CompleteUserRegistration } from './CompleteUserRegistration';
 import { CompleteUserRegistration } from './CompleteUserRegistration';
-
+import { LoadingSpinnerPulse } from './LoadingSpinnerPulse';
 
 
 import styles from './LoginForm.module.scss';
 import styles from './LoginForm.module.scss';
 
 
@@ -181,8 +181,7 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
         {/* !! - DO NOT DELETE HIDDEN ELEMENT - !! -- 7.12 ryoji-s */}
         {/* !! - DO NOT DELETE HIDDEN ELEMENT - !! -- 7.12 ryoji-s */}
         {/* Import font-awesome to prevent MongoStore.js "Unable to find the session to touch" error */}
         {/* Import font-awesome to prevent MongoStore.js "Unable to find the session to touch" error */}
         <div className="visually-hidden">
         <div className="visually-hidden">
-          {/* Unsettled 11.17 meiri-k */}
-          <i className="fa fa-spinner fa-pulse" />
+          <LoadingSpinnerPulse />
         </div>
         </div>
         {/* !! - END OF HIDDEN ELEMENT - !! */}
         {/* !! - END OF HIDDEN ELEMENT - !! */}
         {isLdapSetupFailed && (
         {isLdapSetupFailed && (

+ 3 - 1
apps/app/src/components/Me/QuestionnaireSettings.tsx

@@ -8,6 +8,8 @@ import { toastError, toastSuccess } from '~/client/util/toastr';
 import { useSWRxIsQuestionnaireEnabled } from '~/features/questionnaire/client/stores/questionnaire';
 import { useSWRxIsQuestionnaireEnabled } from '~/features/questionnaire/client/stores/questionnaire';
 import { useCurrentUser } from '~/stores/context';
 import { useCurrentUser } from '~/stores/context';
 
 
+import { LoadingSpinnerPulse } from '../LoadingSpinnerPulse';
+
 
 
 export const QuestionnaireSettings = (): JSX.Element => {
 export const QuestionnaireSettings = (): JSX.Element => {
   const { t } = useTranslation();
   const { t } = useTranslation();
@@ -45,7 +47,7 @@ export const QuestionnaireSettings = (): JSX.Element => {
 
 
       {isLoadingCurrentUser && (
       {isLoadingCurrentUser && (
         <div className="text-muted text-center mb-5">
         <div className="text-muted text-center mb-5">
-          <i className="fa fa-2x fa-spinner fa-pulse me-1" />
+          <span className="me-1"><LoadingSpinnerPulse /></span>
         </div>
         </div>
       )}
       )}
 
 

+ 4 - 4
apps/app/src/components/PageControls/BookmarkButtons.tsx

@@ -1,6 +1,5 @@
-import React, {
-  FC, useState, useCallback,
-} from 'react';
+import type { FC } from 'react';
+import React, { useState, useCallback } from 'react';
 
 
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
 import DropdownToggle from 'reactstrap/esm/DropdownToggle';
 import DropdownToggle from 'reactstrap/esm/DropdownToggle';
@@ -13,6 +12,7 @@ import { useIsGuestUser } from '~/stores/context';
 
 
 import { BookmarkFolderMenu } from '../Bookmarks/BookmarkFolderMenu';
 import { BookmarkFolderMenu } from '../Bookmarks/BookmarkFolderMenu';
 import UserPictureList from '../Common/UserPictureList';
 import UserPictureList from '../Common/UserPictureList';
+import { LoadingSpinnerPulse } from '../LoadingSpinnerPulse';
 
 
 import styles from './BookmarkButtons.module.scss';
 import styles from './BookmarkButtons.module.scss';
 import popoverStyles from './user-list-popover.module.scss';
 import popoverStyles from './user-list-popover.module.scss';
@@ -95,7 +95,7 @@ export const BookmarkButtons: FC<Props> = (props: Props) => {
       </button>
       </button>
       <Popover placement="bottom" isOpen={isBookmarkUsersPopoverOpen} target="po-total-bookmarks" toggle={toggleBookmarkUsersPopover} trigger="legacy">
       <Popover placement="bottom" isOpen={isBookmarkUsersPopoverOpen} target="po-total-bookmarks" toggle={toggleBookmarkUsersPopover} trigger="legacy">
         <PopoverBody className={`user-list-popover ${popoverStyles['user-list-popover']}`}>
         <PopoverBody className={`user-list-popover ${popoverStyles['user-list-popover']}`}>
-          { isLoadingBookmarkedUsers && <i className="fa fa-spinner fa-pulse"></i> }
+          { isLoadingBookmarkedUsers && <LoadingSpinnerPulse /> }
           { !isLoadingBookmarkedUsers && bookmarkedUsers != null && (
           { !isLoadingBookmarkedUsers && bookmarkedUsers != null && (
             <>
             <>
               { bookmarkedUsers.length > 0
               { bookmarkedUsers.length > 0

+ 3 - 1
apps/app/src/components/PageEditor/DrawioModal.tsx

@@ -18,6 +18,8 @@ import { useDrawioModal } from '~/stores/modal';
 import { usePersonalSettings } from '~/stores/personal-settings';
 import { usePersonalSettings } from '~/stores/personal-settings';
 import loggerFactory from '~/utils/logger';
 import loggerFactory from '~/utils/logger';
 
 
+import { LoadingSpinnerPulse } from '../LoadingSpinnerPulse';
+
 import { type DrawioConfig, DrawioCommunicationHelper } from './DrawioCommunicationHelper';
 import { type DrawioConfig, DrawioCommunicationHelper } from './DrawioCommunicationHelper';
 
 
 const logger = loggerFactory('growi:components:DrawioModal');
 const logger = loggerFactory('growi:components:DrawioModal');
@@ -133,7 +135,7 @@ export const DrawioModal = (): JSX.Element => {
         {/* Loading spinner */}
         {/* Loading spinner */}
         <div className="w-100 h-100 position-absolute d-flex">
         <div className="w-100 h-100 position-absolute d-flex">
           <div className="mx-auto my-auto">
           <div className="mx-auto my-auto">
-            <i className="fa fa-3x fa-spinner fa-pulse mx-auto text-muted"></i>
+            <span className="mx-auto text-muted"><LoadingSpinnerPulse /></span>
           </div>
           </div>
         </div>
         </div>
         {/* iframe */}
         {/* iframe */}

+ 3 - 1
apps/app/src/components/PagePresentationModal.tsx

@@ -15,13 +15,15 @@ import { usePresentationViewOptions } from '~/stores/renderer';
 import { useNextThemes } from '~/stores/use-next-themes';
 import { useNextThemes } from '~/stores/use-next-themes';
 
 
 
 
+import { LoadingSpinnerPulse } from './LoadingSpinnerPulse';
+
 import styles from './PagePresentationModal.module.scss';
 import styles from './PagePresentationModal.module.scss';
 
 
 
 
 const Presentation = dynamic<PresentationProps>(() => import('./Presentation/Presentation').then(mod => mod.Presentation), {
 const Presentation = dynamic<PresentationProps>(() => import('./Presentation/Presentation').then(mod => mod.Presentation), {
   ssr: false,
   ssr: false,
   loading: () => (
   loading: () => (
-    <i className="fa fa-4x fa-spinner fa-pulse text-muted"></i>
+    <span className="text-muted"><LoadingSpinnerPulse /></span>
   ),
   ),
 });
 });
 
 

+ 2 - 1
apps/app/src/components/SavePageControls/GrantSelector/GrantSelector.tsx

@@ -11,6 +11,7 @@ import {
   Modal, ModalHeader, ModalBody,
   Modal, ModalHeader, ModalBody,
 } from 'reactstrap';
 } from 'reactstrap';
 
 
+import { LoadingSpinnerPulse } from '~/components/LoadingSpinnerPulse';
 import type { IPageGrantData } from '~/interfaces/page';
 import type { IPageGrantData } from '~/interfaces/page';
 import { useCurrentUser } from '~/stores/context';
 import { useCurrentUser } from '~/stores/context';
 
 
@@ -182,7 +183,7 @@ export const GrantSelector = (props: Props): JSX.Element => {
     if (myUserGroups == null) {
     if (myUserGroups == null) {
       return (
       return (
         <div className="my-3 text-center">
         <div className="my-3 text-center">
-          <i className="fa fa-lg fa-spinner fa-pulse mx-auto text-muted"></i>
+          <span className="mx-auto text-muted"><LoadingSpinnerPulse /></span>
         </div>
         </div>
       );
       );
     }
     }

+ 2 - 1
apps/app/src/components/TreeItem/SimpleItem.tsx

@@ -15,6 +15,7 @@ import { usePageTreeDescCountMap } from '~/stores/ui';
 import { shouldRecoverPagePaths } from '~/utils/page-operation';
 import { shouldRecoverPagePaths } from '~/utils/page-operation';
 
 
 import CountBadge from '../Common/CountBadge';
 import CountBadge from '../Common/CountBadge';
+import { LoadingSpinnerPulse } from '../LoadingSpinnerPulse';
 
 
 import { ItemNode } from './ItemNode';
 import { ItemNode } from './ItemNode';
 import { useNewPageInput } from './NewPageInput';
 import { useNewPageInput } from './NewPageInput';
@@ -245,7 +246,7 @@ export const SimpleItem: FC<SimpleItemProps> = (props) => {
               <ItemClassFixed {...itemProps} />
               <ItemClassFixed {...itemProps} />
               {isProcessingSubmission && (currentChildren.length - 1 === index) && (
               {isProcessingSubmission && (currentChildren.length - 1 === index) && (
                 <div className="text-muted text-center">
                 <div className="text-muted text-center">
-                  <i className="fa fa-spinner fa-pulse mr-1"></i>
+                  <span className="mr-1"><LoadingSpinnerPulse /></span>
                 </div>
                 </div>
               )}
               )}
             </div>
             </div>

+ 2 - 1
apps/app/src/pages/tags.page.tsx

@@ -8,6 +8,7 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
 import dynamic from 'next/dynamic';
 import dynamic from 'next/dynamic';
 import Head from 'next/head';
 import Head from 'next/head';
 
 
+import { LoadingSpinnerPulse } from '~/components/LoadingSpinnerPulse';
 import type { 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 type { IDataTagCount } from '~/interfaces/tag';
 import type { IDataTagCount } from '~/interfaces/tag';
@@ -90,7 +91,7 @@ const TagPage: NextPageWithLayout<CommonProps> = (props: Props) => {
           { isLoading
           { isLoading
             ? (
             ? (
               <div className="text-muted text-center">
               <div className="text-muted text-center">
-                <i className="fa fa-2x fa-spinner fa-pulse mt-3"></i>
+                <span className="mt-3"><LoadingSpinnerPulse /></span>
               </div>
               </div>
             )
             )
             : (
             : (