mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 17:41:43 -05:00
change import syntax; add listId to all ListContainers
This commit is contained in:
parent
e399412d00
commit
241ba651e8
19 changed files with 47 additions and 52 deletions
|
@ -52,7 +52,7 @@ jparker:gravatar@0.4.1
|
|||
jquery@1.11.8
|
||||
kadira:debug@3.2.2
|
||||
kadira:dochead@1.5.0
|
||||
kadira:flow-router-ssr@3.12.2
|
||||
kadira:flow-router-ssr@3.13.0
|
||||
kadira:runtime-dev@0.0.1
|
||||
livedata@1.0.18
|
||||
localstorage@1.0.9
|
||||
|
@ -61,7 +61,7 @@ matb33:collection-hooks@0.8.1
|
|||
mdg:validation-error@0.5.1
|
||||
meteor@1.1.14
|
||||
meteor-base@1.0.4
|
||||
meteorhacks:fast-render@2.13.0
|
||||
meteorhacks:fast-render@2.14.0
|
||||
meteorhacks:inject-data@2.0.0
|
||||
meteorhacks:inject-initial@1.0.4
|
||||
meteorhacks:kadira@2.28.5
|
||||
|
@ -140,6 +140,7 @@ standard-minifiers@1.0.6
|
|||
std:accounts-ui@1.2.3
|
||||
templating@1.1.9
|
||||
templating-tools@1.0.4
|
||||
timoruetten:flow-router-ssr-request@0.1.0
|
||||
tmeasday:check-npm-versions@0.3.1
|
||||
tmeasday:publish-counts@0.7.3
|
||||
tracker@1.0.13
|
||||
|
@ -147,7 +148,7 @@ twitter@1.1.9
|
|||
ui@1.0.11
|
||||
underscore@1.0.8
|
||||
url@1.0.9
|
||||
utilities:react-list-container@0.1.9
|
||||
utilities:react-list-container@0.1.10
|
||||
utilities:smart-methods@0.1.4
|
||||
utilities:smart-publications@0.1.4
|
||||
webapp@1.2.8
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
import React, { PropTypes, Component } from 'react';
|
||||
import NovaForm from "meteor/nova:forms";
|
||||
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
const DocumentContainer = SmartContainers.DocumentContainer;
|
||||
|
||||
import { DocumentContainer } from "meteor/utilities:react-list-container";
|
||||
import { Messages } from "meteor/nova:core";
|
||||
|
||||
import Actions from "../actions.js";
|
||||
|
||||
class CategoriesEditForm extends Component{
|
||||
|
|
|
@ -2,9 +2,6 @@ import React from 'react';
|
|||
import NoSSR from 'react-no-ssr';
|
||||
import { Messages } from "meteor/nova:core";
|
||||
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
const ListContainer = SmartContainers.ListContainer;
|
||||
|
||||
const Header = ({currentUser}) => {
|
||||
|
||||
const logoUrl = Telescope.settings.get("logoUrl");
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import React, { PropTypes, Component } from 'react';
|
||||
import NovaForm from "meteor/nova:forms";
|
||||
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
const DocumentContainer = SmartContainers.DocumentContainer;
|
||||
|
||||
import { DocumentContainer } from "meteor/utilities:react-list-container";
|
||||
import { Messages } from "meteor/nova:core";
|
||||
|
||||
class SettingsEditForm extends Component{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import React from 'react';
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
const ListContainer = SmartContainers.ListContainer;
|
||||
|
||||
import { ListContainer } from "meteor/utilities:react-list-container";
|
||||
import { ModalTrigger } from "meteor/nova:core";
|
||||
|
||||
const PostsCommentsThread = ({document, currentUser}) => {
|
||||
|
@ -20,6 +18,7 @@ const PostsCommentsThread = ({document, currentUser}) => {
|
|||
parentProperty="parentCommentId"
|
||||
joins={Comments.getJoins()}
|
||||
component={Telescope.components.CommentsList}
|
||||
listId="comments.list"
|
||||
/>
|
||||
{ currentUser ?
|
||||
<div className="posts-comments-thread-new">
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import React, { PropTypes, Component } from 'react';
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
const ListContainer = SmartContainers.ListContainer;
|
||||
import { ListContainer } from "meteor/utilities:react-list-container";
|
||||
|
||||
class PostsDay extends Component {
|
||||
|
||||
|
@ -13,7 +12,8 @@ class PostsDay extends Component {
|
|||
date: date,
|
||||
after: moment(date).format("YYYY-MM-DD"),
|
||||
before: moment(date).format("YYYY-MM-DD"),
|
||||
enableCache: number <= 15 ? true : false // only cache first 15 days
|
||||
enableCache: number <= 15 ? true : false, // only cache first 15 days
|
||||
listId: `posts.list.${moment(date).format("YYYY-MM-DD")}`
|
||||
};
|
||||
|
||||
({selector, options} = Posts.parameters.get(terms));
|
||||
|
@ -30,6 +30,7 @@ class PostsDay extends Component {
|
|||
joins={Posts.getJoins()}
|
||||
component={Telescope.components.PostsList}
|
||||
componentProps={{showHeader: false}}
|
||||
listId={terms.listId}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
import React, { PropTypes, Component } from 'react';
|
||||
import NovaForm from "meteor/nova:forms";
|
||||
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
const DocumentContainer = SmartContainers.DocumentContainer;
|
||||
|
||||
import { DocumentContainer } from "meteor/utilities:react-list-container";
|
||||
import { Messages } from "meteor/nova:core";
|
||||
|
||||
import Actions from "../actions.js";
|
||||
|
||||
class PostsEditForm extends Component{
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import React from 'react';
|
||||
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
const ListContainer = SmartContainers.ListContainer;
|
||||
import { ListContainer } from "meteor/utilities:react-list-container";
|
||||
|
||||
const PostsListHeader = () => {
|
||||
|
||||
|
@ -9,7 +7,13 @@ const PostsListHeader = () => {
|
|||
<div>
|
||||
<div className="posts-list-header">
|
||||
<div className="posts-lists-header-categories">
|
||||
<ListContainer collection={Categories} limit={0} resultsPropName="categories" component={Telescope.components.CategoriesList}/>
|
||||
<ListContainer
|
||||
collection={Categories}
|
||||
limit={0}
|
||||
resultsPropName="categories"
|
||||
component={Telescope.components.CategoriesList}
|
||||
listId="categories"
|
||||
/>
|
||||
</div>
|
||||
<Telescope.components.PostsViews />
|
||||
<Telescope.components.SearchForm/>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import React, { PropTypes, Component } from 'react';
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
const ListContainer = SmartContainers.ListContainer;
|
||||
import { ListContainer } from "meteor/utilities:react-list-container";
|
||||
|
||||
const UsersProfile = ({user, currentUser}) => {
|
||||
|
||||
|
@ -29,6 +28,7 @@ const UsersProfile = ({user, currentUser}) => {
|
|||
cacheSubscription={false}
|
||||
component={Telescope.components.PostsList}
|
||||
componentProps={{showHeader: false}}
|
||||
listId="posts.list.user"
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -24,7 +24,7 @@ Package.onUse(function (api) {
|
|||
'fortawesome:fontawesome@4.5.0',
|
||||
'tmeasday:check-npm-versions@0.3.1',
|
||||
'std:accounts-ui@1.2.3',
|
||||
'utilities:react-list-container@0.1.8',
|
||||
'utilities:react-list-container@0.1.10',
|
||||
'kadira:dochead@1.5.0'
|
||||
]);
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
import React from 'react';
|
||||
import {mount} from 'react-mounter';
|
||||
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
const DocumentContainer = SmartContainers.DocumentContainer;
|
||||
const ListContainer = SmartContainers.ListContainer;
|
||||
import { ListContainer, DocumentContainer } from "meteor/utilities:react-list-container";
|
||||
|
||||
Telescope.routes = {};
|
||||
|
||||
|
@ -21,6 +18,8 @@ Telescope.addRoutes({
|
|||
|
||||
({App, PostsList} = Telescope.components);
|
||||
queryParams = _.isEmpty(queryParams) ? {view: 'new'} : _.clone(queryParams);
|
||||
queryParams.listId = "posts.list.main";
|
||||
|
||||
({selector, options} = Posts.parameters.get(queryParams));
|
||||
|
||||
mount(App, {content:
|
||||
|
@ -33,6 +32,7 @@ Telescope.addRoutes({
|
|||
joins={Posts.getJoins()}
|
||||
component={PostsList}
|
||||
cacheSubscription={false}
|
||||
listId={queryParams.listId}
|
||||
/>})
|
||||
}
|
||||
},
|
||||
|
|
|
@ -20,7 +20,7 @@ Package.onUse(function (api) {
|
|||
|
||||
// third-party packages
|
||||
|
||||
'utilities:react-list-container@0.1.8',
|
||||
'utilities:react-list-container@0.1.10'
|
||||
]);
|
||||
|
||||
api.addFiles([
|
||||
|
|
|
@ -5,5 +5,6 @@ import FlashContainer from "./containers/FlashContainer.jsx";
|
|||
import AppComposer from "./containers/AppComposer.jsx";
|
||||
import CurrentUserContainer from "./containers/CurrentUserContainer.jsx";
|
||||
import Avatar from "./avatar.js";
|
||||
// import NovaCounts from "./counts.js";
|
||||
|
||||
export { Avatar, Messages, ModalTrigger, ContextPasser, AppComposer, FlashContainer, CurrentUserContainer};
|
|
@ -25,7 +25,7 @@ Package.onUse(function(api) {
|
|||
'lib/icons.js',
|
||||
'lib/seo.js',
|
||||
'lib/debug.js',
|
||||
'lib/router.jsx',
|
||||
'lib/router.jsx'
|
||||
// 'lib/colors.js' // probably not that useful anymore?
|
||||
], ['client', 'server']);
|
||||
|
||||
|
@ -38,7 +38,8 @@ Package.onUse(function(api) {
|
|||
'lib/server/routes.js'
|
||||
], ['server']);
|
||||
|
||||
api.mainModule("lib/core.js", ["client", "server"]);
|
||||
api.mainModule("lib/export.js", "server");
|
||||
api.mainModule("lib/export.js", "client");
|
||||
|
||||
// var languages = ["ar", "bg", "cs", "da", "de", "el", "en", "es", "et", "fr", "hu", "id", "it", "ja", "kk", "ko", "nl", "pl", "pt-BR", "ro", "ru", "sl", "sv", "th", "tr", "vi", "zh-CN"];
|
||||
// var languagesPaths = languages.map(function (language) {
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
import React, { PropTypes, Component } from 'react';
|
||||
import Core from 'meteor/nova:core';
|
||||
import SmartContainers from "meteor/utilities:react-list-container";
|
||||
import { ListContainer } from "meteor/utilities:react-list-container";
|
||||
import NovaForm from "meteor/nova:forms";
|
||||
import { Button } from 'react-bootstrap';
|
||||
import { Accounts } from 'meteor/std:accounts-ui';
|
||||
import { ModalTrigger, Messages, FlashContainer } from "meteor/nova:core";
|
||||
|
||||
import {ModalTrigger} from "meteor/nova:core";
|
||||
import {Messages} from "meteor/nova:core";
|
||||
import {FlashContainer} from "meteor/nova:core";
|
||||
const ListContainer = SmartContainers.ListContainer;
|
||||
const FlashMessages = Telescope.components.FlashMessages;
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
|
@ -35,7 +31,8 @@ class MoviesWrapper extends Component {
|
|||
joins={Movies.getJoins()}
|
||||
limit={5}
|
||||
component={MoviesList}
|
||||
/>
|
||||
listId="movies.list"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,7 @@ Package.onUse(function (api) {
|
|||
// Nova packages
|
||||
|
||||
'nova:core@0.26.2-nova',
|
||||
'utilities:react-list-container@0.1.8',
|
||||
'utilities:react-list-container@0.1.10',
|
||||
'utilities:smart-publications@0.1.4',
|
||||
|
||||
// third-party packages
|
||||
|
|
|
@ -34,7 +34,7 @@ Package.onUse(function (api) {
|
|||
'djedi:sanitize-html@1.11.2',
|
||||
'jparker:gravatar@0.4.1',
|
||||
'ongoworks:speakingurl@9.0.0',
|
||||
'tmeasday:publish-counts@0.7.3',
|
||||
// 'tmeasday:publish-counts@0.7.3',
|
||||
'meteorhacks:unblock@1.1.0',
|
||||
'kadira:flow-router-ssr@3.12.2',
|
||||
'utilities:smart-publications@0.1.4',
|
||||
|
@ -61,8 +61,7 @@ Package.onUse(function (api) {
|
|||
], ['server']);
|
||||
|
||||
api.export([
|
||||
'Telescope',
|
||||
'Counts'
|
||||
'Telescope'
|
||||
]);
|
||||
|
||||
});
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { CursorCounts } from "meteor/utilities:react-list-container";
|
||||
|
||||
Posts._ensureIndex({"status": 1, "postedAt": 1});
|
||||
|
||||
// ------------------------------------- Helpers -------------------------------- //
|
||||
|
@ -70,7 +72,7 @@ Meteor.publish('posts.list', function (terms) {
|
|||
const currentUser = Meteor.users.findOne(this.userId);
|
||||
|
||||
terms.currentUserId = this.userId; // add currentUserId to terms
|
||||
({selector, options} = Posts.parameters.get(terms));
|
||||
const {selector, options} = Posts.parameters.get(terms);
|
||||
|
||||
// note: enabling Counts.publish messes up SSR
|
||||
// Counts.publish(this, 'posts.list', Posts.find(selector, options));
|
||||
|
@ -78,6 +80,9 @@ Meteor.publish('posts.list', function (terms) {
|
|||
options.fields = Posts.publishedFields.list;
|
||||
|
||||
const posts = Posts.find(selector, options);
|
||||
|
||||
CursorCounts.push(terms.listId, posts.count(), this.connection.id);
|
||||
|
||||
const users = getPostsListUsers(posts);
|
||||
|
||||
return Users.can.view(currentUser) ? [posts, users] : [];
|
||||
|
|
|
@ -19,6 +19,7 @@ Package.onUse(function (api) {
|
|||
// 'nova:settings@0.26.2-nova',
|
||||
'nova:users@0.26.2-nova',
|
||||
// 'nova:comments@0.26.2-nova'
|
||||
'utilities:react-list-container@0.1.10'
|
||||
]);
|
||||
|
||||
api.use([
|
||||
|
|
Loading…
Add table
Reference in a new issue