chore: eslint add sonar (#17989)

This commit is contained in:
Joel
2025-04-14 15:28:20 +08:00
committed by GitHub
parent 8f9cbe1c49
commit d80f4c7d3b
38 changed files with 157 additions and 180 deletions

View File

@@ -46,25 +46,23 @@ const CardWrapper = ({
}
/>
{
showInstallButton && (
<div className='absolute bottom-0 hidden w-full items-center space-x-2 rounded-b-xl bg-gradient-to-tr from-components-panel-on-panel-item-bg to-background-gradient-mask-transparent px-4 pb-4 pt-8 group-hover:flex'>
<div className='absolute bottom-0 hidden w-full items-center space-x-2 rounded-b-xl bg-gradient-to-tr from-components-panel-on-panel-item-bg to-background-gradient-mask-transparent px-4 pb-4 pt-8 group-hover:flex'>
<Button
variant='primary'
className='w-[calc(50%-4px)]'
onClick={showInstallFromMarketplace}
>
{t('plugin.detailPanel.operation.install')}
</Button>
<a href={`${getPluginLinkInMarketplace(plugin)}?language=${localeFromLocale}`} target='_blank' className='block w-[calc(50%-4px)] flex-1 shrink-0'>
<Button
variant='primary'
className='w-[calc(50%-4px)]'
onClick={showInstallFromMarketplace}
className='w-full gap-0.5'
>
{t('plugin.detailPanel.operation.install')}
{t('plugin.detailPanel.operation.detail')}
<RiArrowRightUpLine className='ml-1 h-4 w-4' />
</Button>
<a href={`${getPluginLinkInMarketplace(plugin)}?language=${localeFromLocale}`} target='_blank' className='block w-[calc(50%-4px)] flex-1 shrink-0'>
<Button
className='w-full gap-0.5'
>
{t('plugin.detailPanel.operation.detail')}
<RiArrowRightUpLine className='ml-1 h-4 w-4' />
</Button>
</a>
</div>
)
</a>
</div>
}
{
isShowInstallFromMarketplace && (

View File

@@ -72,7 +72,7 @@ const Empty = () => {
<div className='flex w-full flex-col gap-y-1'>
{[
...(
(enable_marketplace && true)
(enable_marketplace)
? [{ icon: MagicBox, text: t('plugin.list.source.marketplace'), action: 'marketplace' }]
: []
),

View File

@@ -86,7 +86,7 @@ const InstallPluginDropdown = ({
<div className='w-full'>
{[
...(
(enable_marketplace && true)
(enable_marketplace)
? [{ icon: MagicBox, text: t('plugin.source.marketplace'), action: 'marketplace' }]
: []
),

View File

@@ -1,7 +1,6 @@
'use client'
import type { FC } from 'react'
import React, { useCallback, useEffect, useMemo, useState } from 'react'
import { RiInformation2Line } from '@remixicon/react'
import { useTranslation } from 'react-i18next'
import Card from '@/app/components/plugins/card'
import Modal from '@/app/components/base/modal'
@@ -103,15 +102,7 @@ const UpdatePluginModal: FC<Props> = ({
if (uploadStep === UploadStep.installed)
onSave()
}, [onSave, uploadStep, check, originalPackageInfo.id, handleRefetch, targetPackageInfo.id])
const usedInAppInfo = useMemo(() => {
return (
<div className='flex items-center justify-center gap-0.5 px-0.5'>
<div className='system-xs-medium text-text-warning'>{t(`${i18nPrefix}.usedInApps`, { num: 3 })}</div>
{/* show the used apps */}
<RiInformation2Line className='h-4 w-4 text-text-tertiary' />
</div>
)
}, [t])
return (
<Modal
isShow={true}
@@ -136,7 +127,6 @@ const UpdatePluginModal: FC<Props> = ({
<Badge className='mx-1' size="s" state={BadgeState.Warning}>
{`${originalPackageInfo.payload.version} -> ${targetPackageInfo.version}`}
</Badge>
{false && usedInAppInfo}
</>
}
/>