-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update avatar URL for a user + refactoring #15
base: master
Are you sure you want to change the base?
Changes from 1 commit
1f7c30e
26ff9ad
95329db
7de4b52
5180ae4
973b9c9
16c5db4
d733e46
69dd6bd
08cdba7
88b50c6
c8934be
627ee88
f8c5fe3
f03348f
43a41ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<fieldset> | ||
<legend>Edit user {{user.userName}}</legend> | ||
<div class="pull-right"> | ||
<img ng-src="http://srv-ind-scrat:8060/avatar/{{user.userName}}?s=40" /> | ||
<img ng-src="{{user.avatarURL}}?s=40" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As the username is filled in this form, the {{user.userName}} is updated dynamically. Do you have a specific use case for changing the way of setting the avatar link? In case you put a size on the image tags and get the avatar from a different location, then it will still be displayed with the right size. |
||
</div> | ||
<div class="form-group" ng-class="{'has-error': myForm.userName.$invalid}"> | ||
<label for="userName" class="col-sm-2 control-label">Username</label> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the ?s=number be part of this code as well? That'd make it trivial to switch to another avatar source (like Jira).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The required size of the avatar (requested with the ?s=number GET parameter) is dependent on the location where it is used. Currently three times 32, and one time 40.
If you really think it is valuable to make that split right now, maybe 'avatarURLSmall' and avatarURLMedium' or something like that can be introduced for that.