mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 01:26:57 +08:00
need author judgement
This commit is contained in:
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,21 +293,23 @@ 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 })}
|
||||||
<Button
|
{needAuth && (
|
||||||
variant='secondary'
|
<Button
|
||||||
size='small'
|
variant='secondary'
|
||||||
onClick={() => {
|
size='small'
|
||||||
if (collection.type === CollectionType.builtIn || collection.type === CollectionType.model)
|
onClick={() => {
|
||||||
showSettingAuthModal()
|
if (collection.type === CollectionType.builtIn || collection.type === CollectionType.model)
|
||||||
}}
|
showSettingAuthModal()
|
||||||
disabled={!isCurrentWorkspaceManager}
|
}}
|
||||||
>
|
disabled={!isCurrentWorkspaceManager}
|
||||||
<Indicator className='mr-2' color={'green'} />
|
>
|
||||||
{t('tools.auth.authorized')}
|
<Indicator className='mr-2' color={'green'} />
|
||||||
</Button>
|
{t('tools.auth.authorized')}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!isDetailLoading && (collection.type === CollectionType.builtIn) && needAuth && !isAuthed && (
|
{!isDetailLoading && (collection.type === CollectionType.builtIn) && needAuth && !isAuthed && (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user