1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-31 11:20:15 +02:00

fix and unify plugin load logic

This commit is contained in:
trendschau
2023-11-11 21:25:58 +01:00
parent d189f7918e
commit f21434bb72
6 changed files with 21 additions and 21 deletions

12
composer.lock generated
View File

@@ -2136,16 +2136,16 @@
},
{
"name": "symfony/yaml",
"version": "v5.4.30",
"version": "v5.4.31",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "c6980e82a6656f6ebfabfd82f7585794cb122554"
"reference": "f387675d7f5fc4231f7554baa70681f222f73563"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/c6980e82a6656f6ebfabfd82f7585794cb122554",
"reference": "c6980e82a6656f6ebfabfd82f7585794cb122554",
"url": "https://api.github.com/repos/symfony/yaml/zipball/f387675d7f5fc4231f7554baa70681f222f73563",
"reference": "f387675d7f5fc4231f7554baa70681f222f73563",
"shasum": ""
},
"require": {
@@ -2191,7 +2191,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v5.4.30"
"source": "https://github.com/symfony/yaml/tree/v5.4.31"
},
"funding": [
{
@@ -2207,7 +2207,7 @@
"type": "tidelift"
}
],
"time": "2023-10-27T18:36:14+00:00"
"time": "2023-11-03T14:41:28+00:00"
},
{
"name": "twig/twig",

View File

@@ -91,7 +91,7 @@ class Assets
public function activateVue()
{
$vueUrl = '<script src="' . $this->baseUrl . '/system/author/js/vue.js"></script>';
$vueUrl = '<script src="' . $this->baseUrl . '/system/typemill/author/js/vue.js"></script>';
if(!in_array($vueUrl, $this->JS))
{
$this->JS[] = $vueUrl;
@@ -100,7 +100,7 @@ class Assets
public function activateAxios()
{
$axiosUrl = '<script src="' . $this->baseUrl . '/system/author/js/axios.min.js"></script>';
$axiosUrl = '<script src="' . $this->baseUrl . '/system/typemill/author/js/axios.min.js"></script>';
if(!in_array($axiosUrl, $this->JS))
{
$this->JS[] = $axiosUrl;

View File

@@ -128,18 +128,14 @@ class Extension
public function getPlugins()
{
$pluginFolder = $this->storage->getFolderPath('pluginsFolder');
$pluginFolderC = scandir($pluginFolder);
$plugins = [];
foreach ($pluginFolderC as $key => $plugin)
$pluginlist = \Typemill\Static\Plugins::loadPlugins();
$plugins = [];
foreach($pluginlist as $plugin)
{
if (!in_array($plugin, [".",".."]))
{
if (is_dir($pluginFolder . DIRECTORY_SEPARATOR . $plugin))
{
$plugins[] = $plugin;
}
}
$plugins[] = $plugin['name'];
}
return $plugins;

View File

@@ -9,7 +9,7 @@ class Plugins
$rootpath = getcwd();
$pluginFolder = self::scanPluginFolder($rootpath);
$classNames = [];
# iterate over plugin folders
foreach($pluginFolder as $plugin)
{

View File

@@ -139,6 +139,11 @@ const app = Vue.createApp({
methods: {
getActiveClass(pluginname)
{
if(typeof this.formData[pluginname] == "undefined")
{
console.info(pluginname);
return;
}
if(this.formData[pluginname]['active'])
{
return 'bg-stone-200 dark:bg-stone-900';

View File

@@ -58,7 +58,6 @@ $settings = $settingsModel->loadSettings();
/****************************
* HANDLE DISPLAY ERRORS *
****************************/
if(isset($settings['displayErrorDetails']) && $settings['displayErrorDetails'])
{
ini_set('display_errors', 1);