Skip to content

Commit

Permalink
Implement a disconnected indicator
Browse files Browse the repository at this point in the history
Fixes #451
  • Loading branch information
Maxime Quandalle committed Jul 20, 2016
1 parent 9595ef0 commit 27a58c1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .meteor/.gitignore
@@ -1 +1,2 @@
dev_bundle
local
9 changes: 9 additions & 0 deletions client/components/main/header.jade
Expand Up @@ -45,3 +45,12 @@ template(name="header")
else
a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")

if appIsOffline
+offlineWarning

template(name="offlineWarning")
.offline-warning
p
i.fa.fa-warning
| {{_ 'app-is-offline'}}
4 changes: 4 additions & 0 deletions client/components/main/header.js
Expand Up @@ -6,6 +6,10 @@ Template.header.helpers({
hideLogo() {
return Utils.isMiniScreen() && Session.get('currentBoard');
},

appIsOffline() {
return !Meteor.status().connected;
},
});

Template.header.events({
Expand Down
12 changes: 12 additions & 0 deletions client/components/main/header.styl
Expand Up @@ -196,3 +196,15 @@

li
height: 28px

.offline-warning
width: 100%
text-align: center
padding: 0
margin: 0
background: #F8ECBD
clear: both

p
margin: 7px
padding: 0
1 change: 1 addition & 0 deletions i18n/en.i18n.json
Expand Up @@ -51,6 +51,7 @@
"all-boards": "All boards",
"and-n-other-card": "And __count__ other card",
"and-n-other-card_plural": "And __count__ other cards",
"app-is-offline": "The application is currently offline, refreshing the page will cause data loss.",
"archive": "Archive",
"archive-all": "Archive All",
"archive-board": "Archive Board",
Expand Down

0 comments on commit 27a58c1

Please sign in to comment.