mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(prejoin) improve ux
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
9f9e192c3c
commit
478f1a731e
@@ -37,6 +37,11 @@ export type Props = {
|
||||
*/
|
||||
displayName?: string,
|
||||
|
||||
/**
|
||||
* Whether or not to update the background color of the avatar
|
||||
*/
|
||||
dynamicColor?: Boolean,
|
||||
|
||||
/**
|
||||
* ID of the element, if any.
|
||||
*/
|
||||
@@ -78,6 +83,15 @@ export const DEFAULT_SIZE = 65;
|
||||
* Implements a class to render avatars in the app.
|
||||
*/
|
||||
class Avatar<P: Props> extends PureComponent<P, State> {
|
||||
/**
|
||||
* Default values for {@code Avatar} component's properties.
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
static defaultProps = {
|
||||
dynamicColor: true
|
||||
};
|
||||
|
||||
/**
|
||||
* Instantiates a new {@code Component}.
|
||||
*
|
||||
@@ -123,6 +137,7 @@ class Avatar<P: Props> extends PureComponent<P, State> {
|
||||
_loadableAvatarUrl,
|
||||
className,
|
||||
colorBase,
|
||||
dynamicColor,
|
||||
id,
|
||||
size,
|
||||
status,
|
||||
@@ -156,7 +171,10 @@ class Avatar<P: Props> extends PureComponent<P, State> {
|
||||
const initials = getInitials(_initialsBase);
|
||||
|
||||
if (initials) {
|
||||
avatarProps.color = getAvatarColor(colorBase || _initialsBase);
|
||||
if (dynamicColor) {
|
||||
avatarProps.color = getAvatarColor(colorBase || _initialsBase);
|
||||
}
|
||||
|
||||
avatarProps.initials = initials;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user