From 8bd7a77d445ba8bbcf4e75c8dcbc93e0c08a2eba Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Thu, 11 Jul 2019 09:59:03 +0200 Subject: [PATCH] Only use 3-pane layout when profile selected Later it can be used for contribution details and other things, too. --- app/controllers/dashboard.js | 3 +++ app/routes/dashboard/contributors/show.js | 12 +++++++++++- app/templates/dashboard.hbs | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/controllers/dashboard.js b/app/controllers/dashboard.js index 5bf9a5a..caccbb6 100644 --- a/app/controllers/dashboard.js +++ b/app/controllers/dashboard.js @@ -5,6 +5,9 @@ import { inject as service } from '@ember/service'; export default Controller.extend({ kredits: service(), + + showDetailsPane: false, + currentBlock: alias('kredits.currentBlock'), contributions: alias('kredits.contributions'), diff --git a/app/routes/dashboard/contributors/show.js b/app/routes/dashboard/contributors/show.js index 0101ab9..b301518 100644 --- a/app/routes/dashboard/contributors/show.js +++ b/app/routes/dashboard/contributors/show.js @@ -7,8 +7,18 @@ export default Route.extend({ kredits: service(), contributors: alias('kredits.contributors'), - model(params) { + model (params) { return this.contributors.findBy('id', params.id); + }, + + activate () { + this.controllerFor('dashboard') + .set('showDetailsPane', true); + }, + + deactivate () { + this.controllerFor('dashboard') + .set('showDetailsPane', false); } }); diff --git a/app/templates/dashboard.hbs b/app/templates/dashboard.hbs index 4a4a273..ba85e93 100644 --- a/app/templates/dashboard.hbs +++ b/app/templates/dashboard.hbs @@ -1,4 +1,4 @@ -
+