MM-62545 Pin bottom actions and top line (#29860)
* pin bottom actions and top line. * lint fixes * lint fixes --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e8eb279874
Коммит
8ad375365e
@@ -15,18 +15,30 @@ $profilePopoverBorderWidth: 1px;
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: var(--center-channel-bg);
|
background: var(--center-channel-bg);
|
||||||
box-shadow: var(--elevation-4);
|
box-shadow: var(--elevation-4);
|
||||||
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
.user-profile-popover-title {
|
.user-profile-popover_container {
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-profile-popover-title {
|
||||||
|
position: sticky;
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
max-width: calc($profilePopoverWidth - 40px);
|
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
|
justify-content: space-between;
|
||||||
padding: 12px 8px 12px 8px;
|
padding: 12px 8px 12px 8px;
|
||||||
|
background: var(--center-channel-bg);
|
||||||
|
|
||||||
.user-popover__role {
|
.user-popover__role {
|
||||||
|
max-width: calc($profilePopoverWidth - 40px);
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
background: unset;
|
background: unset;
|
||||||
padding-inline-start: 8px;
|
padding-inline-start: 8px;
|
||||||
@@ -196,7 +208,6 @@ $profilePopoverBorderWidth: 1px;
|
|||||||
padding: 0 16px 12px 16px;
|
padding: 0 16px 12px 16px;
|
||||||
|
|
||||||
.user-popover__subtitle {
|
.user-popover__subtitle {
|
||||||
display: flex;
|
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -239,6 +250,12 @@ $profilePopoverBorderWidth: 1px;
|
|||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-profile-popover-bottom-row {
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
background: var(--center-channel-bg);
|
||||||
|
|
||||||
.user-popover__bottom-row-container {
|
.user-popover__bottom-row-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ const ProfilePopover = ({
|
|||||||
const fullname = overwriteName || Utils.getFullName(user);
|
const fullname = overwriteName || Utils.getFullName(user);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<div className='user-profile-popover_container'>
|
||||||
<ProfilePopoverTitle
|
<ProfilePopoverTitle
|
||||||
channelId={channelId}
|
channelId={channelId}
|
||||||
isBot={user.is_bot}
|
isBot={user.is_bot}
|
||||||
@@ -211,6 +211,8 @@ const ProfilePopover = ({
|
|||||||
returnFocus={handleReturnFocus}
|
returnFocus={handleReturnFocus}
|
||||||
hide={hide}
|
hide={hide}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
<div className='user-profile-popover-bottom-row'>
|
||||||
<hr className='user-popover__bottom-row-hr'/>
|
<hr className='user-popover__bottom-row-hr'/>
|
||||||
<ProfilePopoverOverrideDisclaimer
|
<ProfilePopoverOverrideDisclaimer
|
||||||
haveOverrideProp={haveOverrideProp}
|
haveOverrideProp={haveOverrideProp}
|
||||||
@@ -242,7 +244,7 @@ const ProfilePopover = ({
|
|||||||
status={hideStatus ? null : status}
|
status={hideStatus ? null : status}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
useDismiss,
|
useDismiss,
|
||||||
useInteractions,
|
useInteractions,
|
||||||
useRole,
|
useRole,
|
||||||
|
shift,
|
||||||
FloatingFocusManager,
|
FloatingFocusManager,
|
||||||
FloatingOverlay,
|
FloatingOverlay,
|
||||||
FloatingPortal,
|
FloatingPortal,
|
||||||
@@ -82,7 +83,7 @@ export function ProfilePopoverController<TriggerComponentType = HTMLSpanElement>
|
|||||||
open: isOpen,
|
open: isOpen,
|
||||||
onOpenChange: setOpen,
|
onOpenChange: setOpen,
|
||||||
whileElementsMounted: autoUpdate,
|
whileElementsMounted: autoUpdate,
|
||||||
middleware: [autoPlacement()],
|
middleware: [autoPlacement(), shift()],
|
||||||
});
|
});
|
||||||
|
|
||||||
const {isMounted, styles: transitionStyles} = useTransitionStyles(floatingContext, TRANSITION_STYLE_PROPS);
|
const {isMounted, styles: transitionStyles} = useTransitionStyles(floatingContext, TRANSITION_STYLE_PROPS);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user