| 202 | } |
| 203 | |
| 204 | const BulkActions = ({ names }: { names?: Array<string> }) => { |
| 205 | const { wantedList, latestList } = makeLists(names) |
| 206 | if (wantedList.length === 0 && latestList.length === 0) return null |
| 207 | return ( |
| 208 | <div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}> |
| 209 | {btn('All → wanted', () => |
| 210 | (devtoolsEventClient as any).emit('upgrade-dependencies-bulk', { |
| 211 | list: wantedList, |
| 212 | } as any), |
| 213 | )} |
| 214 | {btn( |
| 215 | 'All → latest', |
| 216 | () => |
| 217 | (devtoolsEventClient as any).emit('upgrade-dependencies-bulk', { |
| 218 | list: latestList, |
| 219 | } as any), |
| 220 | 'ghost', |
| 221 | )} |
| 222 | </div> |
| 223 | ) |
| 224 | } |
| 225 | |
| 226 | const renderDeps = (title: string, deps?: Record<string, string>) => { |
| 227 | const names = Object.keys(deps || {}) |