Web:Change smallBottomLine to isFullLength.
This commit is contained in:
parent
ca4201061b
commit
cf94bc5c6f
@ -126,12 +126,14 @@ const InfoPanelHeaderContent = (props) => {
|
||||
style={{ width: "100%" }}
|
||||
data={roomsSubmenu}
|
||||
forsedActiveItemId={roomsView}
|
||||
isFullLength={true}
|
||||
/>
|
||||
) : (
|
||||
<Submenu
|
||||
style={{ width: "100%" }}
|
||||
data={personalSubmenu}
|
||||
forsedActiveItemId={fileView}
|
||||
isFullLength={true}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
@ -87,7 +87,6 @@ const SubmenuCommon = (props) => {
|
||||
data={data}
|
||||
startSelect={currentTab}
|
||||
onSelect={(e) => onSelect(e)}
|
||||
smallBottomLine
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -82,12 +82,7 @@ const Backup = ({
|
||||
return isNotPaidPeriod ? (
|
||||
<ManualBackup buttonSize={buttonSize} renderTooltip={renderTooltip} />
|
||||
) : (
|
||||
<Submenu
|
||||
data={data}
|
||||
startSelect={data[0]}
|
||||
onSelect={(e) => onSelect(e)}
|
||||
smallBottomLine
|
||||
/>
|
||||
<Submenu data={data} startSelect={data[0]} onSelect={(e) => onSelect(e)} />
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -125,7 +125,6 @@ const DataManagementWrapper = (props) => {
|
||||
data={data}
|
||||
startSelect={currentTab}
|
||||
onSelect={(e) => onSelect(e)}
|
||||
smallBottomLine
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -55,7 +55,6 @@ const DeleteData = (props) => {
|
||||
data={data}
|
||||
startSelect={currentTab}
|
||||
onSelect={(e) => onSelect(e)}
|
||||
smallBottomLine
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ const MessagesDetails = ({ eventDetails }) => {
|
||||
|
||||
return (
|
||||
<SubmenuWrapper>
|
||||
<Submenu data={menuData} startSelect={0} smallBottomLine />
|
||||
<Submenu data={menuData} startSelect={0} />
|
||||
</SubmenuWrapper>
|
||||
);
|
||||
};
|
||||
|
@ -115,12 +115,7 @@ const DeveloperToolsWrapper = (props) => {
|
||||
|
||||
return (
|
||||
<Suspense fallback={loaders[currentTab] || <AppLoader />}>
|
||||
<StyledSubmenu
|
||||
data={data}
|
||||
startSelect={currentTab}
|
||||
onSelect={onSelect}
|
||||
smallBottomLine
|
||||
/>
|
||||
<StyledSubmenu data={data} startSelect={currentTab} onSelect={onSelect} />
|
||||
</Suspense>
|
||||
);
|
||||
};
|
||||
|
@ -15,8 +15,7 @@ import SSOLoader from "./sub-components/ssoLoader";
|
||||
import SMTPSettings from "./SMTPSettings";
|
||||
|
||||
const IntegrationWrapper = (props) => {
|
||||
const { t, tReady, enablePlugins, toDefault, isSSOAvailable } =
|
||||
props;
|
||||
const { t, tReady, enablePlugins, toDefault, isSSOAvailable } = props;
|
||||
const [currentTab, setCurrentTab] = useState(0);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const navigate = useNavigate();
|
||||
@ -70,14 +69,7 @@ const IntegrationWrapper = (props) => {
|
||||
if (!isLoading && !tReady)
|
||||
return currentTab === 0 ? <SSOLoader /> : <AppLoader />;
|
||||
|
||||
return (
|
||||
<Submenu
|
||||
data={data}
|
||||
startSelect={currentTab}
|
||||
onSelect={onSelect}
|
||||
smallBottomLine
|
||||
/>
|
||||
);
|
||||
return <Submenu data={data} startSelect={currentTab} onSelect={onSelect} />;
|
||||
};
|
||||
|
||||
export default inject(({ auth, ssoStore }) => {
|
||||
|
@ -85,7 +85,6 @@ const SecurityWrapper = (props) => {
|
||||
data={data}
|
||||
startSelect={currentTab}
|
||||
onSelect={(e) => onSelect(e)}
|
||||
smallBottomLine
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ const Submenu = (props) => {
|
||||
startSelect = 0,
|
||||
forsedActiveItemId,
|
||||
onSelect,
|
||||
smallBottomLine,
|
||||
isFullLength,
|
||||
...rest
|
||||
} = props;
|
||||
if (!data) return null;
|
||||
@ -106,7 +106,7 @@ const Submenu = (props) => {
|
||||
<div className="sticky">
|
||||
<SubmenuRoot>
|
||||
<SubmenuScrollbarSize />
|
||||
<SubmenuScroller smallBottomLine={smallBottomLine}>
|
||||
<SubmenuScroller isFullLength={isFullLength}>
|
||||
<StyledSubmenuItems ref={submenuItemsRef} role="list">
|
||||
{data.map((d) => {
|
||||
const isActive =
|
||||
@ -145,14 +145,12 @@ const Submenu = (props) => {
|
||||
);
|
||||
})}
|
||||
</StyledSubmenuItems>
|
||||
{smallBottomLine && (
|
||||
{!isFullLength && (
|
||||
<StyledSubmenuBottomLine className="bottom-line" />
|
||||
)}
|
||||
</SubmenuScroller>
|
||||
</SubmenuRoot>
|
||||
{!smallBottomLine && (
|
||||
<StyledSubmenuBottomLine className="bottom-line" />
|
||||
)}
|
||||
{isFullLength && <StyledSubmenuBottomLine className="bottom-line" />}
|
||||
</div>
|
||||
<div className="sticky-indent"></div>
|
||||
|
||||
@ -166,12 +164,12 @@ const Submenu = (props) => {
|
||||
Submenu.propTypes = {
|
||||
/** List of the elements*/
|
||||
data: PropTypes.arrayOf(PropTypes.object.isRequired).isRequired,
|
||||
/** Property means whether a small width of the bottom line is used. */
|
||||
smallBottomLine: PropTypes.bool,
|
||||
/** Specifies the first item or the item's index to be displayed in the submenu. */
|
||||
startSelect: PropTypes.oneOfType([PropTypes.object, PropTypes.number]),
|
||||
/** Property that allows explicitly selecting content passed through an external operation */
|
||||
forsedActiveItemId: PropTypes.any,
|
||||
/** Property means whether a full width of the bottom line is used. */
|
||||
isFullLength: PropTypes.bool,
|
||||
/** Sets a callback function that is triggered when the submenu item is selected */
|
||||
onSelect: PropTypes.func,
|
||||
};
|
||||
|
@ -130,7 +130,7 @@ export const SubmenuScroller = styled.div`
|
||||
overflow-y: hidden;
|
||||
|
||||
${(props) =>
|
||||
props.smallBottomLine &&
|
||||
!props.isFullLength &&
|
||||
css`
|
||||
display: grid;
|
||||
flex: 0 1 auto;
|
||||
|
Loading…
Reference in New Issue
Block a user