|
|
|
@ -1,28 +1,31 @@
|
|
|
|
'use client'
|
|
|
|
'use client'
|
|
|
|
import type { FC } from 'react'
|
|
|
|
import type { FC } from 'react'
|
|
|
|
import React from 'react'
|
|
|
|
import React from 'react'
|
|
|
|
|
|
|
|
import NoPluginSelected from './no-plugin-selected'
|
|
|
|
|
|
|
|
import type { AUTO_UPDATE_MODE } from './types'
|
|
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
type Props = {
|
|
|
|
|
|
|
|
updateMode: AUTO_UPDATE_MODE
|
|
|
|
value: string[] // plugin ids
|
|
|
|
value: string[] // plugin ids
|
|
|
|
onChange: (value: string[]) => void
|
|
|
|
onChange: (value: string[]) => void
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const PluginsPicker: FC<Props> = ({
|
|
|
|
const PluginsPicker: FC<Props> = ({
|
|
|
|
|
|
|
|
updateMode,
|
|
|
|
value,
|
|
|
|
value,
|
|
|
|
onChange,
|
|
|
|
onChange,
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
const hasSelected = value.length > 0
|
|
|
|
const hasSelected = value.length > 0
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className='rounded-xl'>
|
|
|
|
<div className='mt-2 rounded-[10px] bg-background-section-burn p-2.5'>
|
|
|
|
{hasSelected ? (
|
|
|
|
{hasSelected ? (
|
|
|
|
<div className='flex justify-between'>
|
|
|
|
<div className='flex justify-between'>
|
|
|
|
<div>Selected plugins will not auto-update</div>
|
|
|
|
<div>Selected plugins will not auto-update</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
) : (
|
|
|
|
) : (
|
|
|
|
<div className='system-xs-regular text-center text-text-tertiary'>
|
|
|
|
<NoPluginSelected updateMode={updateMode} />
|
|
|
|
Only selected plugins will auto-update. No plugins are currently selected, so no plugins will auto-update.
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|