-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
35 lines (29 loc) · 1.06 KB
/
app.js
File metadata and controls
35 lines (29 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'use strict'
var app = require ('ampersand-app')
const AppView = require ('./view/app.view')
app.view = new AppView ({
el: document.body,
})
app.messages = {
'making': [ 'STARTING WORKTABLE', 'We\'re starting up your group', 'Contacting the room server...' ],
'joining': [ 'JOINING WORKTABLE', 'Connecting you with your group', 'Contacting peers...' ],
'authing': [ 'GETTING PERMISSION', 'Your\'ll be in soon', 'Waiting for response...' ],
'...': [ 'CONNECTING', 'YOUR SESSION MIGHT BE LOADING...', 'Stuff is happening' ],
}
// start working
app.working = function (type) {
let message = app.messages [type]
app.view.workingView.title = message [0]
app.view.workingView.funny = message [1]
app.view.workingView.status = message [2]
app.view.workingView.error = false
app.view.workingView.open = true
}
app.done = function () {
app.view.workingView.open = false
}
app.notify = function (notification) {
app.view.renderSubview (notification)
}
window.app = app
window.console.log = window.console.log.bind (window.console)