Conversation
… file and validate file name
lidel
left a comment
There was a problem hiding this comment.
Thank you @badgooooor!
I've pushed small cosmetic changes to follow similar visual language as in "Bulk import" feature added in #2307, added CLI tutor docs and unified CAR Import/Export language.
Looks good to merge on my end, but would appreciate second set of eyes on UI and language.
@SgtPooki / @2color mind taking a final look, and if looks ok, merge?
2color
left a comment
There was a problem hiding this comment.
I discovered a bug when you try to import and the name already exists. I've pushed a229aa9 to fix this, in lieu of a better way to show errors, I just throw a more helpful error.
Besides that, LGTM.
Thanks @badgooooor 🎉
|
i'm getting an error when importing: commenting out changes from a229aa9 resolves this. Will look into a more robust fix. |
|
@SgtPooki sorry that was oversight on my end. I used the |
| // TODO: Not sure why we do this. Perhaps a generic error is used | ||
| // to avoid leaking private information via Countly? | ||
| throw Object.assign(new Error('ipfs.files.cp call failed'), { |
There was a problem hiding this comment.
FYI we no longer use countly.. we need to strip it from this repo
| name: NameService; | ||
| object: ObjectService; | ||
| config: ConfigService; | ||
| dag: KuboRPCClient['dag']; |
There was a problem hiding this comment.
note that I removed the custom defined types here so we don't have to manage them later. Ideally this whole IPFSService will be going away and we'll be using types from kubo-rpc-client going forward.
| "description": "Choose a CAR file to import a DAG from and specify a name for it to be imported into the current directory.", | ||
| "selectCARButtonText": "Select CAR…", | ||
| "namePlaceholder": "Name", | ||
| "renameImportPath": "Rename import" |
| // @ts-expect-error - https://github.com/ipfs/js-kubo-rpc-client/issues/278 | ||
| const result = await all(ipfs.dag.import(stream, { |
There was a problem hiding this comment.
kubo-rpc-client types need updated.
| {/* Gray text showing original car file name */} | ||
| { file != null | ||
| ? <div className='mt1 f7 center charcoal-muted tl w-90'>{file.path}</div> | ||
| : null | ||
| } |
There was a problem hiding this comment.
new display of original car file
| <p className='mt0 center charcoal tl w-90'>{t('addByCarModal.description')}</p> | ||
| </div> | ||
|
|
||
| <label htmlFor='import-car-file-name' className='mt0 f7 center charcoal-muted tl w-90'>{t('addByCarModal.renameImportPath')}</label> |
## [4.6.0](v4.5.0...v4.6.0) (2025-03-14) CID `bafybeibpaa5kqrj4gkemiswbwndjqiryl65cks64ypwtyerxixu56gnvvm` --- ### Features * add dark mode ([#2322](#2322)) ([d751fc6](d751fc6)) * bulk CIDs import ([#2307](#2307)) ([830a30d](830a30d)), closes [#2305](#2305) [#2306](#2306) [#2293](#2293) [#2290](#2290) [#2306](#2306) [#2304](#2304) [#2302](#2302) [#2292](#2292) [#2291](#2291) [#2296](#2296) [#2303](#2303) [#2295](#2295) [#2308](#2308) * **files:** CAR Import ([#2323](#2323)) ([e66590f](e66590f)) ### Trivial Changes * Pull transifex translations ([#2340](#2340)) ([493223a](493223a)) * Pull transifex translations ([#2343](#2343)) ([007dbb1](007dbb1))
|
🎉 This PR is included in version 4.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |

Description
IPFSService