Skip to content
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

Plugin architecture to support user add-ons #1693

Merged
merged 19 commits into from
Nov 10, 2024
Merged

Conversation

billz
Copy link
Member

@billz billz commented Nov 5, 2024

Resolves #1692

@assachs
Copy link

assachs commented Nov 7, 2024

I think "return false" is missing in PluginManager.handlePageAction

TypeError: RaspAP\Plugins\PluginManager::handlePageAction(): Return value must be of type bool, none returned
 at RaspAP.Plugins.PluginManager.handlePageAction(PluginManager.php:89)
 at require_once(page_actions.php:10)
 at (main)(index.php:116)

@assachs
Copy link

assachs commented Nov 7, 2024

Also two Problems with sidebar:

Adblock is shown, but it's disabled:

$this->addItem(_('Ad Blocking'), 'far fa-hand-paper', 'adblock_conf', 40,
    fn() => defined('RASPI_ADBLOCK_ENABLED') && **RASPI_HOTSPOT_ENABLED** && !$_SESSION["bridgedEnabled"]
);

RestAPI:

$this->addItem(_('RestAPI'), 'fas fa-puzzle-piece', 'restapi_conf', 120,
    fn() => defined('**RASPI_VNSTAT_ENABLED'**) && **RASPI_VNSTAT_ENABLED**
);

@billz
Copy link
Member Author

billz commented Nov 7, 2024

I think "return false" is missing in PluginManager.handlePageAction

In testing, the PluginManager did not handle multiple plugin instances. So this is still in active development.

Will look into the sidebar issues, thanks.

@billz
Copy link
Member Author

billz commented Nov 8, 2024

@assachs these issues have been resolved. your testing is appreciated!

@billz billz merged commit b74db94 into master Nov 10, 2024
3 checks passed
@billz billz deleted the feat/plugin-architecture branch November 10, 2024 08:23
@assachs
Copy link

assachs commented Nov 10, 2024

I migrated my plugin to the new plugin architecture. Everything worked very well. Thank you for implementing it.

@billz billz mentioned this pull request Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin architecture to support user add-ons
2 participants