couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject fauxton commit: updated refs/heads/master to a5e962e
Date Thu, 03 Nov 2016 17:54:16 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 0db3f7bdb -> a5e962ec5


redux: delete unused store

i was just about to convert our first module to redux, turns out
it doesn't need a store right now. so i deleted the store.

PR: #799
PR-URL: https://github.com/apache/couchdb-fauxton/pull/799
Reviewed-By: garren smith <garren.smith@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/a5e962ec
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/a5e962ec
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/a5e962ec

Branch: refs/heads/master
Commit: a5e962ec5179636a639183706dd6e6f75e78a0c4
Parents: 0db3f7b
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Wed Nov 2 16:11:35 2016 +0100
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Thu Nov 3 18:54:02 2016 +0100

----------------------------------------------------------------------
 app/addons/documentation/components.react.jsx | 100 +++++++++++++++------
 app/addons/documentation/resources.js         |  13 ---
 app/addons/documentation/routes.js            |   2 +-
 app/addons/documentation/stores.js            |  83 -----------------
 4 files changed, 73 insertions(+), 125 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a5e962ec/app/addons/documentation/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documentation/components.react.jsx b/app/addons/documentation/components.react.jsx
index 01b0ddf..b082b91 100644
--- a/app/addons/documentation/components.react.jsx
+++ b/app/addons/documentation/components.react.jsx
@@ -13,23 +13,69 @@
 import app from "../../app";
 import FauxtonAPI from "../../core/api";
 import React from "react";
-import Stores from "./stores";
 
-var documentationStore = Stores.documentationStore;
-
-var DocumentationController = React.createClass({
-  getStoreState: function () {
-    return {
-      links: documentationStore.getLinks()
-    };
+const docLinks = [
+  {
+    title: 'CouchDB Official Documentation — Online',
+    link: 'http://docs.couchdb.org/en/latest/',
+    iconClassName: 'couchdb-icon'
   },
-
-  getInitialState: function () {
-    return this.getStoreState();
+  {
+    title: 'CouchDB Official Documentation — Offline',
+    link: '/_utils/docs/contents.html',
+    iconClassName: 'couchdb-icon'
+  },
+  {
+    title: 'CouchDB Weekly News',
+    link: 'http://blog.couchdb.org/',
+    iconClassName: 'couchdb-icon'
+  },
+  {
+    title: 'CouchDB Homepage',
+    link: 'https://couchdb.apache.org/',
+    iconClassName: 'couchdb-icon'
+  },
+  {
+    title: 'CouchDB on GitHub',
+    link: 'https://github.com/apache/couchdb',
+    iconClassName: 'github-icon'
+  },
+  {
+    title: 'Fauxton on GitHub',
+    link: 'https://github.com/apache/couchdb-fauxton',
+    iconClassName: 'github-icon'
+  },
+  {
+    title: 'Fauxton Visual Guide',
+    link: 'https://couchdb.apache.org/fauxton-visual-guide/index.html',
+    iconClassName: 'couchdb-icon'
+  },
+  {
+    title: 'The Apache Software Foundation',
+    link: 'http://www.apache.org/',
+    iconClassName: 'asf-feather-icon'
   },
+  {
+    title: 'Follow CouchDB on Twitter',
+    link: 'https://twitter.com/couchdb',
+    iconClassName: 'twitter-icon'
+  },
+  {
+    title: 'Follow CouchDB on Google Plus',
+    link: 'https://plus.google.com/+CouchDB',
+    iconClassName: 'google-plus-icon'
+  },
+  {
+    title: 'Follow CouchDB on LinkedIn',
+    link: 'https://www.linkedin.com/company/apache-couchdb',
+    iconClassName: 'linkedin-icon'
+  }
+];
+
+const DocumentationPage = ({links = docLinks}) => {
 
-  createLinkRows: function () {
-    return this.state.links.map(function (linkObject) {
+  function createLinkRows (linkList) {
+    return linkList.map(function (linkObject) {
       return (
         <tr key={linkObject.title}>
           <td className="icons-container">
@@ -41,23 +87,21 @@ var DocumentationController = React.createClass({
         </tr>
       );
     });
-  },
+  }
 
-  render: function () {
-    return (
-      <div id="documentation-page" className="scrollable">
-        <div className="links">
-          <table>
-            <tbody>
-            {this.createLinkRows()}
-            </tbody>
-          </table>
-        </div>
+  return (
+    <div id="documentation-page" className="scrollable">
+      <div className="links">
+        <table>
+          <tbody>
+            {createLinkRows(links)}
+          </tbody>
+        </table>
       </div>
-    );
-  }
-});
+    </div>
+  );
+};
 
 export default {
-  DocumentationController: DocumentationController
+  DocumentationPage: DocumentationPage
 };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a5e962ec/app/addons/documentation/resources.js
----------------------------------------------------------------------
diff --git a/app/addons/documentation/resources.js b/app/addons/documentation/resources.js
deleted file mode 100644
index 845d5fb..0000000
--- a/app/addons/documentation/resources.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-export default null;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a5e962ec/app/addons/documentation/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/documentation/routes.js b/app/addons/documentation/routes.js
index 5205164..06af1cf 100644
--- a/app/addons/documentation/routes.js
+++ b/app/addons/documentation/routes.js
@@ -25,7 +25,7 @@ var DocumentationRouteObject = FauxtonAPI.RouteObject.extend({
   ],
   roles: ['fx_loggedIn'],
   documentation: function () {
-    this.setComponent('#dashboard-content', DocumentationComponents.DocumentationController);
+    this.setComponent('#dashboard-content', DocumentationComponents.DocumentationPage);
   }
 });
 DocumentationRouteObject.RouteObjects = [DocumentationRouteObject];

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/a5e962ec/app/addons/documentation/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documentation/stores.js b/app/addons/documentation/stores.js
deleted file mode 100644
index ad28cf7..0000000
--- a/app/addons/documentation/stores.js
+++ /dev/null
@@ -1,83 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-import app from "../../app";
-import FauxtonAPI from "../../core/api";
-
-var DocumentationStore = FauxtonAPI.Store.extend({
-  getLinks: function () {
-    return [
-      {
-        title: 'CouchDB Official Documentation — Online',
-        link: 'http://docs.couchdb.org/en/latest/',
-        iconClassName: 'couchdb-icon'
-      },
-      {
-        title: 'CouchDB Official Documentation — Offline',
-        link: '/_utils/docs/contents.html',
-        iconClassName: 'couchdb-icon'
-      },
-      {
-        title: 'CouchDB Weekly News',
-        link: 'http://blog.couchdb.org/',
-        iconClassName: 'couchdb-icon'
-      },
-      {
-        title: 'CouchDB Homepage',
-        link: 'https://couchdb.apache.org/',
-        iconClassName: 'couchdb-icon'
-      },
-      {
-        title: 'CouchDB on GitHub',
-        link: 'https://github.com/apache/couchdb',
-        iconClassName: 'github-icon'
-      },
-      {
-        title: 'Fauxton on GitHub',
-        link: 'https://github.com/apache/couchdb-fauxton',
-        iconClassName: 'github-icon'
-      },
-      {
-        title: 'Fauxton Visual Guide',
-        link: 'https://couchdb.apache.org/fauxton-visual-guide/index.html',
-        iconClassName: 'couchdb-icon'
-      },
-      {
-        title: 'The Apache Software Foundation',
-        link: 'http://www.apache.org/',
-        iconClassName: 'asf-feather-icon'
-      },
-      {
-        title: 'Follow CouchDB on Twitter',
-        link: 'https://twitter.com/couchdb',
-        iconClassName: 'twitter-icon'
-      },
-      {
-        title: 'Follow CouchDB on Google Plus',
-        link: 'https://plus.google.com/+CouchDB',
-        iconClassName: 'google-plus-icon'
-      },
-      {
-        title: 'Follow CouchDB on LinkedIn',
-        link: 'https://www.linkedin.com/company/apache-couchdb',
-        iconClassName: 'linkedin-icon'
-      }
-    ];
-
-  }
-});
-
-var documentationStore = new DocumentationStore();
-
-export default {
-  documentationStore: documentationStore
-};


Mime
View raw message