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

79625 undo diffs made to names of methods nad state vars

Yohei-Shiina 4 лет назад
Родитель
Сommit
e66fa294dc

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

@@ -33,15 +33,15 @@ class SearchPage extends React.Component {
       selectedPage: {},
       selectedPage: {},
       selectedPages: new Set(),
       selectedPages: new Set(),
       excludeUsersHome: true,
       excludeUsersHome: true,
-      exxcludeTrash: true,
+      excludeTrash: true,
     };
     };
 
 
     this.changeURL = this.changeURL.bind(this);
     this.changeURL = this.changeURL.bind(this);
     this.search = this.search.bind(this);
     this.search = this.search.bind(this);
     this.selectPage = this.selectPage.bind(this);
     this.selectPage = this.selectPage.bind(this);
     this.toggleCheckBox = this.toggleCheckBox.bind(this);
     this.toggleCheckBox = this.toggleCheckBox.bind(this);
-    this.onIncludeUsersHome = this.onIncludeUsersHome.bind(this);
-    this.onIncludeTrash = this.onIncludeTrash.bind(this);
+    this.onExcludeUsersHome = this.onExcludeUsersHome.bind(this);
+    this.onExcludeTrash = this.onExcludeTrash.bind(this);
   }
   }
 
 
   componentDidMount() {
   componentDidMount() {
@@ -63,11 +63,11 @@ class SearchPage extends React.Component {
     return query;
     return query;
   }
   }
 
 
-  onIncludeUsersHome() {
+  onExcludeUsersHome() {
     this.setState({ excludeUsersHome: !this.state.excludeUsersHome });
     this.setState({ excludeUsersHome: !this.state.excludeUsersHome });
   }
   }
 
 
-  onIncludeTrash() {
+  onExcludeTrash() {
     this.setState({ exxcludeTrash: !this.state.exxcludeTrash });
     this.setState({ exxcludeTrash: !this.state.exxcludeTrash });
   }
   }
 
 
@@ -86,7 +86,7 @@ class SearchPage extends React.Component {
     let query = keyword;
     let query = keyword;
 
 
     // pages included in specific path are not retrived when prefix is added
     // pages included in specific path are not retrived when prefix is added
-    if (this.state.exxcludeTrash) {
+    if (this.state.excludeTrash) {
       query = `${query} -prefix:${specificPathNames.trash}`;
       query = `${query} -prefix:${specificPathNames.trash}`;
     }
     }
     if (this.state.excludeUsersHome) {
     if (this.state.excludeUsersHome) {
@@ -190,8 +190,8 @@ class SearchPage extends React.Component {
         searchingKeyword={this.state.searchingKeyword}
         searchingKeyword={this.state.searchingKeyword}
         appContainer={this.props.appContainer}
         appContainer={this.props.appContainer}
         onSearchInvoked={this.search}
         onSearchInvoked={this.search}
-        onIncludeUsersHome={this.onIncludeUsersHome}
-        onIncludeTrash={this.onIncludeTrash}
+        onExcludeUsersHome={this.onExcludeUsersHome}
+        onExcludeTrash={this.onExcludeTrash}
       >
       >
       </SearchControl>
       </SearchControl>
     );
     );

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

@@ -7,8 +7,8 @@ type Props = {
   searchingKeyword: string,
   searchingKeyword: string,
   appContainer: AppContainer,
   appContainer: AppContainer,
   onSearchInvoked: (data : any[]) => boolean,
   onSearchInvoked: (data : any[]) => boolean,
-  onIncludeUsersHome?: () => void,
-  onIncludeTrash?: () => void,
+  onExcludeUsersHome?: () => void,
+  onExcludeTrash?: () => void,
 }
 }
 
 
 const SearchControl: FC <Props> = (props: Props) => {
 const SearchControl: FC <Props> = (props: Props) => {
@@ -17,15 +17,15 @@ const SearchControl: FC <Props> = (props: Props) => {
   const SearchPageFormTypeAny : any = SearchPageForm;
   const SearchPageFormTypeAny : any = SearchPageForm;
   const { t } = useTranslation('');
   const { t } = useTranslation('');
 
 
-  const onIncludeUsersHome = () => {
-    if (props.onIncludeUsersHome != null) {
-      props.onIncludeUsersHome();
+  const onExcludeUsersHome = () => {
+    if (props.onExcludeUsersHome != null) {
+      props.onExcludeUsersHome();
     }
     }
   };
   };
 
 
-  const onIncludeTrash = () => {
-    if (props.onIncludeTrash != null) {
-      props.onIncludeTrash();
+  const onExcludeTrash = () => {
+    if (props.onExcludeTrash != null) {
+      props.onExcludeTrash();
     }
     }
   };
   };
 
 
@@ -47,7 +47,7 @@ const SearchControl: FC <Props> = (props: Props) => {
           <input
           <input
             type="checkbox"
             type="checkbox"
             id="flexCheckDefault"
             id="flexCheckDefault"
-            onClick={() => onIncludeUsersHome()}
+            onClick={() => onExcludeUsersHome()}
           />
           />
         </div>
         </div>
         <div className="d-flex align-items-center border rounded border-gray px-2 mr-3">
         <div className="d-flex align-items-center border rounded border-gray px-2 mr-3">
@@ -57,7 +57,7 @@ const SearchControl: FC <Props> = (props: Props) => {
           <input
           <input
             type="checkbox"
             type="checkbox"
             id="flexCheckChecked"
             id="flexCheckChecked"
-            onClick={() => onIncludeTrash()}
+            onClick={() => onExcludeTrash()}
           />
           />
         </div>
         </div>
       </div>
       </div>