[MM-56848] Convert ./components/admin_console/settings_group.tsx from Class Component to Function Component (#26258)
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e0f3713bdf
Коммит
6ba3ac4a02
@@ -15,7 +15,7 @@ exports[`components/BleveSettings should match snapshot, disabled 1`] = `
|
|||||||
id="admin.bleve.title"
|
id="admin.bleve.title"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
disabled={false}
|
disabled={false}
|
||||||
falseText={
|
falseText={
|
||||||
@@ -207,7 +207,7 @@ exports[`components/BleveSettings should match snapshot, disabled 1`] = `
|
|||||||
}
|
}
|
||||||
value={false}
|
value={false}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
@@ -266,7 +266,7 @@ exports[`components/BleveSettings should match snapshot, enabled 1`] = `
|
|||||||
id="admin.bleve.title"
|
id="admin.bleve.title"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
disabled={false}
|
disabled={false}
|
||||||
falseText={
|
falseText={
|
||||||
@@ -458,7 +458,7 @@ exports[`components/BleveSettings should match snapshot, enabled 1`] = `
|
|||||||
}
|
}
|
||||||
value={false}
|
value={false}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ exports[`components/ClusterSettings should match snapshot, compression disabled
|
|||||||
id="admin.advance.cluster"
|
id="admin.advance.cluster"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<Memo(ClusterTableContainer) />
|
<Memo(ClusterTableContainer) />
|
||||||
<div
|
<div
|
||||||
className="banner"
|
className="banner"
|
||||||
@@ -249,7 +249,7 @@ exports[`components/ClusterSettings should match snapshot, compression disabled
|
|||||||
}
|
}
|
||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
@@ -308,7 +308,7 @@ exports[`components/ClusterSettings should match snapshot, compression enabled 1
|
|||||||
id="admin.advance.cluster"
|
id="admin.advance.cluster"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<Memo(ClusterTableContainer) />
|
<Memo(ClusterTableContainer) />
|
||||||
<div
|
<div
|
||||||
className="banner"
|
className="banner"
|
||||||
@@ -542,7 +542,7 @@ exports[`components/ClusterSettings should match snapshot, compression enabled 1
|
|||||||
}
|
}
|
||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
@@ -601,7 +601,7 @@ exports[`components/ClusterSettings should match snapshot, encryption disabled 1
|
|||||||
id="admin.advance.cluster"
|
id="admin.advance.cluster"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<Memo(ClusterTableContainer) />
|
<Memo(ClusterTableContainer) />
|
||||||
<div
|
<div
|
||||||
className="banner"
|
className="banner"
|
||||||
@@ -835,7 +835,7 @@ exports[`components/ClusterSettings should match snapshot, encryption disabled 1
|
|||||||
}
|
}
|
||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
@@ -894,7 +894,7 @@ exports[`components/ClusterSettings should match snapshot, encryption enabled 1`
|
|||||||
id="admin.advance.cluster"
|
id="admin.advance.cluster"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<Memo(ClusterTableContainer) />
|
<Memo(ClusterTableContainer) />
|
||||||
<div
|
<div
|
||||||
className="banner"
|
className="banner"
|
||||||
@@ -1128,7 +1128,7 @@ exports[`components/ClusterSettings should match snapshot, encryption enabled 1`
|
|||||||
}
|
}
|
||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ exports[`components/DatabaseSettings should match snapshot 1`] = `
|
|||||||
id="admin.database.title"
|
id="admin.database.title"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="banner"
|
className="banner"
|
||||||
>
|
>
|
||||||
@@ -422,7 +422,7 @@ exports[`components/DatabaseSettings should match snapshot 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ exports[`components/ElasticSearchSettings should match snapshot, disabled 1`] =
|
|||||||
id="admin.elasticsearch.title"
|
id="admin.elasticsearch.title"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
disabled={false}
|
disabled={false}
|
||||||
falseText={
|
falseText={
|
||||||
@@ -462,7 +462,7 @@ exports[`components/ElasticSearchSettings should match snapshot, disabled 1`] =
|
|||||||
}
|
}
|
||||||
value={false}
|
value={false}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
@@ -521,7 +521,7 @@ exports[`components/ElasticSearchSettings should match snapshot, enabled 1`] = `
|
|||||||
id="admin.elasticsearch.title"
|
id="admin.elasticsearch.title"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
disabled={false}
|
disabled={false}
|
||||||
falseText={
|
falseText={
|
||||||
@@ -967,7 +967,7 @@ exports[`components/ElasticSearchSettings should match snapshot, enabled 1`] = `
|
|||||||
}
|
}
|
||||||
value={false}
|
value={false}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ exports[`components/MessageExportSettings should match snapshot, disabled, actia
|
|||||||
id="admin.complianceExport.title"
|
id="admin.complianceExport.title"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
disabled={false}
|
disabled={false}
|
||||||
falseText={
|
falseText={
|
||||||
@@ -136,7 +136,7 @@ exports[`components/MessageExportSettings should match snapshot, disabled, actia
|
|||||||
getExtraInfoText={[Function]}
|
getExtraInfoText={[Function]}
|
||||||
jobType="message_export"
|
jobType="message_export"
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
@@ -195,7 +195,7 @@ exports[`components/MessageExportSettings should match snapshot, disabled, globa
|
|||||||
id="admin.complianceExport.title"
|
id="admin.complianceExport.title"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
disabled={false}
|
disabled={false}
|
||||||
falseText={
|
falseText={
|
||||||
@@ -299,7 +299,7 @@ exports[`components/MessageExportSettings should match snapshot, disabled, globa
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
id="globalRelaySettings"
|
id="globalRelaySettings"
|
||||||
>
|
>
|
||||||
<Memo(RadioSetting)
|
<Memo(RadioSetting)
|
||||||
@@ -412,7 +412,7 @@ exports[`components/MessageExportSettings should match snapshot, disabled, globa
|
|||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
value="globalRelay@mattermost.com"
|
value="globalRelay@mattermost.com"
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<Connect(JobTable)
|
<Connect(JobTable)
|
||||||
createJobButtonText={
|
createJobButtonText={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
@@ -430,7 +430,7 @@ exports[`components/MessageExportSettings should match snapshot, disabled, globa
|
|||||||
getExtraInfoText={[Function]}
|
getExtraInfoText={[Function]}
|
||||||
jobType="message_export"
|
jobType="message_export"
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
@@ -489,7 +489,7 @@ exports[`components/MessageExportSettings should match snapshot, enabled, actian
|
|||||||
id="admin.complianceExport.title"
|
id="admin.complianceExport.title"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
disabled={false}
|
disabled={false}
|
||||||
falseText={
|
falseText={
|
||||||
@@ -610,7 +610,7 @@ exports[`components/MessageExportSettings should match snapshot, enabled, actian
|
|||||||
getExtraInfoText={[Function]}
|
getExtraInfoText={[Function]}
|
||||||
jobType="message_export"
|
jobType="message_export"
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
@@ -669,7 +669,7 @@ exports[`components/MessageExportSettings should match snapshot, enabled, global
|
|||||||
id="admin.complianceExport.title"
|
id="admin.complianceExport.title"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
disabled={false}
|
disabled={false}
|
||||||
falseText={
|
falseText={
|
||||||
@@ -773,7 +773,7 @@ exports[`components/MessageExportSettings should match snapshot, enabled, global
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
id="globalRelaySettings"
|
id="globalRelaySettings"
|
||||||
>
|
>
|
||||||
<Memo(RadioSetting)
|
<Memo(RadioSetting)
|
||||||
@@ -886,7 +886,7 @@ exports[`components/MessageExportSettings should match snapshot, enabled, global
|
|||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
value="globalRelay@mattermost.com"
|
value="globalRelay@mattermost.com"
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<Connect(JobTable)
|
<Connect(JobTable)
|
||||||
createJobButtonText={
|
createJobButtonText={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
@@ -904,7 +904,7 @@ exports[`components/MessageExportSettings should match snapshot, enabled, global
|
|||||||
getExtraInfoText={[Function]}
|
getExtraInfoText={[Function]}
|
||||||
jobType="message_export"
|
jobType="message_export"
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ exports[`components/PushSettings should match snapshot, licensed 1`] = `
|
|||||||
id="admin.environment.pushNotificationServer"
|
id="admin.environment.pushNotificationServer"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<Memo(DropdownSetting)
|
<Memo(DropdownSetting)
|
||||||
helpText={null}
|
helpText={null}
|
||||||
id="pushNotificationServerType"
|
id="pushNotificationServerType"
|
||||||
@@ -156,7 +156,7 @@ exports[`components/PushSettings should match snapshot, licensed 1`] = `
|
|||||||
type="number"
|
type="number"
|
||||||
value={1000}
|
value={1000}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
@@ -215,7 +215,7 @@ exports[`components/PushSettings should match snapshot, unlicensed 1`] = `
|
|||||||
id="admin.environment.pushNotificationServer"
|
id="admin.environment.pushNotificationServer"
|
||||||
/>
|
/>
|
||||||
</AdminHeader>
|
</AdminHeader>
|
||||||
<SettingsGroup>
|
<Memo(SettingsGroup)>
|
||||||
<Memo(DropdownSetting)
|
<Memo(DropdownSetting)
|
||||||
helpText={null}
|
helpText={null}
|
||||||
id="pushNotificationServerType"
|
id="pushNotificationServerType"
|
||||||
@@ -300,7 +300,7 @@ exports[`components/PushSettings should match snapshot, unlicensed 1`] = `
|
|||||||
type="number"
|
type="number"
|
||||||
value={1000}
|
value={1000}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
<div
|
<div
|
||||||
className="admin-console-save"
|
className="admin-console-save"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ exports[`components/admin_console/SchemaAdminSettings should match snapshot with
|
|||||||
onSubmit={[Function]}
|
onSubmit={[Function]}
|
||||||
role="form"
|
role="form"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
>
|
>
|
||||||
<AdminTextSetting
|
<AdminTextSetting
|
||||||
@@ -697,7 +697,7 @@ exports[`components/admin_console/SchemaAdminSettings should match snapshot with
|
|||||||
}
|
}
|
||||||
value={true}
|
value={true}
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
|||||||
onSubmit={[Function]}
|
onSubmit={[Function]}
|
||||||
role="form"
|
role="form"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -178,7 +178,7 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
|||||||
*This* is the **footer**"
|
*This* is the **footer**"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -318,7 +318,7 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
|||||||
onSubmit={[Function]}
|
onSubmit={[Function]}
|
||||||
role="form"
|
role="form"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -478,7 +478,7 @@ exports[`components/admin_console/CustomPluginSettings should match snapshot wit
|
|||||||
*This* is the **footer**"
|
*This* is the **footer**"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ exports[`components/PluginManagement should match snapshot 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -302,7 +302,7 @@ exports[`components/PluginManagement should match snapshot 1`] = `
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -369,7 +369,7 @@ exports[`components/PluginManagement should match snapshot when \`Enable Marketp
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -650,7 +650,7 @@ exports[`components/PluginManagement should match snapshot when \`Enable Marketp
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -717,7 +717,7 @@ exports[`components/PluginManagement should match snapshot when \`Enable Plugins
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -746,7 +746,7 @@ exports[`components/PluginManagement should match snapshot when \`Enable Plugins
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -813,7 +813,7 @@ exports[`components/PluginManagement should match snapshot when \`Enable Remote
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -1094,7 +1094,7 @@ exports[`components/PluginManagement should match snapshot when \`Enable Remote
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -1161,7 +1161,7 @@ exports[`components/PluginManagement should match snapshot when \`Require Signat
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -1444,7 +1444,7 @@ exports[`components/PluginManagement should match snapshot when \`Require Signat
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -1511,7 +1511,7 @@ exports[`components/PluginManagement should match snapshot, No installed plugins
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -1796,7 +1796,7 @@ exports[`components/PluginManagement should match snapshot, No installed plugins
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -1863,7 +1863,7 @@ exports[`components/PluginManagement should match snapshot, allow insecure URL e
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -2144,7 +2144,7 @@ exports[`components/PluginManagement should match snapshot, allow insecure URL e
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -2211,7 +2211,7 @@ exports[`components/PluginManagement should match snapshot, disabled 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -2469,7 +2469,7 @@ exports[`components/PluginManagement should match snapshot, disabled 1`] = `
|
|||||||
setByEnv={false}
|
setByEnv={false}
|
||||||
value="marketplace.example.com"
|
value="marketplace.example.com"
|
||||||
/>
|
/>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -2536,7 +2536,7 @@ exports[`components/PluginManagement should match snapshot, text entered into th
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -2817,7 +2817,7 @@ exports[`components/PluginManagement should match snapshot, text entered into th
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -2884,7 +2884,7 @@ exports[`components/PluginManagement should match snapshot, upload disabled 1`]
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -3172,7 +3172,7 @@ exports[`components/PluginManagement should match snapshot, upload disabled 1`]
|
|||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -3239,7 +3239,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -3583,7 +3583,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -3650,7 +3650,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -3962,7 +3962,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -4029,7 +4029,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -4341,7 +4341,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -4408,7 +4408,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -4720,7 +4720,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -4787,7 +4787,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
<div
|
<div
|
||||||
className="admin-console__content"
|
className="admin-console__content"
|
||||||
>
|
>
|
||||||
<SettingsGroup
|
<Memo(SettingsGroup)
|
||||||
container={false}
|
container={false}
|
||||||
id="PluginSettings"
|
id="PluginSettings"
|
||||||
>
|
>
|
||||||
@@ -5131,7 +5131,7 @@ exports[`components/PluginManagement should match snapshot, with installed plugi
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SettingsGroup>
|
</Memo(SettingsGroup)>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// See LICENSE.txt for license information.
|
||||||
|
|
||||||
import React from 'react';
|
import React, {memo} from 'react';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
id?: string;
|
id?: string;
|
||||||
@@ -13,57 +13,57 @@ type Props = {
|
|||||||
container?: boolean;
|
container?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class SettingsGroup extends React.PureComponent<Props> {
|
const SettingsGroup = ({
|
||||||
render(): React.ReactNode {
|
show = true,
|
||||||
const {show = true, container = true} = this.props;
|
container = true,
|
||||||
|
header,
|
||||||
|
title,
|
||||||
|
subtitle,
|
||||||
|
children,
|
||||||
|
}: Props) => {
|
||||||
|
let wrapperClass = '';
|
||||||
|
let contentClass = '';
|
||||||
|
|
||||||
let wrapperClass = '';
|
if (!show) {
|
||||||
let contentClass = '';
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (!show) {
|
if (container) {
|
||||||
return null;
|
wrapperClass = 'admin-console__wrapper';
|
||||||
}
|
contentClass = 'admin-console__content';
|
||||||
|
}
|
||||||
|
|
||||||
if (container) {
|
let sectionTitle = null;
|
||||||
wrapperClass = 'admin-console__wrapper';
|
if (!header && title) {
|
||||||
contentClass = 'admin-console__content';
|
sectionTitle = <div className={'section-title'}>{title}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
let header = null;
|
let sectionSubtitle = null;
|
||||||
if (this.props.header) {
|
if (!header && subtitle) {
|
||||||
header = <h4>{this.props.header}</h4>;
|
sectionSubtitle = (
|
||||||
}
|
<div className={'section-subtitle'}>{subtitle}</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let title = null;
|
let sectionHeader = null;
|
||||||
if (!this.props.header && this.props.title) {
|
if (sectionTitle || sectionSubtitle) {
|
||||||
title = <div className={'section-title'}>{this.props.title}</div>;
|
sectionHeader = (
|
||||||
}
|
<div className={'section-header'}>
|
||||||
|
{sectionTitle}
|
||||||
let subtitle = null;
|
{sectionSubtitle}
|
||||||
if (!this.props.header && this.props.subtitle) {
|
|
||||||
subtitle = (
|
|
||||||
<div className={'section-subtitle'}>{this.props.subtitle}</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
let sectionHeader = null;
|
|
||||||
if (title || subtitle) {
|
|
||||||
sectionHeader = (
|
|
||||||
<div className={'section-header'}>
|
|
||||||
{title}
|
|
||||||
{subtitle}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className={wrapperClass}>
|
|
||||||
<div className={contentClass}>
|
|
||||||
{header}
|
|
||||||
{sectionHeader}
|
|
||||||
{this.props.children}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
return (
|
||||||
|
<div className={wrapperClass}>
|
||||||
|
<div className={contentClass}>
|
||||||
|
{header ? <h4>{header}</h4> : null}
|
||||||
|
{sectionHeader}
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default memo(SettingsGroup);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user