feat: enhance user profile customization with avatar border color and gradient options
- Added support for setting avatar border color and gradient in user profile settings. - Introduced new hooks for managing user profile styles and fetching metadata from avatars. - Implemented an AngleSelector component for selecting gradient direction. - Updated RoomNavItem to display parent space information for direct messages. - Improved caching mechanism for user banners and profile styles. - Refactored image metadata handling to include new profile style attributes.
This commit is contained in:
@@ -18,9 +18,28 @@ import { embedColorInWebP, extractColorFromWebP, removeColorFromWebP } from './w
|
||||
import { embedColorInJPEG, extractColorFromJPEG, removeColorFromJPEG } from './jpegMetadata';
|
||||
import { embedColorInGIF, extractColorFromGIF, removeColorFromGIF } from './gifMetadata';
|
||||
|
||||
/**
|
||||
* Gradient configuration for profile styling
|
||||
* All colors support RGBA format (e.g., #FF550080 for 50% opacity)
|
||||
*/
|
||||
export type ProfileGradient = {
|
||||
/** CSS gradient direction (e.g., "to bottom", "45deg", "to bottom right") */
|
||||
direction: string;
|
||||
/** Start color in hex format with optional alpha (#RRGGBB or #RRGGBBAA) */
|
||||
startColor: string;
|
||||
/** End color in hex format with optional alpha (#RRGGBB or #RRGGBBAA) */
|
||||
stopColor: string;
|
||||
};
|
||||
|
||||
export type ImageMetadata = {
|
||||
/** Profile name color */
|
||||
color?: string;
|
||||
/** Banner MXC URL */
|
||||
banner?: string;
|
||||
/** Avatar border color with optional transparency (#RRGGBB or #RRGGBBAA) */
|
||||
avatarBorderColor?: string;
|
||||
/** Profile card gradient */
|
||||
gradient?: ProfileGradient;
|
||||
};
|
||||
|
||||
/** PNG signature bytes */
|
||||
|
||||
Reference in New Issue
Block a user