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

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

@@ -23,12 +23,6 @@
.section-body {
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 {
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 {