revert css changes, add new css (#30699)

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Scott Bishel
2025-04-16 08:21:00 -06:00
коммит произвёл GitHub
родитель 3df7bfca88
Коммит 583ba80c7e
4 изменённых файлов: 81 добавлений и 82 удалений

Просмотреть файл

@@ -0,0 +1,19 @@
.custom-profile-attributes {
border-top: 1px solid rgba(61, 60, 64, 0.08);
border-bottom: 1px solid rgba(61, 60, 64, 0.08);
margin-bottom: 25px;
.section-header {
padding: 24px 0px;
border-bottom: none;
.section-title {
font-size: 16px;
font-weight: bold;
}
.section-subtitle {
font-size: 14px;
}
}
}

Просмотреть файл

@@ -2,6 +2,7 @@
// See LICENSE.txt for license information. // See LICENSE.txt for license information.
import React, {useEffect, useState, memo} from 'react'; import React, {useEffect, useState, memo} from 'react';
import './custom_profile_attributes.scss';
import {FormattedMessage} from 'react-intl'; import {FormattedMessage} from 'react-intl';
import {useSelector} from 'react-redux'; import {useSelector} from 'react-redux';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
@@ -118,64 +119,67 @@ const CustomProfileAttributes: React.FC<Props> = (props: Props): JSX.Element | n
} }
return ( return (
<SettingsGroup <div className='custom-profile-attributes'>
id={props.id} <SettingsGroup
title={ id={props.id}
<FormattedMessage title={
id='admin.customProfileAttributes.title' <FormattedMessage
defaultMessage='Custom profile attributes sync' id='admin.customProfileAttributes.title'
/> defaultMessage='Custom profile attributes sync'
} />
subtitle={ }
<FormattedMessage container={false}
id='admin.customProfileAttributes.subtitle' subtitle={
defaultMessage='You can add or remove custom profile attributes by going to the <link>system properties page</link>.' <FormattedMessage
values={{ id='admin.customProfileAttributes.subtitle'
link: (msg: string) => ( defaultMessage='You can add or remove custom profile attributes by going to the <link>system properties page</link>.'
<Link values={{
to='/admin_console/site_config/system_properties' link: (msg: string) => (
> <Link
{msg} to='/admin_console/site_config/system_properties'
</Link> >
), {msg}
}} </Link>
/> ),
} }}
> />
{attributes.map((attr) => ( }
<TextSetting >
key={attr.id} {attributes.map((attr) => (
id={`custom_profile_attribute-${attr.name}`} <TextSetting
label={attr.name} key={attr.id}
value={attr.attrs?.[attributeKey] as string || ''} id={`custom_profile_attribute-${attr.name}`}
onChange={(id, newValue) => { label={attr.name}
setAttributes((prevAttrs) => prevAttrs.map((a) => { value={attr.attrs?.[attributeKey] as string || ''}
if (a.id === attr.id) { onChange={(id, newValue) => {
return { setAttributes((prevAttrs) => prevAttrs.map((a) => {
...a, if (a.id === attr.id) {
attrs: { return {
...a.attrs, ...a,
[attributeKey]: newValue, attrs: {
}, ...a.attrs,
}; [attributeKey]: newValue,
} },
return a; };
})); }
props.setSaveNeeded(); return a;
}} }));
setByEnv={false} props.setSaveNeeded();
disabled={props.isDisabled} }}
placeholder={{id: 'admin.customProfileAttr.placeholder', defaultMessage: 'E.g.: "fieldName"'}} setByEnv={false}
helpText={ disabled={props.isDisabled}
<AttributeHelpText placeholder={{id: 'admin.customProfileAttr.placeholder', defaultMessage: 'E.g.: "fieldName"'}}
attributeKey={attributeKey} helpText={
attributeName={attr.name} <AttributeHelpText
attributeType={attr.type} attributeKey={attributeKey}
/> attributeName={attr.name}
} attributeType={attr.type}
/> />
))} }
</SettingsGroup> />
))}
</SettingsGroup>
</div>
); );
}; };

Просмотреть файл

@@ -23,12 +23,6 @@
.section-body { .section-body {
padding: 28px 32px; padding: 28px 32px;
.section-header {
padding: 24px 0px;
border-top: 1px solid rgba(61, 60, 64, 0.08);
border-bottom: none;
}
} }
} }

Просмотреть файл

@@ -62,24 +62,6 @@
.admin-console__content { .admin-console__content {
max-width: 920px; max-width: 920px;
.admin-console__content {
border-bottom: 1px solid rgba(61, 60, 64, 0.08);
}
.section-header {
padding: 24px 0px;
border-top: 1px solid rgba(61, 60, 64, 0.08);
.section-title {
font-size: 16px;
font-weight: bold;
}
.section-subtitle {
font-size: 14px;
}
}
} }
.admin-console__checkbox-list { .admin-console__checkbox-list {