1616
1717import Box , { BoxProps } from '@mui/material/Box' ;
1818import Button from '@mui/material/Button' ;
19+ import Chip from '@mui/material/Chip' ;
1920import Stack from '@mui/material/Stack' ;
2021import _ from 'lodash' ;
2122import { isValidElement , useEffect , useMemo , useState } from 'react' ;
2223import { useTranslation } from 'react-i18next' ;
2324import { useDispatch } from 'react-redux' ;
24- import { useParams } from 'react-router-dom' ;
25- import { useHistory } from 'react-router-dom' ;
25+ import { useHistory , useParams } from 'react-router-dom' ;
2626import { isElectron } from '../../../helpers/isElectron' ;
2727import { getCluster } from '../../../lib/cluster' ;
2828import { deletePlugin } from '../../../lib/k8s/api/v1/pluginsApi' ;
@@ -32,6 +32,7 @@ import { clusterAction } from '../../../redux/clusterActionSlice';
3232import { useTypedSelector } from '../../../redux/hooks' ;
3333import type { AppDispatch } from '../../../redux/stores/store' ;
3434import NotFoundComponent from '../../404' ;
35+ import { SectionHeader } from '../../common' ;
3536import { ConfirmDialog } from '../../common/Dialog' ;
3637import ErrorBoundary from '../../common/ErrorBoundary' ;
3738import { SectionBox } from '../../common/SectionBox' ;
@@ -199,8 +200,35 @@ export function PluginSettingsDetailsPure(props: PluginSettingsDetailsPureProps)
199200 < >
200201 < SectionBox
201202 aria-live = "polite"
202- title = { name }
203- subtitle = { author ? `${ t ( 'translation|By' ) } : ${ author } ` : undefined }
203+ title = {
204+ < SectionHeader
205+ title = { name }
206+ titleSideActions = { [
207+ plugin . type && (
208+ < Chip
209+ label = {
210+ plugin . type === 'development'
211+ ? t ( 'translation|Development' )
212+ : plugin . type === 'user'
213+ ? t ( 'translation|User-installed' )
214+ : t ( 'translation|Shipped' )
215+ }
216+ size = "small"
217+ color = {
218+ plugin . type === 'development'
219+ ? 'primary'
220+ : plugin . type === 'user'
221+ ? 'info'
222+ : 'default'
223+ }
224+ />
225+ ) ,
226+ ] }
227+ subtitle = { author ? `${ t ( 'translation|By' ) } : ${ author } ` : undefined }
228+ noPadding = { false }
229+ headerStyle = "subsection"
230+ />
231+ }
204232 backLink = { '/settings/plugins' }
205233 >
206234 { plugin . description }
0 commit comments