summaryrefslogtreecommitdiffstats
path: root/client/components/main
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/main')
-rw-r--r--client/components/main/header.jade7
-rw-r--r--client/components/main/header.js14
-rw-r--r--client/components/main/header.styl1
3 files changed, 22 insertions, 0 deletions
diff --git a/client/components/main/header.jade b/client/components/main/header.jade
index bd0af880..613dd736 100644
--- a/client/components/main/header.jade
+++ b/client/components/main/header.jade
@@ -49,6 +49,13 @@ template(name="header")
if appIsOffline
+offlineWarning
+ if hasAnnouncement
+ .announcement
+ p
+ i.fa.fa-bullhorn
+ | #{announcement}
+ i.fa.fa-times-circle.js-close-announcement
+
template(name="offlineWarning")
.offline-warning
p
diff --git a/client/components/main/header.js b/client/components/main/header.js
index 49acbfef..3b724651 100644
--- a/client/components/main/header.js
+++ b/client/components/main/header.js
@@ -10,8 +10,22 @@ Template.header.helpers({
appIsOffline() {
return !Meteor.status().connected;
},
+
+ hasAnnouncement() {
+ const notice = Notices.findOne();
+ return notice && notice.enabled;
+ },
+
+ announcement() {
+ $('.announcement').show();
+ const notice = Notices.findOne();
+ return notice && notice.body;
+ },
});
Template.header.events({
'click .js-create-board': Popup.open('headerBarCreateBoard'),
+ 'click .js-close-announcement'() {
+ $('.announcement').hide();
+ },
});
diff --git a/client/components/main/header.styl b/client/components/main/header.styl
index 0e35d38a..191e8893 100644
--- a/client/components/main/header.styl
+++ b/client/components/main/header.styl
@@ -197,6 +197,7 @@
li
height: 28px
+.announcement,
.offline-warning
width: 100%
text-align: center