-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: plugin system (currently just sprites) #95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than adding the added plugins to a list I think it would be cool to make the installed plugins have a green background and the uninstalled plugins have a red background.
red should be a "danger" color and only used when we want to alert the user of a destructive action. plus, I want plugins to be able to have full backgrounds. The current images are only placeholders. I like the idea of browsing available plugins without having to go past the list of installed ones. I'll move the installed plugin list to its own tab in case the user wants to see those. |
Okay.
Oh they are temporary? I really like them... But we should replace the BW sprite pack with Also a delete button would be good. |
Actually I like them too. I still think icons should be allowed to take up the whole card in the future, so I'll stick to the bottom right 'installed' chip. And I picked Reshiram because I like its design the most :) same with Xerneas
Yeah that's a task in the PR description. I want to finish those before merging |
Instead of a delete + disable/enable dropdown. What about adding the delete to the bottom left and the disable/enable togglable by clicking the card. Edit: next commit makes these changes but it can be reversed. |
I added a delete button. Currently there is a delay from when the trash can is clicked and when the card is removed. This is due to the backend having to delete all the files then removing the card. Also I can't get the title styling right, so maybe you could look at it. |
I like it. I started making a dropdown because I want the option to expand and view plugin details, but I'm thinking clicking the main body of the card will expand to show details, and click the enabled chip to toggle enabled/disabled And yeah the delete button should probably hide the plugin immediately, even if the files haven't finished deleting. I'll hopefully get to it tomorrow |
This is so it can be reused in the future
@evanwporter I think this is ready to merge into main. If you have a chance can you look at it? I made a couple styling changes, plus a backend change that will require you to redownload any plugins on the Available Plugins page. Let me know if you run into any issues, I'm going to do some testing on Windows and Linux to make sure |
The just added sprite packs don't see to be working. But I haven't done any in depth investigation @andrewbenington |
@evanwporter |
@andrewbenington Ah okay then it looks good. |
* Resource pack backend * simplified `download_images_from_github_folder` * Added to `tauriInvoker` * Added button to `Settings` to download gen1 sprite pack. * ran linter * initial plugin downloading/management * plugin card styling * fix for missing plugin folder * async plugin download * keep home mounted * housekeeping * move gen 7 sprites to plugin * start persisting enabled plugins * plugin enabled status persists correctly * move gen 6 sprites to plugin * newline * bump version * standardize icon.png and assets dir * image url update * Created delete plugin command * Set up debugging in VSCode (#97) * Update launch.json * Update tasks.json * Fixed it * renamed `ui` to `frontend` * Got rid of problem matcher * Fixed vscode settings * fix last opened (recent saves) (#99) * plugin page tabs * installed plugin dropdown menu * fix unused var * added `deletePlugin` to tauri invoker * Added `deletePLugin` to backend * made changes * implmented deletion of plugin * ran linter * Moved code w/i `delete_plugin` to generic `util::delete_folder`. This is so it can be reused in the future * Fixed display * Fixed plugin icon covering chips * added `deletePlugin` to dummy backend * delete icon styling * update plugin metadata fields * log plugin sprite error instead of displaying * cleanup plugin state on delete * coalesce plugin actions * include version and api_version in downloaded metadata --------- Co-authored-by: evanwporter <[email protected]> Co-authored-by: Evan <[email protected]>
* move modal into pokemon details component * feat: plugin system (currently just sprites) (#95) * Resource pack backend * simplified `download_images_from_github_folder` * Added to `tauriInvoker` * Added button to `Settings` to download gen1 sprite pack. * ran linter * initial plugin downloading/management * plugin card styling * fix for missing plugin folder * async plugin download * keep home mounted * housekeeping * move gen 7 sprites to plugin * start persisting enabled plugins * plugin enabled status persists correctly * move gen 6 sprites to plugin * newline * bump version * standardize icon.png and assets dir * image url update * Created delete plugin command * Set up debugging in VSCode (#97) * Update launch.json * Update tasks.json * Fixed it * renamed `ui` to `frontend` * Got rid of problem matcher * Fixed vscode settings * fix last opened (recent saves) (#99) * plugin page tabs * installed plugin dropdown menu * fix unused var * added `deletePlugin` to tauri invoker * Added `deletePLugin` to backend * made changes * implmented deletion of plugin * ran linter * Moved code w/i `delete_plugin` to generic `util::delete_folder`. This is so it can be reused in the future * Fixed display * Fixed plugin icon covering chips * added `deletePlugin` to dummy backend * delete icon styling * update plugin metadata fields * log plugin sprite error instead of displaying * cleanup plugin state on delete * coalesce plugin actions * include version and api_version in downloaded metadata --------- Co-authored-by: evanwporter <[email protected]> Co-authored-by: Evan <[email protected]> * chore: make rust functions more eloquent (#105) * make rust functions more eloquent * with_icon_bytes consumes self * navigation works * WIP box position display * box indicator is temporary and sizes better * cargo lock changes --------- Co-authored-by: evanwporter <[email protected]> Co-authored-by: Evan <[email protected]>
Description
Added a plugin system, currently allowing new sprite packs to be used but to be expanded to PKM and SAV types in the future. Allowed plugins are listed at OpenHome-Plugins/plugins.json, which can be updated as needed.
To Do
Investigate ways to make code loading more secure(After some investigation, securing plugin code from accessing web resources like Tauri code is not possible without severely restricting what plugins can do. It will be important to vet the plugins allowed to be installed)
Restrict plugins from calling Tauri codeIssues
Fixes #89