Commit 8b076d92 by Patrick O'Carroll

fixes for avatar on adding permission and size for gicon

parent 32264c61
......@@ -39,7 +39,7 @@ class AddPermissions extends Component<IProps, any> {
permissions.newItem.setUser(null, null);
return;
}
return permissions.newItem.setUser(user.id, user.login);
return permissions.newItem.setUser(user.id, user.login, user.avatarUrl);
}
teamPicked(team: Team) {
......
......@@ -13,7 +13,7 @@ export default class DisabledPermissionListItem extends Component<IProps, any> {
return (
<tr className="gf-form-disabled">
<td style={{ width: '1%' }}>
<i style={{ width: '25px' }} className="gicon gicon-shield" />
<i style={{ width: '25px', fontSize: '1.5rem' }} className="gicon gicon-shield" />
</td>
<td style={{ width: '90%' }}>
{item.name}
......
......@@ -28,6 +28,7 @@ function ItemDescription({ item }) {
}
export default observer(({ item, removeItem, permissionChanged, itemIndex, folderInfo }) => {
console.log(item);
const handleRemoveItem = evt => {
evt.preventDefault();
removeItem(itemIndex);
......@@ -38,7 +39,6 @@ export default observer(({ item, removeItem, permissionChanged, itemIndex, folde
};
const inheritedFromRoot = item.dashboardId === -1 && folderInfo && folderInfo.id === 0;
console.log(item.name);
return (
<tr className={setClassNameHelper(item.inherited)}>
......
......@@ -30,6 +30,7 @@ export const NewPermissionsItem = types
),
userId: types.maybe(types.number),
userLogin: types.maybe(types.string),
userAvatarUrl: types.maybe(types.string),
teamId: types.maybe(types.number),
team: types.maybe(types.string),
permission: types.optional(types.number, 1),
......@@ -50,9 +51,10 @@ export const NewPermissionsItem = types
},
}))
.actions(self => ({
setUser(userId: number, userLogin: string) {
setUser(userId: number, userLogin: string, userAvatarUrl: string) {
self.userId = userId;
self.userLogin = userLogin;
self.userAvatarUrl = userAvatarUrl;
self.teamId = null;
self.team = null;
},
......@@ -121,6 +123,7 @@ export const PermissionsStore = types
teamId: undefined,
userLogin: undefined,
userId: undefined,
userAvatarUrl: undefined,
role: undefined,
};
switch (self.newItem.type) {
......@@ -131,6 +134,7 @@ export const PermissionsStore = types
case aclTypeValues.USER.value:
item.userLogin = self.newItem.userLogin;
item.userId = self.newItem.userId;
item.userAvatarUrl = self.newItem.userAvatarUrl;
break;
case aclTypeValues.VIEWER.value:
case aclTypeValues.EDITOR.value:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment