Fix #467 - Make app work in offline mode
This commit is contained in:
Родитель
0954ccc822
Коммит
5684a7699b
|
@ -223,6 +223,14 @@ Model.prototype.restore = function (callback) {
|
|||
self.auth = require('./auth')();
|
||||
|
||||
var setup = false;
|
||||
|
||||
self.auth.on('error', function (err) {
|
||||
if (err.cors === 'rejected') {
|
||||
global.clearTimeout(syncTimeout);
|
||||
self.offlineConnect();
|
||||
}
|
||||
});
|
||||
|
||||
self.auth.on('verified', function (user) {
|
||||
self._logger('verified');
|
||||
if (setup) {
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
"xhr": "1.16.1",
|
||||
"gulp": "3.8.8",
|
||||
"firebase": "1.1.2",
|
||||
"webmaker-login-ux": "1.1.10"
|
||||
"webmaker-login-ux": "1.1.14",
|
||||
"font-awesome": "^4.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bulk-require": "0.2.1",
|
||||
|
|
|
@ -7,14 +7,12 @@
|
|||
|
||||
<title>Webmaker</title>
|
||||
<link rel="stylesheet" href="/styles/common.css">
|
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div v-view="currentView" class="main"></div>
|
||||
</div>
|
||||
<script src="https://login.persona.org/include.js"></script>
|
||||
<script src="/index.js"></script>
|
||||
<!-- Analytics -->
|
||||
<script>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
@import "../../node_modules/font-awesome/less/font-awesome";
|
||||
@import "normalize";
|
||||
@import "variables";
|
||||
@import "mixins";
|
||||
|
|
Загрузка…
Ссылка в новой задаче