Giter Site home page Giter Site logo

Comments (14)

made-by-chris avatar made-by-chris commented on August 23, 2024

I'd be interested in helping with this. Perhaps this feature could be introduced alongside a delete button in the UI.

from superpowers-core.

elisee avatar elisee commented on August 23, 2024

Cool, sounds great! I created a separate issue for project deletion: #99.

The way I see it, for project upload:

  1. We could add an import project button at the top of the project hub. The ZIP should be uploaded as-is to the server through socket.io.
  2. The server would unpack it in a temporary place (and check that it has the proper structure probably?)
  3. fs.rename the temporary folder into the user data projects folder
  4. Load it through ProjectHub.loadProject
  5. Notify users subscribed to the project hub of the new project's existence and call back to the uploading user to let them know the result.

And we'll need to figure out which package to use for unzipping (I don't believe we already do any unzipping in Superpowers currently, but it's worth a quick check to see if we already have a useful dependency).

Is that enough info to get you started?

from superpowers-core.

bilou84 avatar bilou84 commented on August 23, 2024

We do some unzipping in server/index when installing/updating systems or plugins.
See https://github.com/superpowers/superpowers/blob/0840b1f95a9ade091892aba6b55522fd8af581a7/server/index.ts#L227.

from superpowers-core.

elisee avatar elisee commented on August 23, 2024

Ah right, somehow didn't think of that. Well then that's one less decision to make!

from superpowers-core.

Ilphrin avatar Ilphrin commented on August 23, 2024

Hi! Is there any new stuff about this issue? :) Importing a project is a very interesting feature

from superpowers-core.

Ilphrin avatar Ilphrin commented on August 23, 2024

Hi! I would like to try this issue :3
I don't know yet enough Electron, nodeJS, Jade, etc.. But I'd love to learn!
I don't know how much time I will need to finish it :/

from superpowers-core.

made-by-chris avatar made-by-chris commented on August 23, 2024

sorry for dropping this back then, have been moving country / job etc.

from superpowers-core.

bilou84 avatar bilou84 commented on August 23, 2024

Hi guys! Sure feel free to give it a shot @Ilphrin! We haven't worked on it at all so what @elisee specified above should still be pretty much valid.

You can open a pull request when you have some basics going on even if it's not finished and we can then help you if needed.

And no problem @basiclaser ;)

from superpowers-core.

Ilphrin avatar Ilphrin commented on August 23, 2024

Hi @bilou84 , thanks :) I am on Discord so I will probably ask for help.
By the way, the format inside the Zip content of the project should it be exactly like a project inside the superpowers' folder or like what we have when we do "Build Project"?

from superpowers-core.

bilou84 avatar bilou84 commented on August 23, 2024

The discord chat is more about helping each other on how to use Superpowers.
This chat is the more suited one to talk about Superpowers development: https://gitter.im/superpowers/dev

As for your question, we should use the source project. So the data inside the Superpowers folder indeed. The exported project could be very different from the source (although it's not at the moment on the game system, but that is not a requirement). We can't provide a general way to convert it back into the source data.

from superpowers-core.

Ilphrin avatar Ilphrin commented on August 23, 2024

Thanks, I am registered now on gitter, if there is some question I will post it on there :)

OK, that's what I thought but wasn't sure. By the way, shouldn't there be a button in "Build Project" to export in a ZIP file, that can be imported back later?

from superpowers-core.

bilou84 avatar bilou84 commented on August 23, 2024

I don't know if it should be a part of the build project interface or in the server hub where you can see all projects and where you should be able to import them. But we definitly need something to export the project as well.

from superpowers-core.

Ilphrin avatar Ilphrin commented on August 23, 2024

IMHO, the "Build Project" button should be entirely in the server hub, as the project interface has already a lot of stuff printed and maybe later will need to show more things, but the server hub has a lot of free space to show something like this.

from superpowers-core.

Ilphrin avatar Ilphrin commented on August 23, 2024

I have the core of the code to fix this, but I have some troubles with the last point

Notify users subscribed to the project hub of the new project's existence and call back to the uploading user to let them know the result.

I don't understand exactly what are these variables (manifest and actualIndex).

from superpowers-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.