completely broke everything by moving it
This commit is contained in:
parent
f07b97d573
commit
7fe26ea022
30 changed files with 33 additions and 37 deletions
|
@ -12,6 +12,9 @@ module.exports = {
|
|||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"settings": {
|
||||
"ecmascript": 6
|
||||
},
|
||||
"plugins": [
|
||||
"promise",
|
||||
"standard",
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
/* global $ */
|
||||
|
||||
import Active from '../Active'
|
||||
import DataModel from '../DataModel'
|
||||
import GlobalUI, { ReactApp } from '../GlobalUI'
|
||||
import Loading from '../Loading'
|
||||
import DataModel from './DataModel'
|
||||
import GlobalUI, { ReactApp } from './GlobalUI'
|
||||
import Loading from './Loading'
|
||||
|
||||
const ExploreMaps = {
|
||||
pending: false,
|
||||
|
@ -124,7 +123,7 @@ const ExploreMaps = {
|
|||
onStar: function(map) {
|
||||
$.post('/maps/' + map.id + '/star')
|
||||
map.set('star_count', map.get('star_count') + 1)
|
||||
if (DataModel.Stars) DataModel.Stars.push({ user_id: Active.Mapper.id, map_id: map.id })
|
||||
if (DataModel.Stars) DataModel.Stars.push({ user_id: ReactApp.currentUser.id, map_id: map.id })
|
||||
DataModel.Maps.Starred.add(map)
|
||||
GlobalUI.notifyUser('Map is now starred')
|
||||
ReactApp.render()
|
||||
|
@ -136,16 +135,16 @@ const ExploreMaps = {
|
|||
GlobalUI.notifyUser('You will be notified by email if request accepted')
|
||||
},
|
||||
onMapFollow: function(map) {
|
||||
const isFollowing = map.isFollowedBy(Active.Mapper)
|
||||
const isFollowing = map.isFollowedBy(ReactApp.currentUser)
|
||||
$.post({
|
||||
url: `/maps/${map.id}/${isFollowing ? 'un' : ''}follow`
|
||||
})
|
||||
if (isFollowing) {
|
||||
GlobalUI.notifyUser('You are no longer following this map')
|
||||
Active.Mapper.unfollowMap(map.id)
|
||||
ReactApp.currentUser.unfollowMap(map.id)
|
||||
} else {
|
||||
GlobalUI.notifyUser('You are now following this map')
|
||||
Active.Mapper.followMap(map.id)
|
||||
ReactApp.currentUser.followMap(map.id)
|
||||
}
|
||||
ReactApp.render()
|
||||
}
|
|
@ -8,13 +8,9 @@ import { merge } from 'lodash'
|
|||
import { notifyUser } from './index.js'
|
||||
import ImportDialog from './ImportDialog'
|
||||
import Mapper from '../DataModel/Mapper'
|
||||
import { ExploreMaps, ChatView, TopicCard } from '../Views'
|
||||
import Filter from '../Filter'
|
||||
import JIT from '../JIT'
|
||||
import Realtime from '../Realtime'
|
||||
import Map, { mapControl } from '../Map'
|
||||
import Topic from '../Topic'
|
||||
import Visualize from '../Visualize'
|
||||
import ExploreMaps from '../ExploreMaps'
|
||||
import { mapControl } from '../Map'
|
||||
import { topicControl } from '../Topic'
|
||||
import makeRoutes from '../../components/makeRoutes'
|
||||
let routes
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/* global $ */
|
||||
|
||||
import ExploreMaps from './ExploreMaps'
|
||||
import ChatView from './ChatView'
|
||||
import VideoView from './VideoView'
|
||||
import Room from './Room'
|
||||
|
@ -10,7 +9,7 @@ import { JUNTO_UPDATED } from '../Realtime/events'
|
|||
const Views = {
|
||||
init: (serverData) => {
|
||||
$(document).on(JUNTO_UPDATED, () => ExploreMaps.render())
|
||||
//ChatView.init([serverData['sounds/MM_sounds.mp3'], serverData['sounds/MM_sounds.ogg']])
|
||||
ChatView.init([serverData['sounds/MM_sounds.mp3'], serverData['sounds/MM_sounds.ogg']])
|
||||
},
|
||||
ExploreMaps,
|
||||
ChatView,
|
||||
|
@ -19,5 +18,5 @@ const Views = {
|
|||
TopicCard
|
||||
}
|
||||
|
||||
export { ExploreMaps, ChatView, VideoView, Room, TopicCard }
|
||||
export { ChatView, VideoView, Room, TopicCard }
|
||||
export default Views
|
|
@ -1,34 +1,33 @@
|
|||
import Account from './Account'
|
||||
import Active from './Active'
|
||||
import Active from './Map/Active'
|
||||
import Admin from './Admin'
|
||||
import AutoLayout from './AutoLayout'
|
||||
import Cable from './Cable'
|
||||
import Control from './Control'
|
||||
import Create from './Create'
|
||||
import AutoLayout from './Map/AutoLayout'
|
||||
import Cable from './Map/Cable'
|
||||
import Control from './Map/Control'
|
||||
import Create from './Map/Create'
|
||||
import DataModel from './DataModel'
|
||||
import Debug from './Debug'
|
||||
import Filter from './Filter'
|
||||
import Filter from './Map/Filter'
|
||||
import GlobalUI, {
|
||||
ReactApp, Search, CreateMap, ImportDialog
|
||||
} from './GlobalUI'
|
||||
import Import from './Import'
|
||||
import JIT from './JIT'
|
||||
import Listeners from './Listeners'
|
||||
import Import from './Map/Import'
|
||||
import JIT from './Map/JIT'
|
||||
import Listeners from './Map/Listeners'
|
||||
import Loading from './Loading'
|
||||
import Map, { CheatSheet } from './Map'
|
||||
import Mapper from './Mapper'
|
||||
import Mouse from './Mouse'
|
||||
import Organize from './Organize'
|
||||
import PasteInput from './PasteInput'
|
||||
import Realtime from './Realtime'
|
||||
import Selected from './Selected'
|
||||
import Mouse from './Map/Mouse'
|
||||
import Organize from './Map/Organize'
|
||||
import PasteInput from './Map/PasteInput'
|
||||
import Realtime from './Map/Realtime'
|
||||
import Selected from './Map/Selected'
|
||||
import Settings from './Settings'
|
||||
import Synapse from './Synapse'
|
||||
import SynapseCard from './SynapseCard'
|
||||
import Topic from './Topic'
|
||||
import Synapse from './Map/Synapse'
|
||||
import SynapseCard from './Map/SynapseCard'
|
||||
import Topic from './Map/Topic'
|
||||
import Util from './Util'
|
||||
import Views from './Views'
|
||||
import Visualize from './Visualize'
|
||||
import Visualize from './Map/Visualize'
|
||||
|
||||
const Metamaps = window.Metamaps || {}
|
||||
Metamaps.Account = Account
|
||||
|
|
Loading…
Add table
Reference in a new issue