Refactor AppPassword component for improved readability and modal width adjustment
- Reformatted import statements for better clarity and consistency. - Increased modal width for the Regenerate Secret functionality to enhance user experience. - Improved the structure of the createElement call for RegenerateAppPasswordSecret for better readability.
This commit is contained in:
parent
9ee46d2067
commit
40b567b17e
@ -1,10 +1,12 @@
|
|||||||
import { createElement, lazy } from 'react'
|
import { createElement, lazy } from 'react'
|
||||||
|
|
||||||
const AppPasswordInfo = lazy(
|
const AppPasswordInfo = lazy(
|
||||||
() => import('../../components/Dashboard/Management/AppPasswords/AppPasswordInfo')
|
() =>
|
||||||
|
import('../../components/Dashboard/Management/AppPasswords/AppPasswordInfo')
|
||||||
)
|
)
|
||||||
const RegenerateAppPasswordSecret = lazy(
|
const RegenerateAppPasswordSecret = lazy(
|
||||||
() => import('../../components/Dashboard/Management/AppPasswords/RegenerateAppPasswordSecret')
|
() =>
|
||||||
|
import('../../components/Dashboard/Management/AppPasswords/RegenerateAppPasswordSecret')
|
||||||
)
|
)
|
||||||
import AppPasswordIcon from '../../components/Icons/AppPasswordIcon'
|
import AppPasswordIcon from '../../components/Icons/AppPasswordIcon'
|
||||||
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
import InfoCircleIcon from '../../components/Icons/InfoCircleIcon'
|
||||||
@ -68,7 +70,7 @@ export const AppPassword = {
|
|||||||
{
|
{
|
||||||
name: 'regenerateSecret',
|
name: 'regenerateSecret',
|
||||||
type: 'modal',
|
type: 'modal',
|
||||||
modalWidth: 520,
|
modalWidth: 630,
|
||||||
label: 'Regenerate Secret',
|
label: 'Regenerate Secret',
|
||||||
row: true,
|
row: true,
|
||||||
icon: LockIcon,
|
icon: LockIcon,
|
||||||
@ -76,7 +78,10 @@ export const AppPassword = {
|
|||||||
return objectData?._user?._id != objectData?.user?._id
|
return objectData?._user?._id != objectData?.user?._id
|
||||||
},
|
},
|
||||||
content: (objectData, { onOk } = {}) => {
|
content: (objectData, { onOk } = {}) => {
|
||||||
return createElement(RegenerateAppPasswordSecret, { id: objectData._id, onOk })
|
return createElement(RegenerateAppPasswordSecret, {
|
||||||
|
id: objectData._id,
|
||||||
|
onOk
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user