SULLEY\ryo-h 4 лет назад
Родитель
Сommit
8a6b9f1529

+ 6 - 6
packages/app/src/components/SearchPage.jsx

@@ -44,8 +44,8 @@ class SearchPage extends React.Component {
     this.searchHandler = this.searchHandler.bind(this);
     this.selectPage = this.selectPage.bind(this);
     this.toggleCheckBox = this.toggleCheckBox.bind(this);
-    this.switchExcludingUserPagesHandler = this.switchExcludingUserPagesHandler.bind(this);
-    this.switchExcludingTrashPagesHandler = this.switchExcludingTrashPagesHandler.bind(this);
+    this.switchExcludeUserPagesHandler = this.switchExcludeUserPagesHandler.bind(this);
+    this.switchExcludeTrashPagesHandler = this.switchExcludeTrashPagesHandler.bind(this);
     this.onPagingNumberChanged = this.onPagingNumberChanged.bind(this);
   }
 
@@ -68,11 +68,11 @@ class SearchPage extends React.Component {
     return query;
   }
 
-  switchExcludingUserPagesHandler() {
+  switchExcludeUserPagesHandler() {
     this.setState({ excludeUserPages: !this.state.excludeUserPages });
   }
 
-  switchExcludingTrashPagesHandler() {
+  switchExcludeTrashPagesHandler() {
     this.setState({ excludeTrashPages: !this.state.excludeTrashPages });
   }
 
@@ -224,8 +224,8 @@ class SearchPage extends React.Component {
         searchingKeyword={this.state.searchingKeyword}
         appContainer={this.props.appContainer}
         onSearchInvoked={this.searchHandler}
-        onSwitchExcludingUserPagesInvoked={this.switchExcludingUserPagesHandler}
-        onSwitchExcludingTrashPagesInvoked={this.switchExcludingTrashPagesHandler}
+        onExcludeUserPagesSwitch={this.switchExcludeUserPagesHandler}
+        onExcludeTrashPagesSwitch={this.switchExcludeTrashPagesHandler}
       >
       </SearchControl>
     );

+ 12 - 12
packages/app/src/components/SearchPage/SearchControl.tsx

@@ -10,8 +10,8 @@ type Props = {
   searchingKeyword: string,
   appContainer: AppContainer,
   onSearchInvoked: (data : any[]) => boolean,
-  onSwitchExcludingUserPagesInvoked?: () => void,
-  onSwitchExcludingTrashPagesInvoked?: () => void,
+  onExcludeUserPagesSwitch?: () => void,
+  onExcludeTrashPagesSwitch?: () => void,
 }
 
 const SearchControl: FC <Props> = (props: Props) => {
@@ -22,15 +22,15 @@ const SearchControl: FC <Props> = (props: Props) => {
   const SearchPageFormTypeAny : any = SearchPageForm;
   const { t } = useTranslation('');
 
-  const switchExcludingUserPagesHandler = () => {
-    if (props.onSwitchExcludingUserPagesInvoked != null) {
-      props.onSwitchExcludingUserPagesInvoked();
+  const switchExcludeUserPagesHandler = () => {
+    if (props.onExcludeUserPagesSwitch != null) {
+      props.onExcludeUserPagesSwitch();
     }
   };
 
-  const switchExcludingTrashPagesHandler = () => {
-    if (props.onSwitchExcludingTrashPagesInvoked != null) {
-      props.onSwitchExcludingTrashPagesInvoked();
+  const switchExcludeTrashPagesHandler = () => {
+    if (props.onExcludeTrashPagesSwitch != null) {
+      props.onExcludeTrashPagesSwitch();
     }
   };
 
@@ -62,8 +62,8 @@ const SearchControl: FC <Props> = (props: Props) => {
       <SearchOptionModal
         isOpen={isFileterOptionModalShown || false}
         onClose={closeSearchOptionModalHandler}
-        onSwitchExcludingUserPagesInvoked={switchExcludingUserPagesHandler}
-        onSwitchExcludingTrashPagesInvoked={switchExcludingTrashPagesHandler}
+        onExcludeUserPagesSwitch={switchExcludeUserPagesHandler}
+        onExcludeTrashPagesSwitch={switchExcludeTrashPagesHandler}
       />
     );
   };
@@ -110,7 +110,7 @@ const SearchControl: FC <Props> = (props: Props) => {
                 className="mr-2"
                 type="checkbox"
                 id="flexCheckDefault"
-                onClick={switchExcludingUserPagesHandler}
+                onClick={switchExcludeUserPagesHandler}
               />
               {t('Include Subordinated Target Page', { target: '/user' })}
             </label>
@@ -121,7 +121,7 @@ const SearchControl: FC <Props> = (props: Props) => {
                 className="mr-2"
                 type="checkbox"
                 id="flexCheckChecked"
-                onClick={switchExcludingTrashPagesHandler}
+                onClick={switchExcludeTrashPagesHandler}
               />
               {t('Include Subordinated Target Page', { target: '/trash' })}
             </label>

+ 4 - 4
packages/app/src/components/SearchPage/SearchOptionModal.tsx

@@ -9,8 +9,8 @@ import {
 type Props = {
   isOpen: boolean,
   onClose?: () => void,
-  onSwitchExcludingUserPagesInvoked?: () => void,
-  onSwitchExcludingTrashPagesInvoked?: () => void,
+  onExcludeUserPagesSwitch?: () => void,
+  onExcludeTrashPagesSwitch?: () => void,
   // todo: implement this method
   // refs: https://redmine.weseek.co.jp/issues/81845
   onClickFilteringSearchResultButton?: () => void,
@@ -42,7 +42,7 @@ const SearchOptionModal: FC<Props> = (props: Props) => {
               <input
                 className="mr-2"
                 type="checkbox"
-                onClick={props.onSwitchExcludingUserPagesInvoked}
+                onClick={props.onExcludeUserPagesSwitch}
               />
               {t('Include Subordinated Target Page', { target: '/user' })}
             </label>
@@ -54,7 +54,7 @@ const SearchOptionModal: FC<Props> = (props: Props) => {
               <input
                 className="mr-2"
                 type="checkbox"
-                onClick={props.onSwitchExcludingTrashPagesInvoked}
+                onClick={props.onExcludeTrashPagesSwitch}
               />
               {t('Include Subordinated Target Page', { target: '/trash' })}
             </label>