Yuki Takei пре 7 година
родитељ
комит
f593c2e973

+ 2 - 2
packages/growi-plugin-lsx/src/resource/js/components/Lsx.jsx

@@ -8,7 +8,7 @@ import styles from '../../css/index.css';
 import { LsxContext } from '../util/LsxContext';
 import { LsxCacheHelper } from '../util/LsxCacheHelper';
 import { PageNode } from './PageNode';
-import { ListView } from './PageList/ListView';
+import { LsxListView } from './LsxPageList/LsxListView';
 
 
 export class Lsx extends React.Component {
@@ -202,7 +202,7 @@ export class Lsx extends React.Component {
     }
     // render tree
     else {
-      return <ListView nodeTree={this.state.nodeTree} lsxContext={this.props.lsxContext} />;
+      return <LsxListView nodeTree={this.state.nodeTree} lsxContext={this.props.lsxContext} />;
     }
   }
 

+ 4 - 5
packages/growi-plugin-lsx/src/resource/js/components/PageList/ListView.js → packages/growi-plugin-lsx/src/resource/js/components/LsxPageList/LsxListView.jsx

@@ -1,17 +1,16 @@
 import React from 'react';
 import PropTypes from 'prop-types';
 
-import { Page } from './Page';
 import { PageNode } from '../PageNode';
-
 import { LsxContext } from '../../util/LsxContext';
+import { LsxPage } from './LsxPage';
 
-export class ListView extends React.Component {
+export class LsxListView extends React.Component {
 
   render() {
     const listView = this.props.nodeTree.map((pageNode) => {
       return (
-        <Page key={pageNode.pagePath} depth={1}
+        <LsxPage key={pageNode.pagePath} depth={1}
           pageNode={pageNode}
           lsxContext={this.props.lsxContext}
         />
@@ -38,7 +37,7 @@ export class ListView extends React.Component {
   }
 }
 
-ListView.propTypes = {
+LsxListView.propTypes = {
   nodeTree: PropTypes.arrayOf(PropTypes.instanceOf(PageNode)).isRequired,
   lsxContext: PropTypes.instanceOf(LsxContext).isRequired,
 };

+ 8 - 7
packages/growi-plugin-lsx/src/resource/js/components/PageList/Page.js → packages/growi-plugin-lsx/src/resource/js/components/LsxPageList/LsxPage.jsx

@@ -4,10 +4,11 @@ import PropTypes from 'prop-types';
 import PageListMeta from '@client/js/components/PageList/PageListMeta';
 
 import { LsxContext } from '../../util/LsxContext';
-import { PagePathWrapper } from './PagePathWrapper';
 import { PageNode } from '../PageNode';
 
-export class Page extends React.Component {
+import { PagePathWrapper } from './PagePathWrapper';
+
+export class LsxPage extends React.Component {
 
   constructor(props) {
     super(props);
@@ -54,7 +55,7 @@ export class Page extends React.Component {
     if (this.state.hasChildren) {
       const pages = pageNode.children.map((pageNode) => {
         return (
-          <Page key={pageNode.pagePath} depth={this.props.depth + 1}
+          <LsxPage key={pageNode.pagePath} depth={this.props.depth + 1}
             pageNode={pageNode}
             lsxContext={this.props.lsxContext}
           />
@@ -64,13 +65,13 @@ export class Page extends React.Component {
       element = <ul className="page-list-ul">{pages}</ul>;
     }
 
-    return element
+    return element;
   }
 
   getIconElement() {
     return (this.state.isExists)
-        ? <i className="ti-agenda" aria-hidden="true"></i>
-        : <i className="ti-file lsx-page-not-exist" aria-hidden="true"></i>;
+      ? <i className="ti-agenda" aria-hidden="true"></i>
+      : <i className="ti-file lsx-page-not-exist" aria-hidden="true"></i>;
   }
 
   /**
@@ -106,7 +107,7 @@ export class Page extends React.Component {
   }
 }
 
-Page.propTypes = {
+LsxPage.propTypes = {
   pageNode: PropTypes.instanceOf(PageNode).isRequired,
   lsxContext: PropTypes.instanceOf(LsxContext).isRequired,
   depth: PropTypes.number,

+ 0 - 0
packages/growi-plugin-lsx/src/resource/js/components/PageList/PagePathWrapper.jsx → packages/growi-plugin-lsx/src/resource/js/components/LsxPageList/PagePathWrapper.jsx