FilesList: add download all button#105
Draft
bqi343 wants to merge 4 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
bqi343
commented
Jun 13, 2023
| const fileData = snap.val(); | ||
| console.log('fileData:'); | ||
| console.log(fileData); | ||
| const code = 'TODO'; // extract from fileData? |
Member
Author
There was a problem hiding this comment.
TODO: get code from YJS? idk how YJS works @thecodingwizard
Member
Author
There was a problem hiding this comment.
for legacy IDE, would want to iterate over editor-[lang] for each lang and obtain the code for each of them
Member
There was a problem hiding this comment.
For YJS:
- Edit https://github.com/cpinitiative/ide-yjs/blob/main/src/index.ts to add a route to access / download a file. Specifically, https://github.com/cpinitiative/ide-yjs/blob/764c6277af0e2f6c23e6719590d500eb91ce122f/src/index.ts#L64 here
targetDoc.getText("monaco")probably will give you the code. - in this repository, add an api route similar to /copyFile, but instead of copying the file it just returns the contents of a particular file
- in this file, call the api route to get the file
If we wanted to be really fancy, we could even make the YJS server API handler return a ZIP file containing all of that users' files, so we only have to make one API request to get all the files.
Member
There was a problem hiding this comment.
For Firepad:
https://firepad.io/docs/#headless is probably what we want.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
todos: