Only use 3-pane layout when profile selected
Later it can be used for contribution details and other things, too.
This commit is contained in:
@@ -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'),
|
||||
|
||||
@@ -9,6 +9,16 @@ export default Route.extend({
|
||||
|
||||
model (params) {
|
||||
return this.contributors.findBy('id', params.id);
|
||||
},
|
||||
|
||||
activate () {
|
||||
this.controllerFor('dashboard')
|
||||
.set('showDetailsPane', true);
|
||||
},
|
||||
|
||||
deactivate () {
|
||||
this.controllerFor('dashboard')
|
||||
.set('showDetailsPane', false);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<main id="dashboard" class="with-details">
|
||||
<main id="dashboard" class={{if showDetailsPane "with-details"}}>
|
||||
|
||||
<div id="stats">
|
||||
<section id="people">
|
||||
|
||||
Reference in New Issue
Block a user