mirror of
https://github.com/moparisthebest/kaiwa
synced 2025-02-16 15:10:11 -05:00
Add 'connecting' indicator on first load.
This commit is contained in:
parent
49d5f8e692
commit
48cc126bac
10
clientapp/template.html
Normal file
10
clientapp/template.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type="text/css" href="#{cssFileName}" />
|
||||||
|
<script src="#{jsFileName}"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>Connecting</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -12,7 +12,7 @@ exports.pages = {};
|
|||||||
exports.body = function anonymous(locals) {
|
exports.body = function anonymous(locals) {
|
||||||
var buf = [];
|
var buf = [];
|
||||||
with (locals || {}) {
|
with (locals || {}) {
|
||||||
buf.push('<body><div class="wrap"><div id="reconnect"></div><header id="me"><img class="avatar"/><p class="status"></p></header><nav class="main"><li><a href="/logout">Logout</a></li><li><a href="/">Home</a></li></nav><nav id="contactList"></nav><section id="pages"></section><footer></footer></div></body>');
|
buf.push('<body><div class="wrap"><aside id="connectionStatus"><button class="reconnect">Reconnect</button><span class="message">disconnected</span></aside><div id="connectionOverlay"></div><header id="me"><img class="avatar"/><p class="status"></p></header><nav class="main"><li><a href="/logout">Logout</a></li><li><a href="/">Home</a></li></nav><nav id="contactList"></nav><section id="pages"></section><footer></footer></div></body>');
|
||||||
}
|
}
|
||||||
return buf.join("");
|
return buf.join("");
|
||||||
};
|
};
|
||||||
@ -71,7 +71,7 @@ exports.pages.chat = function anonymous(locals) {
|
|||||||
exports.pages.main = function anonymous(locals) {
|
exports.pages.main = function anonymous(locals) {
|
||||||
var buf = [];
|
var buf = [];
|
||||||
with (locals || {}) {
|
with (locals || {}) {
|
||||||
buf.push('<section class="page main"></section>');
|
buf.push('<section class="page main"><p>This space intentionally left blank.</p></section>');
|
||||||
}
|
}
|
||||||
return buf.join("");
|
return buf.join("");
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
body
|
body
|
||||||
.wrap
|
.wrap
|
||||||
#reconnect
|
aside#connectionStatus
|
||||||
|
button.reconnect Reconnect
|
||||||
|
span.message disconnected
|
||||||
|
#connectionOverlay
|
||||||
header#me
|
header#me
|
||||||
img.avatar
|
img.avatar
|
||||||
p.status
|
p.status
|
||||||
|
@ -1 +1,2 @@
|
|||||||
section.page.main
|
section.page.main
|
||||||
|
p This space intentionally left blank.
|
||||||
|
@ -12,7 +12,7 @@ module.exports = HumanView.extend({
|
|||||||
'click a[href]': 'handleLinkClick'
|
'click a[href]': 'handleLinkClick'
|
||||||
},
|
},
|
||||||
classBindings: {
|
classBindings: {
|
||||||
connected: '#reconnect'
|
connected: '#connectionOverlay'
|
||||||
},
|
},
|
||||||
render: function () {
|
render: function () {
|
||||||
$('head').append(templates.head());
|
$('head').append(templates.head());
|
||||||
|
@ -15,9 +15,8 @@ html, body {
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#reconnect {
|
#connectionOverlay {
|
||||||
z-index: 5000;
|
z-index: 5000;
|
||||||
position: absolute;
|
|
||||||
left: 0px;
|
left: 0px;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -25,7 +24,7 @@ html, body {
|
|||||||
background-color: rgba(0, 0, 0, .5);
|
background-color: rgba(0, 0, 0, .5);
|
||||||
}
|
}
|
||||||
|
|
||||||
#reconnect.connected {
|
#connectionOverlay {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +194,7 @@ nav.main a {
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 50px;
|
margin-top: 50px;
|
||||||
padding-top: 50px;
|
padding-top: 30px;
|
||||||
bottom: 50px;
|
bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ app.use(helmet.contentTypeOptions());
|
|||||||
|
|
||||||
var clientApp = new Moonboots({
|
var clientApp = new Moonboots({
|
||||||
main: __dirname + '/clientapp/app.js',
|
main: __dirname + '/clientapp/app.js',
|
||||||
|
templateFile: __dirname + '/clientapp/template.html',
|
||||||
developmentMode: config.isDev,
|
developmentMode: config.isDev,
|
||||||
libraries: [
|
libraries: [
|
||||||
__dirname + '/clientapp/libraries/zepto.js',
|
__dirname + '/clientapp/libraries/zepto.js',
|
||||||
|
Loading…
Reference in New Issue
Block a user