mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00

Motivations: * Iron-Router foces us to use Tracker.nonreactive black magic in order to avoid un-necessary re-renders; * There is a community consensus (supported by some MDG members) that the flow-router API is easier to reason about; * The useraccounts now supports flow router (that was a blocking element when I considered the switch ~3months ago) On the server we use the Picker router, as encouraged by the Kadira team (which develop both Flow and Picker routers). In the current state of things there are some bugs related to the missing Loading architecure. Previously onRendered callback where always called when the data the component needed was available, now we have to handle this ourselves, which we will in a following commit.
41 lines
1.3 KiB
Text
41 lines
1.3 KiB
Text
template(name="header")
|
|
#header(class=currentBoard.colorClass)
|
|
//-
|
|
If the user is connected we display a small "quick-access" top bar that
|
|
list all starred boards with a link to go there. This is inspired by the
|
|
Reddit "subreddit" bar.
|
|
The first link goes to the boards page.
|
|
unless isSandstorm
|
|
if currentUser
|
|
#header-quick-access
|
|
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 Star a board to add a shortcut in this bar.
|
|
|
|
li
|
|
a.js-create-board
|
|
i.fa.fa-plus(title="Create a new board")
|
|
|
|
+headerUserBar
|
|
|
|
//-
|
|
The main bar is a colorful bar that provide all the meta-data for the
|
|
current page. This bar is contextual based.
|
|
If the user is not connected we display "sign in" and "log in" buttons.
|
|
#header-main-bar
|
|
if $.Session.get 'currentBoard'
|
|
+headerBoard
|
|
else
|
|
+headerTitle
|
|
|
|
template(name="headerTitle")
|
|
h1 LibreBoard
|