summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorMaxime Quandalle <mquandalle@wekan.io>2016-07-20 18:00:59 +0200
committerMaxime Quandalle <mquandalle@wekan.io>2016-07-20 18:04:16 +0200
commit27a58c18ee6bb2e859b4ecf14bb7a9c3d2379ecb (patch)
tree19b1b8cf565c7e1ea8eec8ecf3e34145c328a8c6 /client/components
parent9595ef01999764fe8c588707058f1deb7cc83fe4 (diff)
downloadwekan-27a58c18ee6bb2e859b4ecf14bb7a9c3d2379ecb.tar.gz
wekan-27a58c18ee6bb2e859b4ecf14bb7a9c3d2379ecb.tar.bz2
wekan-27a58c18ee6bb2e859b4ecf14bb7a9c3d2379ecb.zip
Implement a disconnected indicator
Fixes #451
Diffstat (limited to 'client/components')
-rw-r--r--client/components/main/header.jade9
-rw-r--r--client/components/main/header.js4
-rw-r--r--client/components/main/header.styl12
3 files changed, 25 insertions, 0 deletions
diff --git a/client/components/main/header.jade b/client/components/main/header.jade
index 711e272c..bd0af880 100644
--- a/client/components/main/header.jade
+++ b/client/components/main/header.jade
@@ -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'}}
diff --git a/client/components/main/header.js b/client/components/main/header.js
index 73024aa9..0337c72b 100644
--- a/client/components/main/header.js
+++ b/client/components/main/header.js
@@ -6,6 +6,10 @@ Template.header.helpers({
hideLogo() {
return Utils.isMiniScreen() && Session.get('currentBoard');
},
+
+ appIsOffline() {
+ return !Meteor.status().connected;
+ },
});
Template.header.events({
diff --git a/client/components/main/header.styl b/client/components/main/header.styl
index 0b2ad860..0e35d38a 100644
--- a/client/components/main/header.styl
+++ b/client/components/main/header.styl
@@ -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