mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Fix for getUserPlugins, add installed btn
This commit is contained in:
parent
759e5dcf5d
commit
2c0ace4500
@ -61,12 +61,11 @@ class PluginInstaller
|
|||||||
$installed = false;
|
$installed = false;
|
||||||
|
|
||||||
foreach ($installedPlugins as $plugin) {
|
foreach ($installedPlugins as $plugin) {
|
||||||
if (str_contains($plugin, $plugins['manifest']['namespace'])) {
|
if (str_contains($plugin, $manifest['namespace'])) {
|
||||||
$installed = true;
|
$installed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$plugins[] = [
|
$plugins[] = [
|
||||||
'manifest' => $manifest,
|
'manifest' => $manifest,
|
||||||
'installed' => $installed
|
'installed' => $installed
|
||||||
@ -427,7 +426,9 @@ class PluginInstaller
|
|||||||
$manifest = htmlspecialchars(json_encode($plugin['manifest']), ENT_QUOTES, 'UTF-8');
|
$manifest = htmlspecialchars(json_encode($plugin['manifest']), ENT_QUOTES, 'UTF-8');
|
||||||
$installed = $plugin['installed'];
|
$installed = $plugin['installed'];
|
||||||
if ($installed === true ) {
|
if ($installed === true ) {
|
||||||
$status = 'Installed';
|
$button = '<button type="button" class="btn btn-outline btn-primary btn-sm text-nowrap"
|
||||||
|
name="plugin-details" data-bs-toggle="modal" data-bs-target="#install-user-plugin"
|
||||||
|
data-plugin-manifest="' .$manifest. '"> ' . _("Installed") .'</button>';
|
||||||
} else {
|
} else {
|
||||||
$button = '<button type="button" class="btn btn-outline btn-primary btn-sm text-nowrap"
|
$button = '<button type="button" class="btn btn-outline btn-primary btn-sm text-nowrap"
|
||||||
name="install-plugin" data-bs-toggle="modal" data-bs-target="#install-user-plugin"
|
name="install-plugin" data-bs-toggle="modal" data-bs-target="#install-user-plugin"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user