Skip to content

Commit

Permalink
Add javascript exports
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkwinkelmann committed Dec 1, 2020
1 parent 8bcd271 commit f3c5dda
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/dist/forum.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dist/forum.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/src/forum/components/DiscussionPoll.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import LogInModal from 'flarum/components/LogInModal';
import Stream from 'flarum/utils/Stream';
import ListVotersModal from './ListVotersModal';

export default class PollVote extends Component {
export default class DiscussionPoll extends Component {
oninit(vnode) {
super.oninit(vnode);
this.poll = this.attrs.poll;
Expand Down
2 changes: 1 addition & 1 deletion js/src/forum/components/ListVotersModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Modal from 'flarum/components/Modal';
import avatar from 'flarum/helpers/avatar';
import username from 'flarum/helpers/username';

export default class ShowVotersModal extends Modal {
export default class ListVotersModal extends Modal {
className() {
return 'Modal--small';
}
Expand Down
11 changes: 11 additions & 0 deletions js/src/forum/components/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import CreatePollModal from './CreatePollModal';
import DiscussionPoll from './DiscussionPoll';
import EditPollModal from './EditPollModal';
import ListVotersModal from './ListVotersModal';

export const components = {
CreatePollModal,
DiscussionPoll,
EditPollModal,
ListVotersModal,
};
3 changes: 3 additions & 0 deletions js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import addDiscussionComposerItem from './addDiscussionComposerItem';
import addPollToDiscussion from './addPollToDiscussion';
import addDiscussionControls from './addDiscussionControls';

export * from './components';
export * from './models';

app.initializers.add('fof/polls', () => {
app.store.models.polls = Poll;
app.store.models.poll_options = PollOption;
Expand Down
9 changes: 9 additions & 0 deletions js/src/forum/models/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Poll from './Poll';
import PollOption from './PollOption';
import PollVote from './PollVote';

export const models = {
Poll,
PollOption,
PollVote,
};

0 comments on commit f3c5dda

Please sign in to comment.