|
|
|
|
@ -9,7 +9,6 @@ import {
|
|
|
|
|
RiEditLine,
|
|
|
|
|
RiEqualizer2Line,
|
|
|
|
|
RiHome9Line,
|
|
|
|
|
RiLoopLeftLine,
|
|
|
|
|
RiStickyNoteAddLine,
|
|
|
|
|
} from '@remixicon/react'
|
|
|
|
|
import Dropdown from '@/app/components/base/dropdown'
|
|
|
|
|
@ -44,45 +43,45 @@ const Operator = ({
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'rename',
|
|
|
|
|
text: (
|
|
|
|
|
<div className='flex items-center'>
|
|
|
|
|
<RiEditLine className='mr-2 h-4 w-4 text-text-tertiary' />
|
|
|
|
|
<div className='system-sm-semibold text-text-secondary'>{t('common.operation.rename')}</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'edit',
|
|
|
|
|
text: (
|
|
|
|
|
<div className='flex items-center'>
|
|
|
|
|
<RiEqualizer2Line className='mr-2 h-4 w-4 text-text-tertiary' />
|
|
|
|
|
<div className='system-sm-semibold text-text-secondary'>{t('common.operation.edit')}</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
...(
|
|
|
|
|
type === CredentialTypeEnum.OAUTH2
|
|
|
|
|
? [
|
|
|
|
|
{
|
|
|
|
|
value: 'rename',
|
|
|
|
|
text: (
|
|
|
|
|
<div className='flex items-center'>
|
|
|
|
|
<RiEditLine className='mr-2 h-4 w-4 text-text-tertiary' />
|
|
|
|
|
<div className='system-sm-semibold text-text-secondary'>{t('common.operation.rename')}</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: []
|
|
|
|
|
),
|
|
|
|
|
...(
|
|
|
|
|
type === CredentialTypeEnum.API_KEY
|
|
|
|
|
? [
|
|
|
|
|
{
|
|
|
|
|
value: 'edit',
|
|
|
|
|
text: (
|
|
|
|
|
<div className='flex items-center'>
|
|
|
|
|
<RiEqualizer2Line className='mr-2 h-4 w-4 text-text-tertiary' />
|
|
|
|
|
<div className='system-sm-semibold text-text-secondary'>{t('common.operation.edit')}</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
: []
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
if (type === CredentialTypeEnum.OAUTH2) {
|
|
|
|
|
const oAuthItems = [
|
|
|
|
|
{
|
|
|
|
|
value: 'change',
|
|
|
|
|
text: (
|
|
|
|
|
<div className='flex'>
|
|
|
|
|
<RiStickyNoteAddLine className='mr-2 h-4 w-4 text-text-tertiary' />
|
|
|
|
|
<div>
|
|
|
|
|
<div className='system-sm-semibold mb-1 text-text-secondary'>{t('common.dataSource.notion.changeAuthorizedPages')}</div>
|
|
|
|
|
<div className='system-xs-regular text-text-tertiary'>18 {t('common.dataSource.notion.pagesAuthorized')}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'sync',
|
|
|
|
|
text: (
|
|
|
|
|
<div className='flex items-center'>
|
|
|
|
|
<RiLoopLeftLine className='mr-2 h-4 w-4 text-text-tertiary' />
|
|
|
|
|
<div className='system-sm-semibold text-text-secondary'>{t('common.dataSource.notion.sync')}</div>
|
|
|
|
|
<RiStickyNoteAddLine className='mr-2 h-4 w-4 text-text-tertiary' />
|
|
|
|
|
<div className='system-sm-semibold mb-1 text-text-secondary'>{t('common.dataSource.notion.changeAuthorizedPages')}</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
@ -99,7 +98,9 @@ const Operator = ({
|
|
|
|
|
text: (
|
|
|
|
|
<div className='flex items-center'>
|
|
|
|
|
<RiDeleteBinLine className='mr-2 h-4 w-4 text-text-tertiary' />
|
|
|
|
|
<div className='system-sm-semibold text-text-secondary'>Remove</div>
|
|
|
|
|
<div className='system-sm-semibold text-text-secondary'>
|
|
|
|
|
{t('common.operation.remove')}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
|