mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fix system console plugin headers (#26196)
* Fix system console plugin headers * Fix tests
This commit is contained in:
parent
578216a5e4
commit
845f28cb76
@ -92,7 +92,9 @@ exports[`components/admin_console/SchemaAdminSettings should match snapshot with
|
||||
<div
|
||||
className="wrapper--fixed "
|
||||
>
|
||||
config
|
||||
<AdminHeader>
|
||||
config
|
||||
</AdminHeader>
|
||||
<div
|
||||
className="admin-console__wrapper"
|
||||
>
|
||||
|
@ -4,7 +4,9 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
||||
<div
|
||||
className="wrapper--fixed "
|
||||
>
|
||||
testplugin
|
||||
<AdminHeader>
|
||||
testplugin
|
||||
</AdminHeader>
|
||||
<div
|
||||
className="admin-console__wrapper"
|
||||
>
|
||||
@ -233,7 +235,9 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
||||
<div
|
||||
className="wrapper--fixed "
|
||||
>
|
||||
testplugin
|
||||
<AdminHeader>
|
||||
testplugin
|
||||
</AdminHeader>
|
||||
<div
|
||||
className="admin-console__wrapper"
|
||||
>
|
||||
@ -300,7 +304,9 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
||||
<div
|
||||
className="wrapper--fixed "
|
||||
>
|
||||
testplugin
|
||||
<AdminHeader>
|
||||
testplugin
|
||||
</AdminHeader>
|
||||
<div
|
||||
className="admin-console__wrapper"
|
||||
>
|
||||
|
@ -329,18 +329,24 @@ export class SchemaAdminSettings extends React.PureComponent<Props, State> {
|
||||
if (!this.props.schema) {
|
||||
return '';
|
||||
}
|
||||
if (!('name' in this.props.schema)) {
|
||||
return this.props.schema.id;
|
||||
|
||||
let name: string | MessageDescriptor = this.props.schema.id;
|
||||
if (('name' in this.props.schema)) {
|
||||
name = this.props.schema.name;
|
||||
}
|
||||
|
||||
if (typeof this.props.schema.name === 'string') {
|
||||
return this.props.schema.name;
|
||||
if (typeof name === 'string') {
|
||||
return (
|
||||
<AdminHeader>
|
||||
{name}
|
||||
</AdminHeader>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<AdminHeader>
|
||||
<FormattedMessage
|
||||
{...this.props.schema.name}
|
||||
{...name}
|
||||
/>
|
||||
</AdminHeader>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user