summaryrefslogtreecommitdiffstats
path: root/client/components/main
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/main')
-rw-r--r--client/components/main/editor.jade5
-rwxr-xr-xclient/components/main/editor.js21
-rw-r--r--client/components/main/header.jade44
-rw-r--r--client/components/main/header.js21
-rw-r--r--client/components/main/header.styl34
-rw-r--r--client/components/main/layouts.jade1
-rw-r--r--client/components/main/layouts.js16
-rw-r--r--client/components/main/layouts.styl5
8 files changed, 94 insertions, 53 deletions
diff --git a/client/components/main/editor.jade b/client/components/main/editor.jade
index f10d64a1..31f533e6 100644
--- a/client/components/main/editor.jade
+++ b/client/components/main/editor.jade
@@ -9,6 +9,5 @@ template(name="editor")
template(name="viewer")
.viewer
+mentions
- +emoji
- +markdown
- {{> UI.contentBlock }}
+ +markdown
+ {{> UI.contentBlock }}
diff --git a/client/components/main/editor.js b/client/components/main/editor.js
index 5987b772..888fbe00 100755
--- a/client/components/main/editor.js
+++ b/client/components/main/editor.js
@@ -4,25 +4,6 @@ Template.editor.onRendered(() => {
autosize($textarea);
$textarea.escapeableTextComplete([
- // Emoji
- {
- match: /\B:([\-+\w]*)$/,
- search(term, callback) {
- callback(Emoji.values.map((emoji) => {
- return emoji.includes(term) ? emoji : null;
- }).filter(Boolean));
- },
- template(value) {
- const imgSrc = Emoji.baseImagePath + value;
- const image = `<img src="${imgSrc}.png" />`;
- return image + value;
- },
- replace(value) {
- return `:${value}:`;
- },
- index: 1,
- },
-
// User mentions
{
match: /\B@([\w.]*)$/,
@@ -47,7 +28,7 @@ Template.editor.onRendered(() => {
import sanitizeXss from 'xss';
// XXX I believe we should compute a HTML rendered field on the server that
-// would handle markdown, emoji and user mentions. We can simply have two
+// would handle markdown and user mentions. We can simply have two
// fields, one source, and one compiled version (in HTML) and send only the
// compiled version to most users -- who don't need to edit.
// In the meantime, all the transformation are done on the client using the
diff --git a/client/components/main/header.jade b/client/components/main/header.jade
index bd0af880..dd071b3e 100644
--- a/client/components/main/header.jade
+++ b/client/components/main/header.jade
@@ -7,19 +7,31 @@ template(name="header")
unless isSandstorm
if currentUser
#header-quick-access(class=currentBoard.colorClass)
- ul
- li
- a(href="{{pathFor 'home'}}")
- span.fa.fa-home
- | {{_ 'all-boards'}}
- each currentUser.starredBoards
- li.separator -
- li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
- a(href="{{pathFor 'board' id=_id slug=slug}}")
- = title
- else
- li.current {{_ 'quick-access-description'}}
+ if isMiniScreen
+ ul
+ li
+ a(href="{{pathFor 'home'}}")
+ span.fa.fa-home
+ if currentList
+ each currentBoard.lists
+ li(class="{{#if $.Session.equals 'currentList' _id}}current{{/if}}")
+ a.js-select-list
+ = title
+ #header-new-board-icon
+ else
+ ul
+ li
+ a(href="{{pathFor 'home'}}")
+ span.fa.fa-home
+ | {{_ 'all-boards'}}
+ each currentUser.starredBoards
+ li.separator -
+ li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
+ a(href="{{pathFor 'board' id=_id slug=slug}}")
+ = title
+ else
+ li.current {{_ 'quick-access-description'}}
a#header-new-board-icon.js-create-board
i.fa.fa-plus(title="Create a new board")
@@ -49,6 +61,14 @@ template(name="header")
if appIsOffline
+offlineWarning
+ if currentUser.isBoardMember
+ 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..7fbc5716 100644
--- a/client/components/main/header.js
+++ b/client/components/main/header.js
@@ -1,3 +1,6 @@
+Meteor.subscribe('user-admin');
+Meteor.subscribe('boards');
+
Template.header.helpers({
wrappedHeader() {
return !Session.get('currentBoard');
@@ -10,8 +13,26 @@ Template.header.helpers({
appIsOffline() {
return !Meteor.status().connected;
},
+
+ hasAnnouncement() {
+ const announcements = Announcements.findOne();
+ return announcements && announcements.enabled;
+ },
+
+ announcement() {
+ $('.announcement').show();
+ const announcements = Announcements.findOne();
+ return announcements && announcements.body;
+ },
});
Template.header.events({
'click .js-create-board': Popup.open('headerBarCreateBoard'),
+ 'click .js-close-announcement'() {
+ $('.announcement').hide();
+ },
+ 'click .js-select-list'() {
+ Session.set('currentList', this._id);
+ Session.set('currentCard', null);
+ },
});
diff --git a/client/components/main/header.styl b/client/components/main/header.styl
index 0e35d38a..f9455f8e 100644
--- a/client/components/main/header.styl
+++ b/client/components/main/header.styl
@@ -4,6 +4,7 @@
color: white
transition: background-color 0.4s
background: #2980B9
+ z-index: 17
#header-main-bar
height: 40px
@@ -28,13 +29,12 @@
font-size: 0.9em
margin-right: 10px
-
.wekan-logo
- display: block
- margin: 3px auto 0
+ margin: 3px auto auto
width: 97px
opacity: 0.6
transition: opacity 0.15s
+ float: right
&:hover
opacity: 0.9
@@ -99,6 +99,7 @@
height: 28px
font-size: 12px
display: flex
+ z-index: 17
#header-user-bar,
#header-new-board-icon,
@@ -191,12 +192,35 @@
bottom: 0px
ul
- width: calc(100% - 150px)
+ width: calc(100% - 60px)
overflow: ellipsis
+ padding: 10px
+ margin: -10px
li
- height: 28px
+ height: 100%
+ padding: 12px 0px
+ margin: -10px 0px
+
+ a
+ height: 100%
+ padding: 12px 10px
+ margin: -10px 0px
+
+ .fa-home
+ font-size: 26px
+ margin-top: -2px
+
+ #header-new-board-icon
+ display: none
+
+ #header-user-bar
+ position: absolute
+ right: 0px
+ padding: 10px
+ margin: -10px
+.announcement,
.offline-warning
width: 100%
text-align: center
diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade
index a51a35e0..4d76aabb 100644
--- a/client/components/main/layouts.jade
+++ b/client/components/main/layouts.jade
@@ -8,6 +8,7 @@ head
difficult to do that cleanly with Blaze -- at least without adding extra
packages.
link(rel="shortcut icon" href="/wekan-favicon.png")
+ link(rel="apple-touch-icon" href="/wekan-favicon.png")
link(rel="manifest" href="/wekan-manifest.json")
template(name="userFormsLayout")
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
index 1936d7aa..f12718a7 100644
--- a/client/components/main/layouts.js
+++ b/client/components/main/layouts.js
@@ -1,7 +1,3 @@
-Meteor.subscribe('boards');
-Meteor.subscribe('setting');
-Meteor.subscribe('user-admin');
-
BlazeLayout.setRoot('body');
const i18nTagToT9n = (i18nTag) => {
@@ -21,10 +17,14 @@ Template.userFormsLayout.onRendered(() => {
Template.userFormsLayout.helpers({
languages() {
return _.map(TAPi18n.getLanguages(), (lang, code) => {
- return {
- tag: code,
- name: lang.name === 'br' ? 'Brezhoneg' : lang.name,
- };
+ const tag = code;
+ let name = lang.name;
+ if (lang.name === 'br') {
+ name = 'Brezhoneg';
+ } else if (lang.name === 'ig') {
+ name = 'Igbo';
+ }
+ return { tag, name };
}).sort(function(a, b) {
if (a.name === b.name) {
return 0;
diff --git a/client/components/main/layouts.styl b/client/components/main/layouts.styl
index 734a5e83..a79ff337 100644
--- a/client/components/main/layouts.styl
+++ b/client/components/main/layouts.styl
@@ -270,11 +270,6 @@ kbd
.grabbing
cursor: grabbing
-.emoji
- height: 18px
- width: 18px
- vertical-align: text-bottom
-
// Implement a thiner close icon as suggested in
// https://github.com/FortAwesome/Font-Awesome/issues/1540#issuecomment-68689950
.fa.fa-times-thin:before