mirror of
https://github.com/sstent/node.git
synced 2026-01-27 15:41:43 +00:00
updated app
This commit is contained in:
15
node_modules/derby-examples/widgets/lib/app/ui/connectionAlert/index.html
generated
vendored
Normal file
15
node_modules/derby-examples/widgets/lib/app/ui/connectionAlert/index.html
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<connectionAlert:>
|
||||
<div class="connection">
|
||||
{#unless connected}
|
||||
<p class="alert">
|
||||
{#if canConnect}
|
||||
Offline
|
||||
{#unless :self.hideReconnect}
|
||||
– <a x-bind="click:connect">Reconnect</a>
|
||||
{/}
|
||||
{else}
|
||||
Unable to reconnect – <a x-bind="click:reload">Reload</a>
|
||||
{/}
|
||||
</p>
|
||||
{/}
|
||||
</div>
|
||||
15
node_modules/derby-examples/widgets/lib/app/ui/connectionAlert/index.js
generated
vendored
Normal file
15
node_modules/derby-examples/widgets/lib/app/ui/connectionAlert/index.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
exports.create = function(model, self) {
|
||||
|
||||
exports.connect = function() {
|
||||
// Hide the reconnect link for a second after clicking it
|
||||
self.set('hideReconnect', true)
|
||||
setTimeout(function() {
|
||||
self.set('hideReconnect', false)
|
||||
}, 1000)
|
||||
model.socket.socket.connect()
|
||||
}
|
||||
|
||||
exports.reload = function() {
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user