-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5999867
commit 17dd6c8
Showing
55 changed files
with
97,920 additions
and
6,987 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
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,9 @@ | ||
export type AuthServerType = 'SNAuth' | 'IdentityServer' | ||
|
||
export interface AuthenticationConfig { | ||
authType: AuthServerType | ||
} | ||
|
||
export const defaultAuthConfig: AuthenticationConfig = { | ||
authType: 'SNAuth', | ||
} |
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,28 +1,29 @@ | ||
import Avatar, { AvatarProps } from '@material-ui/core/Avatar' | ||
import { PathHelper } from '@sensenet/client-utils' | ||
import { User } from '@sensenet/default-content-types' | ||
import { User as SNUser } from '@sensenet/sn-auth-react' | ||
import React, { CSSProperties, FC } from 'react' | ||
|
||
export const UserAvatar: FC<{ | ||
user: User | ||
user: User | SNUser | null | undefined | ||
avatarProps?: AvatarProps | ||
style?: CSSProperties | ||
repositoryUrl: string | ||
}> = (props) => { | ||
const avatarUrl = props.user.Avatar?.Url | ||
const avatarUrl = props.user?.Avatar?.Url | ||
if (avatarUrl) { | ||
return ( | ||
<Avatar | ||
src={PathHelper.joinPaths(props.repositoryUrl, avatarUrl)} | ||
alt={props.user.DisplayName} | ||
alt={props.user?.DisplayName} | ||
{...props.avatarProps} | ||
style={props.style} | ||
/> | ||
) | ||
} | ||
return ( | ||
<Avatar style={props.style}> | ||
{(props.user.DisplayName && props.user.DisplayName[0]) || (props.user.Name && props.user.Name[0]) || 'U'} | ||
{(props.user?.DisplayName && props.user.DisplayName[0]) || (props.user?.Name && props.user.Name[0]) || 'U'} | ||
</Avatar> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,22 +1,25 @@ | ||
import { Tab as MuiTab, withStyles } from '@material-ui/core' | ||
|
||
export const Tab = withStyles((theme) => ({ | ||
root: { | ||
textTransform: 'none', | ||
minWidth: 72, | ||
fontWeight: theme.typography.fontWeightRegular, | ||
marginRight: theme.spacing(4), | ||
'&:hover': { | ||
color: theme.palette.primary.main, | ||
opacity: 1, | ||
}, | ||
'&$selected': { | ||
color: theme.palette.primary.main, | ||
fontWeight: theme.typography.fontWeightMedium, | ||
}, | ||
'&:focus': { | ||
color: theme.palette.primary.main, | ||
}, | ||
}, | ||
selected: {}, | ||
}))(MuiTab) | ||
export const Tab = withStyles( | ||
(theme) => | ||
({ | ||
root: { | ||
textTransform: 'none', | ||
minWidth: 72, | ||
fontWeight: theme.typography.fontWeightRegular, | ||
marginRight: theme.spacing(4), | ||
'&:hover': { | ||
color: theme.palette.primary.main, | ||
opacity: 1, | ||
}, | ||
'&$selected': { | ||
color: theme.palette.primary.main, | ||
fontWeight: theme.typography.fontWeightMedium, | ||
}, | ||
'&:focus': { | ||
color: theme.palette.primary.main, | ||
}, | ||
}, | ||
selected: {}, | ||
} as any), | ||
)(MuiTab) |
Oops, something went wrong.