-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1719 from jrjohnson/980-userprofile
Add user profile screen
- Loading branch information
Showing
28 changed files
with
478 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Ember from 'ember'; | ||
|
||
const { computed, RSVP } = Ember; | ||
const { Promise } = RSVP; | ||
|
||
export default Ember.Component.extend({ | ||
classNames: ['my-profile'], | ||
user: null, | ||
roles: computed('user.roles.[]', function(){ | ||
const user = this.get('user'); | ||
return new Promise(resolve => { | ||
user.get('roles').then(roles => { | ||
resolve(roles.mapBy('title')); | ||
}); | ||
}) | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Ember from 'ember'; | ||
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin'; | ||
|
||
const { service } = Ember.inject; | ||
|
||
export default Ember.Route.extend(AuthenticatedRouteMixin, { | ||
currentUser: service(), | ||
model(){ | ||
return this.get('currentUser').get('model'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
@import 'mixins/ilios-form'; | ||
@import 'mixins/profile'; | ||
@import 'mixins/header'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
@mixin header () { | ||
$header-height: 60px; | ||
|
||
background-color: $ilios-orange; | ||
border-bottom: 1px solid darken($ilios-orange, 10); | ||
height: $header-height; | ||
min-width: 250px; | ||
text-align: center; | ||
vertical-align: bottom; | ||
width: 100%; | ||
z-index: 100; | ||
|
||
.logo { | ||
float: left; | ||
max-height: $header-height; | ||
padding-left: 1em; | ||
|
||
.image { | ||
background-image: url('images/ilios-logo.png'); | ||
background-repeat: no-repeat; | ||
display: block; | ||
height: 42px; | ||
padding: .8em 0; | ||
width: 84px; | ||
} | ||
} | ||
|
||
h1 { | ||
color: $white; | ||
display: inline-block; | ||
font-size: $base-font-size * .75; | ||
margin-top: 2em; | ||
|
||
@include media($medium-screen) { | ||
font-size: $base-font-size * 1.5; | ||
margin: .5em; | ||
} | ||
} | ||
|
||
// Elements on the far right | ||
.tools { | ||
background: transparent; | ||
display: block; | ||
float: right; | ||
padding-left: .5em; | ||
padding-right: 1em; | ||
|
||
.user, | ||
.locales { | ||
color: $ilios-orange; | ||
display: inline; | ||
float: left; | ||
font-size: $base-font-size * .8; | ||
font-weight: 800; | ||
margin-top: 1.2em; | ||
padding: .4em .5em; | ||
|
||
.button { | ||
background-color: transparent; | ||
border: 0; | ||
border-radius: $base-border-radius; | ||
color: $white; | ||
font-weight: normal; | ||
padding: .5em 2em .5em 1em; | ||
vertical-align: middle; | ||
|
||
span { | ||
display: none; | ||
|
||
@include media($medium-screen) { | ||
display: inline; | ||
} | ||
} | ||
|
||
&:hover { | ||
background-color: $white; | ||
color: $ilios-orange; | ||
} | ||
|
||
|
||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.