Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Commit

Permalink
Keep working on updating to new React structure
Browse files Browse the repository at this point in the history
Currently refactoring SearchModal to use the react-meteor-data
container component (instead of the old mixin)
  • Loading branch information
pletcher committed May 30, 2017
1 parent 208d3db commit f59131b
Show file tree
Hide file tree
Showing 33 changed files with 785 additions and 468 deletions.
1 change: 1 addition & 0 deletions .meteor/packages
Expand Up @@ -100,3 +100,4 @@ kuip:schema-graphql-bridge
facebook-config-ui@1.0.0
google-config-ui@1.0.0
twitter-config-ui@1.0.0
kadira:react-layout
49 changes: 26 additions & 23 deletions .meteor/versions
@@ -1,9 +1,9 @@
accounts-base@1.2.17
accounts-facebook@1.1.1
accounts-google@1.1.2
accounts-base@1.3.0
accounts-facebook@1.2.0
accounts-google@1.2.0
accounts-oauth@1.1.15
accounts-password@1.3.6
accounts-twitter@1.2.1
accounts-twitter@1.3.0
accounts-ui@1.1.9
accounts-ui-unstyled@1.2.1
alanning:roles@1.2.16
Expand All @@ -18,14 +18,14 @@ aldeed:template-extension@4.1.0
allow-deny@1.0.5
archimedigital:core@0.1.1
autoupdate@1.3.12
babel-compiler@6.18.2
babel-compiler@6.19.1
babel-runtime@1.0.1
base64@1.0.10
binary-heap@1.0.10
blaze@2.3.2
blaze-html-templates@1.1.2
blaze-tools@1.0.10
boilerplate-generator@1.0.11
boilerplate-generator@1.1.0
buishi:autoform-ufs@0.0.2
caching-compiler@1.1.9
caching-html-compiler@1.1.2
Expand Down Expand Up @@ -61,18 +61,20 @@ ddp-rate-limiter@1.0.7
ddp-server@1.3.14
deps@1.0.12
diff-sequence@1.0.7
ecmascript@0.7.3
ecmascript-runtime@0.3.15
ecmascript@0.8.0
ecmascript-runtime@0.4.1
ecmascript-runtime-client@0.4.1
ecmascript-runtime-server@0.4.1
ejson@1.0.13
email@1.2.1
facebook-config-ui@1.0.0
facebook-oauth@1.3.0
facebook-oauth@1.3.1
fortawesome:fontawesome@4.7.0
fourseven:scss@3.10.1
geojson-utils@1.0.10
google-config-ui@1.0.0
google-oauth@1.2.4
gwendall:blaze-to-react@0.1.2
gwendall:blaze-to-react@1.0.0
handlebars@1.0.7
hot-code-push@1.0.4
html-tools@1.0.11
Expand All @@ -99,10 +101,11 @@ juliancwirko:s-alert@3.2.0
juliancwirko:s-alert-stackslide@3.1.3
kadira:blaze-layout@2.3.0
kadira:flow-router@2.12.1
kadira:react-layout@1.3.0
kuip:schema-graphql-bridge@1.0.3
less@2.7.9
livedata@1.0.18
localstorage@1.0.12
localstorage@1.1.0
logging@1.1.17
matb33:collection-hooks@0.8.4
materialize:materialize@0.98.2
Expand All @@ -117,12 +120,12 @@ meteorhacks:unblock@1.1.0
meteorspark:util@0.2.0
mfactory:admin-lte@0.0.2
minifier-css@1.2.16
minifier-js@2.0.0
minimongo@1.0.23
modules@0.8.2
modules-runtime@0.7.10
minifier-js@2.1.0
minimongo@1.2.0
modules@0.9.0
modules-runtime@0.8.0
momentjs:moment@2.18.1
mongo@1.1.17
mongo@1.1.18
mongo-id@1.0.6
mongo-livedata@1.0.12
mpowaga:autoform-summernote@0.4.3
Expand All @@ -140,15 +143,15 @@ observe-sequence@1.0.16
ordered-dict@1.0.9
percolate:momentum@0.7.2
percolate:velocityjs@1.1.0
promise@0.8.8
promise@0.8.9
raix:eventemitter@0.1.3
raix:handlebar-helpers@0.2.5
random@1.0.10
rate-limit@1.0.8
react@0.14.6
react-meteor-data@0.2.7
react-runtime@0.14.5
reactive-dict@1.1.8
react@15.0.1
react-meteor-data@0.2.11
react-runtime@15.0.1
reactive-dict@1.1.9
reactive-var@1.0.11
reload@1.1.11
retry@1.0.9
Expand All @@ -165,7 +168,7 @@ spacebars@1.0.15
spacebars-compiler@1.1.2
srp@1.0.10
standard-minifier-css@1.3.4
standard-minifier-js@2.0.0
standard-minifier-js@2.1.0
summernote:standalone@0.7.3
tap:i18n@1.8.2
templating@1.3.2
Expand All @@ -189,7 +192,7 @@ useraccounts:core@1.14.2
useraccounts:flow-routing@1.14.3
useraccounts:materialize@1.14.2
utilities:avatar@0.9.2
webapp@1.3.15
webapp@1.3.16
webapp-hashing@1.0.9
yogiben:admin@1.2.8
yogiben:autoform-file@0.4.2
Expand Down
1 change: 1 addition & 0 deletions client/main.js
@@ -0,0 +1 @@
import '/imports/startup/client';
4 changes: 3 additions & 1 deletion imports/lib/config/config.js
@@ -1,4 +1,4 @@
this.Config = {
const Config = {
name: 'CLTK Archive',
title() {
return 'CLTK Archive';
Expand Down Expand Up @@ -38,3 +38,5 @@ this.Config = {
publicRoutes: ['home'],
dashboardRoute: '/dashboard',
};

export default Config;
49 changes: 0 additions & 49 deletions imports/lib/router/main.js

This file was deleted.

47 changes: 0 additions & 47 deletions imports/lib/router/users.js

This file was deleted.

2 changes: 2 additions & 0 deletions imports/startup/client/index.js
@@ -0,0 +1,2 @@
import './routes.js';
import './users.js';
90 changes: 90 additions & 0 deletions imports/lib/router.js → imports/startup/client/routes.js
@@ -1,3 +1,93 @@
import React from 'react';
import { mount } from 'react-mounter';

import HomeLayout from '/imports/ui/layouts/HomeLayout/HomeLayout.jsx';
import MasterLayout from '/imports/ui/layouts/MasterLayout/MasterLayout.jsx';
import Utils from '/imports/lib/utils';

/*
* For the moment add subscriptions here; in future iterations, make them route
* specific as necessary
*/

FlowRouter.subscriptions = function subscriptions() {
this.register('authors', Meteor.subscribe('authors'));
this.register('worksCount', Meteor.subscribe('worksCount'));
this.register('authorsCount', Meteor.subscribe('authorsCount'));
};

/*
* Routes for application
*/
FlowRouter.route('/works/:id/:work', {
action(params, queryParams) {
mount(ReadingLayout, { params, queryParams });
},
});

FlowRouter.route('/', {
name: 'Home',
action() {
mount(HomeLayout);
},
});

FlowRouter.route('/about', {
action() {
mount(MasterLayout, { content: <AboutPage /> });
},
});

FlowRouter.route('/browse', {
action() {
mount(MasterLayout, { content: <BrowseView /> });
},
});

FlowRouter.route('/terms', {
action() {
mount(MasterLayout, { content: <TermsPage /> });
},
});

/**
* User routes
*/

/*
* Route groups with permissions
*/
loggedInGroup = FlowRouter.group({
triggersEnter: [AccountsTemplates.ensureSignedIn],
});

loggedInGroup.route('/profile', {
action() {
ReactLayout.render(UserLayout);
},
});
loggedInGroup.route('/account', {
action() {
BlazeLayout.render('masterLayout', { main: 'account' });
},
});

loggedInGroup.route('/setUserName', {
action() {
// Do nothing
},
});
loggedInGroup.route('/sign-out', {
triggersEnter: [
() => {
AccountsTemplates.logout();
},
],
action: () => {
// Do nothing
},
});

this.subs = new SubsManager();

/*
Expand Down
14 changes: 14 additions & 0 deletions imports/lib/config/accounts.js → imports/startup/client/users.js
@@ -1,3 +1,6 @@
import Config from '/imports/lib/config/config';
import MainLayout from '/imports/ui/layouts/BaseLayout/MainLayout.jsx';

AccountsTemplates.configure({
defaultLayoutType: 'blaze-to-react',
defaultLayout: MainLayout,
Expand All @@ -22,3 +25,14 @@ AccountsTemplates.configure({
privacyUrl: Config.privacyUrl || null,
termsUrl: Config.termsUrl || null,
});

AccountsTemplates.configureRoute('changePwd');
AccountsTemplates.configureRoute('forgotPwd');
AccountsTemplates.configureRoute('resetPwd');
AccountsTemplates.configureRoute('signIn', {
redirect: '/profile',
});
// AccountsTemplates.configureRoute('signUp', {
// redirect: '/profile',
// });
AccountsTemplates.configureRoute('verifyEmail');
13 changes: 7 additions & 6 deletions imports/ui/components/footer/Footer/Footer.jsx
@@ -1,15 +1,16 @@
import React from 'react';

import FlatButton from 'material-ui/FlatButton';
import IconButton from 'material-ui/IconButton';
import baseTheme from 'material-ui/styles/baseThemes/lightBaseTheme';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import PropTypes from 'prop-types';


Footer = React.createClass({
export default class Footer extends React.Component {

getChildContext() {
return { muiTheme: getMuiTheme(baseTheme) };
},

}

render() {
const date = new Date();
Expand Down Expand Up @@ -99,8 +100,8 @@ Footer = React.createClass({
</div>
</footer>
);
},
});
}
};

Footer.childContextTypes = {
muiTheme: React.PropTypes.object.isRequired,
Expand Down

0 comments on commit f59131b

Please sign in to comment.