summaryrefslogtreecommitdiffstats
path: root/client/components/main
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-08-22 22:59:03 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-08-23 11:11:03 +0200
commitd5eec54c72b755522addc4a839810971ba24f813 (patch)
treeb3f9c1bfde7f4ebd9d2ddca54afa67783c19d983 /client/components/main
parentf315ee443061c916dc55b291bfe79503fa5e952f (diff)
downloadwekan-d5eec54c72b755522addc4a839810971ba24f813.tar.gz
wekan-d5eec54c72b755522addc4a839810971ba24f813.tar.bz2
wekan-d5eec54c72b755522addc4a839810971ba24f813.zip
Start the migration from iron-router to flow-router
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.
Diffstat (limited to 'client/components/main')
-rw-r--r--client/components/main/header.jade4
-rw-r--r--client/components/main/layouts.jade6
-rw-r--r--client/components/main/layouts.js5
-rw-r--r--client/components/main/router.js5
4 files changed, 10 insertions, 10 deletions
diff --git a/client/components/main/header.jade b/client/components/main/header.jade
index 510ef484..1185da85 100644
--- a/client/components/main/header.jade
+++ b/client/components/main/header.jade
@@ -10,13 +10,13 @@ template(name="header")
#header-quick-access
ul
li
- +linkTo(route="Boards")
+ a(href="{{pathFor 'home'}}")
span.fa.fa-home
| All boards
each currentUser.starredBoards
li.separator -
li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
- +linkTo(route="Board" data=this)
+ a(href="{{pathFor 'board' id=_id slug=slug}}")
= title
else
li.current Star a board to add a shortcut in this bar.
diff --git a/client/components/main/layouts.jade b/client/components/main/layouts.jade
index 8e6ae941..2dd3b2f2 100644
--- a/client/components/main/layouts.jade
+++ b/client/components/main/layouts.jade
@@ -8,15 +8,15 @@ template(name="userFormsLayout")
section.auth-layout
h1.at-form-landing-logo
img(src="/logo.png" title="LibreBoard")
- +yield
+ +Template.dynamic(template=content)
template(name="defaultLayout")
#surface
+header
#content
- +yield
+ +Template.dynamic(template=content)
-template(name="notfound")
+template(name="notFound")
+message(label='page-not-found')
template(name="message")
diff --git a/client/components/main/layouts.js b/client/components/main/layouts.js
new file mode 100644
index 00000000..5dbd8c91
--- /dev/null
+++ b/client/components/main/layouts.js
@@ -0,0 +1,5 @@
+Meteor.subscribe('boards');
+
+Template.userFormsLayout.onRendered(function() {
+ EscapeActions.executeAll();
+});
diff --git a/client/components/main/router.js b/client/components/main/router.js
deleted file mode 100644
index bae832e8..00000000
--- a/client/components/main/router.js
+++ /dev/null
@@ -1,5 +0,0 @@
-Router.route('/', {
- name: 'Home',
- redirectLoggedInUsers: true,
- authenticated: true
-});