need author judgement

pull/12372/head
JzoNg 2 years ago
parent ef00ad0417
commit cee51ac084

@ -36,7 +36,7 @@ const ActionList = () => {
<div className='mb-1 py-1'> <div className='mb-1 py-1'>
<div className='mb-1 h-6 flex items-center justify-between text-text-secondary system-sm-semibold-uppercase'> <div className='mb-1 h-6 flex items-center justify-between text-text-secondary system-sm-semibold-uppercase'>
{t('plugin.detailPanel.actionNum', { num: data.length })} {t('plugin.detailPanel.actionNum', { num: data.length })}
{providerDeclaration.is_team_authorization && ( {providerDeclaration.is_team_authorization && providerDeclaration.allow_delete && (
<Button <Button
variant='secondary' variant='secondary'
size='small' size='small'
@ -48,7 +48,7 @@ const ActionList = () => {
</Button> </Button>
)} )}
</div> </div>
{!providerDeclaration.is_team_authorization && ( {!providerDeclaration.is_team_authorization && providerDeclaration.allow_delete && (
<Button <Button
variant='primary' variant='primary'
className='w-full' className='w-full'

@ -45,7 +45,7 @@ import { ConfigurationMethodEnum } from '@/app/components/header/account-setting
import Loading from '@/app/components/base/loading' import Loading from '@/app/components/base/loading'
import { useAppContext } from '@/context/app-context' import { useAppContext } from '@/context/app-context'
interface Props { type Props = {
collection: Collection collection: Collection
onHide: () => void onHide: () => void
onRefreshData: () => void onRefreshData: () => void
@ -293,9 +293,10 @@ const ProviderDetail = ({
<div className='pt-3'> <div className='pt-3'>
{isDetailLoading && <div className='flex h-[200px]'><Loading type='app' /></div>} {isDetailLoading && <div className='flex h-[200px]'><Loading type='app' /></div>}
{/* Builtin type */} {/* Builtin type */}
{!isDetailLoading && (collection.type === CollectionType.builtIn) && needAuth && isAuthed && ( {!isDetailLoading && (collection.type === CollectionType.builtIn) && isAuthed && (
<div className='mb-1 h-6 flex items-center justify-between text-text-secondary system-sm-semibold-uppercase'> <div className='mb-1 h-6 flex items-center justify-between text-text-secondary system-sm-semibold-uppercase'>
{t('plugin.detailPanel.actionNum', { num: 3 })} {t('plugin.detailPanel.actionNum', { num: 3 })}
{needAuth && (
<Button <Button
variant='secondary' variant='secondary'
size='small' size='small'
@ -308,6 +309,7 @@ const ProviderDetail = ({
<Indicator className='mr-2' color={'green'} /> <Indicator className='mr-2' color={'green'} />
{t('tools.auth.authorized')} {t('tools.auth.authorized')}
</Button> </Button>
)}
</div> </div>
)} )}
{!isDetailLoading && (collection.type === CollectionType.builtIn) && needAuth && !isAuthed && ( {!isDetailLoading && (collection.type === CollectionType.builtIn) && needAuth && !isAuthed && (

Loading…
Cancel
Save