Steven Fukase 4 лет назад
Родитель
Сommit
a124f238c5

+ 3 - 3
resource/locales/en_US/admin/admin.json

@@ -290,7 +290,7 @@
       "generate": "Generate"
     },
     "delete": "Delete",
-    "integration_procedure": "Integration procedure",
+    "integration_procedure": "Integration Procedure",
     "official_bot_settings": "Official bot Settings",
     "custom_bot_without_proxy_settings": "Custom Bot without proxy Settings",
     "reset": "Reset",
@@ -325,12 +325,12 @@
       "send_message_to_slack_work_space": "Send message to Slack work space.",
       "add_slack_workspace": "Add a Slack Workspace"
     },
-    "custom_bot_without_proxy_integration": "Custom bot without proxy integration",
+    "custom_bot_without_proxy_integration": "Custom Bot Without Proxy Integration",
     "integration_sentence": {
       "integration_is_not_complete": "Integration is not complete.<br>Proceed with the following integration procedure.",
       "integration_successful": "Integration successful"
     },
-    "custom_bot_with_proxy_integration": "Custom bot with proxy integration",
+    "custom_bot_with_proxy_integration": "Custom Bot With Proxy Integration",
     "official_bot_integration": "Official bot integration"
   },
   "user_management": {

+ 5 - 5
src/client/js/components/Admin/SlackIntegration/CustomBotWithProxySettings.jsx

@@ -151,11 +151,11 @@ const CustomBotWithProxySettings = (props) => {
             </div>
             <WithProxyAccordions
               botType="customBotWithProxy"
-              discardTokenHandler={discardTokenHandler}
-              generateTokenHandler={generateTokenHandler}
-              // TODO: Multiple accordion logic
-              tokenPtoG={tokenPtoG}
-              tokenGtoP={tokenGtoP}
+              // discardTokenHandler={discardTokenHandler}
+              // generateTokenHandler={generateTokenHandler}
+              // // TODO: Multiple accordion logic
+              // tokenPtoG={tokenPtoG}
+              // tokenGtoP={tokenGtoP}
             />
           </>
         ))}

+ 33 - 32
src/client/js/components/Admin/SlackIntegration/WithProxyAccordions.jsx

@@ -8,7 +8,7 @@ import AppContainer from '../../../services/AppContainer';
 import Accordion from '../Common/Accordion';
 
 
-export const BotCreateProcess = () => {
+const BotCreateProcess = () => {
   const { t } = useTranslation();
   return (
     <div className="my-5 d-flex flex-column align-items-center">
@@ -29,7 +29,7 @@ export const BotCreateProcess = () => {
   );
 };
 
-export const BotInstallProcess = () => {
+const BotInstallProcess = () => {
   const { t } = useTranslation();
   return (
     <div className="my-5 d-flex flex-column align-items-center">
@@ -51,7 +51,7 @@ export const BotInstallProcess = () => {
   );
 };
 
-export const RegisteringProxyUrlProcess = () => {
+const RegisteringProxyUrlProcess = () => {
   const { t } = useTranslation();
   return (
     <div className="p-4 d-flex flex-column align-items-center">
@@ -69,7 +69,7 @@ export const RegisteringProxyUrlProcess = () => {
   );
 };
 
-export const GeneratingTokensAndRegisteringProxyServiceProcess = withUnstatedContainers((props) => {
+const GeneratingTokensAndRegisteringProxyServiceProcess = withUnstatedContainers((props) => {
   const { t } = useTranslation();
   const growiUrl = props.appContainer.config.crowi.url;
 
@@ -178,7 +178,7 @@ GeneratingTokensAndRegisteringProxyServiceProcess.propTypes = {
 };
 
 
-export const TestProcess = () => {
+const TestProcess = () => {
   const { t } = useTranslation();
   const [testChannel, setTestChannel] = useState('');
   /* eslint-disable no-unused-vars */
@@ -287,35 +287,35 @@ const CustomBotIntegrationProcedure = (props) => {
   });
 };
 
-const officialBotIntegrationProcedure = (props) => {
-  return ({
-    '①': {
-      title: 'install_bot_to_slack',
-      content: <BotInstallProcess />,
-    },
-    '②': {
-      title: 'register_for_growi_official_bot_proxy_service',
-      content: <GeneratingTokensAndRegisteringProxyServiceProcess
-        discardTokenHandler={props.discardTokenHandler}
-        generateTokenHandler={props.generateTokenHandler}
-        // TODO: Multiple accordion logic
-        tokenPtoG={props.tokenPtoG}
-        tokenGtoP={props.tokenGtoP}
-      />,
-    },
-    '③': {
-      title: 'set_proxy_url_on_growi',
-      content: <RegisteringProxyUrlProcess />,
-    },
-    '④': {
-      title: 'test_connection',
-      content: <TestProcess />,
-    },
-  });
-};
+// const officialBotIntegrationProcedure = (props) => {
+//   return ({
+//     '①': {
+//       title: 'install_bot_to_slack',
+//       content: <BotInstallProcess />,
+//     },
+//     '②': {
+//       title: 'register_for_growi_official_bot_proxy_service',
+//       content: <GeneratingTokensAndRegisteringProxyServiceProcess
+//         discardTokenHandler={props.discardTokenHandler}
+//         generateTokenHandler={props.generateTokenHandler}
+//         // TODO: Multiple accordion logic
+//         tokenPtoG={props.tokenPtoG}
+//         tokenGtoP={props.tokenGtoP}
+//       />,
+//     },
+//     '③': {
+//       title: 'set_proxy_url_on_growi',
+//       content: <RegisteringProxyUrlProcess />,
+//     },
+//     '④': {
+//       title: 'test_connection',
+//       content: <TestProcess />,
+//     },
+//   });
+// };
 
 
-const WithProxyAccordions = (props) => {
+export WithProxyAccordions = (props) => {
   const { t } = useTranslation();
   const integrationProcedureMapping = props.botType === 'officialBot' ? officialBotIntegrationProcedure : CustomBotIntegrationProcedure;
 
@@ -324,6 +324,7 @@ const WithProxyAccordions = (props) => {
       className="card border-0 rounded-lg shadow overflow-hidden"
     >
       {Object.entries(integrationProcedureMapping).map(([key, value]) => {
+        console.log(value) 
         return (
           <Accordion
             title={<><span className="mr-2">{key}</span>{t(`admin:slack_integration.accordion.${value.title}`)}</>}