mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-09 02:46:52 +08:00
fix: button (#5470)
This commit is contained in:
@@ -150,7 +150,7 @@ export default function AccountPage() {
|
||||
<div className='mb-8'>
|
||||
<div className='mb-1 text-sm font-medium text-gray-900'>{t('common.account.password')}</div>
|
||||
<div className='mb-2 text-xs text-gray-500'>{t('common.account.passwordTip')}</div>
|
||||
<Button className='font-medium !text-gray-700 !px-3 !py-[7px] !text-[13px]' onClick={() => setEditPasswordModalVisible(true)}>{userProfile.is_password_set ? t('common.account.resetPassword') : t('common.account.setPassword')}</Button>
|
||||
<Button onClick={() => setEditPasswordModalVisible(true)}>{userProfile.is_password_set ? t('common.account.resetPassword') : t('common.account.setPassword')}</Button>
|
||||
</div>
|
||||
)}
|
||||
<div className='mb-6 border-[0.5px] border-gray-100' />
|
||||
@@ -165,7 +165,7 @@ export default function AccountPage() {
|
||||
wrapperClassName='mt-2'
|
||||
/>
|
||||
)}
|
||||
{!IS_CE_EDITION && <Button className='mt-2 font-medium text-[#D92D20] !px-3 !py-[7px] !text-[13px]' onClick={() => setShowDeleteAccountModal(true)}>{t('common.account.delete')}</Button>}
|
||||
{!IS_CE_EDITION && <Button className='mt-2 text-[#D92D20]' onClick={() => setShowDeleteAccountModal(true)}>{t('common.account.delete')}</Button>}
|
||||
</div>
|
||||
{editNameModalVisible && (
|
||||
<Modal
|
||||
@@ -181,11 +181,10 @@ export default function AccountPage() {
|
||||
onChange={e => setEditName(e.target.value)}
|
||||
/>
|
||||
<div className='flex justify-end mt-10'>
|
||||
<Button className='mr-2 text-sm font-medium' onClick={() => setEditNameModalVisible(false)}>{t('common.operation.cancel')}</Button>
|
||||
<Button className='mr-2' onClick={() => setEditNameModalVisible(false)}>{t('common.operation.cancel')}</Button>
|
||||
<Button
|
||||
disabled={editing || !editName}
|
||||
variant='primary'
|
||||
className='text-sm font-medium'
|
||||
onClick={handleSaveName}
|
||||
>
|
||||
{t('common.operation.save')}
|
||||
@@ -231,14 +230,13 @@ export default function AccountPage() {
|
||||
onChange={e => setConfirmPassword(e.target.value)}
|
||||
/>
|
||||
<div className='flex justify-end mt-10'>
|
||||
<Button className='mr-2 text-sm font-medium' onClick={() => {
|
||||
<Button className='mr-2' onClick={() => {
|
||||
setEditPasswordModalVisible(false)
|
||||
resetPasswordForm()
|
||||
}}>{t('common.operation.cancel')}</Button>
|
||||
<Button
|
||||
disabled={editing}
|
||||
variant='primary'
|
||||
className='text-sm font-medium'
|
||||
onClick={handleSavePassowrd}
|
||||
>
|
||||
{userProfile.is_password_set ? t('common.operation.reset') : t('common.operation.save')}
|
||||
@@ -268,7 +266,7 @@ export default function AccountPage() {
|
||||
</div>
|
||||
<div className='my-2 px-3 py-2 rounded-lg bg-gray-100 text-sm font-medium leading-5 text-gray-800'>{`Delete Account: ${userProfile.email}`}</div>
|
||||
<div className='pt-6 flex justify-end items-center'>
|
||||
<Button className='w-24 text-gray-700 text-sm font-medium' onClick={() => setShowDeleteAccountModal(false)}>{t('common.operation.ok')}</Button>
|
||||
<Button className='w-24' onClick={() => setShowDeleteAccountModal(false)}>{t('common.operation.ok')}</Button>
|
||||
</div>
|
||||
</Modal>
|
||||
)}
|
||||
|
||||
@@ -130,13 +130,12 @@ const ApiBasedExtensionModal: FC<ApiBasedExtensionModalProps> = ({
|
||||
<div className='flex items-center justify-end mt-6'>
|
||||
<Button
|
||||
onClick={onCancel}
|
||||
className='mr-2 text-sm font-medium'
|
||||
className='mr-2'
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
variant='primary'
|
||||
className='text-sm font-medium'
|
||||
disabled={!localeData.name || !localeData.api_endpoint || !localeData.api_key || loading}
|
||||
onClick={handleSave}
|
||||
>
|
||||
|
||||
@@ -123,14 +123,15 @@ const ConfigFirecrawlModal: FC<Props> = ({
|
||||
</a>
|
||||
<div className='flex'>
|
||||
<Button
|
||||
className='mr-2 h-9 text-sm font-medium text-gray-700'
|
||||
size='large'
|
||||
className='mr-2'
|
||||
onClick={onCancel}
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
className='h-9 text-sm font-medium'
|
||||
variant='primary'
|
||||
size='large'
|
||||
onClick={handleSave}
|
||||
loading={isSaving}
|
||||
>
|
||||
|
||||
@@ -148,7 +148,7 @@ const InviteModal = ({
|
||||
</Listbox>
|
||||
<Button
|
||||
tabIndex={0}
|
||||
className='w-full text-sm font-medium'
|
||||
className='w-full'
|
||||
onClick={handleSend}
|
||||
disabled={!emails.length}
|
||||
variant='primary'
|
||||
|
||||
@@ -83,7 +83,7 @@ const InvitedModal = ({
|
||||
)}
|
||||
<div className='flex justify-end'>
|
||||
<Button
|
||||
className='w-[96px] text-sm font-medium'
|
||||
className='w-[96px]'
|
||||
onClick={onCancel}
|
||||
variant='primary'
|
||||
>
|
||||
|
||||
@@ -326,7 +326,8 @@ const ModelModal: FC<ModelModalProps> = ({
|
||||
{
|
||||
isEditMode && (
|
||||
<Button
|
||||
className='mr-2 h-9 text-sm font-medium text-[#D92D20]'
|
||||
size='large'
|
||||
className='mr-2 text-[#D92D20]'
|
||||
onClick={() => setShowConfirm(true)}
|
||||
>
|
||||
{t('common.operation.remove')}
|
||||
@@ -334,13 +335,14 @@ const ModelModal: FC<ModelModalProps> = ({
|
||||
)
|
||||
}
|
||||
<Button
|
||||
className='mr-2 h-9 text-sm font-medium text-gray-700'
|
||||
size='large'
|
||||
className='mr-2'
|
||||
onClick={onCancel}
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
className='h-9 text-sm font-medium'
|
||||
size='large'
|
||||
variant='primary'
|
||||
onClick={handleSave}
|
||||
disabled={
|
||||
|
||||
@@ -276,7 +276,8 @@ const ModelLoadBalancingEntryModal: FC<ModelModalProps> = ({
|
||||
{
|
||||
isEditMode && (
|
||||
<Button
|
||||
className='mr-2 h-9 text-sm font-medium text-[#D92D20]'
|
||||
size='large'
|
||||
className='mr-2 text-[#D92D20]'
|
||||
onClick={() => setShowConfirm(true)}
|
||||
>
|
||||
{t('common.operation.remove')}
|
||||
@@ -284,13 +285,14 @@ const ModelLoadBalancingEntryModal: FC<ModelModalProps> = ({
|
||||
)
|
||||
}
|
||||
<Button
|
||||
className='mr-2 h-9 text-sm font-medium text-gray-700'
|
||||
size='large'
|
||||
className='mr-2'
|
||||
onClick={onCancel}
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
className='h-9 text-sm font-medium'
|
||||
size='large'
|
||||
variant='primary'
|
||||
onClick={handleSave}
|
||||
disabled={loading || filteredRequiredFormSchemas.some(item => value[item.variable] === undefined)}
|
||||
|
||||
@@ -73,7 +73,8 @@ const CredentialPanel: FC<CredentialPanelProps> = ({
|
||||
</div>
|
||||
<div className='flex items-center gap-0.5'>
|
||||
<Button
|
||||
className='grow px-0 h-6 bg-white text-xs font-medium rounded-md'
|
||||
className='grow'
|
||||
size='small'
|
||||
onClick={onSetup}
|
||||
>
|
||||
<Settings01 className='mr-1 w-3 h-3' />
|
||||
|
||||
@@ -75,7 +75,7 @@ const ModelListItem = ({ model, provider, isConfigurable, onConfig, onModifyLoad
|
||||
model.fetch_from === ConfigurationMethodEnum.customizableModel
|
||||
? (
|
||||
<Button
|
||||
className='hidden group-hover:flex py-0 h-7 text-xs font-medium text-gray-700'
|
||||
className='hidden group-hover:flex h-7'
|
||||
onClick={() => onConfig({ __model_name: model.model, __model_type: model.model_type })}
|
||||
>
|
||||
<Settings01 className='mr-[5px] w-3.5 h-3.5' />
|
||||
@@ -85,7 +85,7 @@ const ModelListItem = ({ model, provider, isConfigurable, onConfig, onModifyLoad
|
||||
: ((modelLoadBalancingEnabled || plan.type === Plan.sandbox) && !model.deprecated && [ModelStatusEnum.active, ModelStatusEnum.disabled].includes(model.status))
|
||||
? (
|
||||
<Button
|
||||
className='opacity-0 group-hover:opacity-100 px-3 h-[28px] text-xs text-gray-700 rounded-md transition-opacity'
|
||||
className='opacity-0 group-hover:opacity-100 h-[28px] transition-opacity'
|
||||
onClick={() => onModifyLoadBalancing?.(model)}
|
||||
>
|
||||
<Balance className='mr-1 w-[14px] h-[14px]' />
|
||||
|
||||
@@ -65,7 +65,7 @@ const ProviderCard: FC<ProviderCardProps> = ({
|
||||
return (
|
||||
<Button
|
||||
key={method}
|
||||
className={'h-7 bg-white text-xs text-gray-700 shrink-0'}
|
||||
className={'h-7 text-xs shrink-0'}
|
||||
onClick={() => onOpenModal(method)}
|
||||
>
|
||||
<Settings01 className={`mr-[5px] w-3.5 h-3.5 ${s.icon}`} />
|
||||
@@ -76,7 +76,7 @@ const ProviderCard: FC<ProviderCardProps> = ({
|
||||
return (
|
||||
<Button
|
||||
key={method}
|
||||
className='px-0 h-7 bg-white text-xs text-gray-700'
|
||||
className='px-0 h-7 text-xs'
|
||||
onClick={() => onOpenModal(method)}
|
||||
>
|
||||
<RiAddLine className='mr-[5px] w-3.5 h-3.5' />
|
||||
|
||||
@@ -244,14 +244,12 @@ const SystemModel: FC<SystemModelSelectorProps> = ({
|
||||
</div>
|
||||
<div className='flex items-center justify-end px-6 py-4'>
|
||||
<Button
|
||||
className='mr-2 !h-8 !text-[13px]'
|
||||
onClick={() => setOpen(false)}
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
variant='primary'
|
||||
className='!h-8 !text-[13px]'
|
||||
onClick={handleSave}
|
||||
disabled={!isCurrentWorkspaceManager}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user