update to v2.1.0 #5
|
@ -234,6 +234,12 @@ function loadPlugin(
|
||||||
Array.prototype.push.apply(loadedPlugins.widgets, plugin.widgets);
|
Array.prototype.push.apply(loadedPlugins.widgets, plugin.widgets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!plugin.settingWidgets) plugin.settingWidgets = [];
|
||||||
|
if (plugin.settingWidgets.length > 0) {
|
||||||
|
plugin.settingWidgets.forEach((widget) => (widget.name = plugin.id + '.' + widget.name));
|
||||||
|
Array.prototype.push.apply(loadedPlugins.settingWidgets, plugin.settingWidgets);
|
||||||
|
}
|
||||||
|
|
||||||
loadedPlugins.plugins.push({
|
loadedPlugins.plugins.push({
|
||||||
id: plugin.id,
|
id: plugin.id,
|
||||||
name: plugin.name,
|
name: plugin.name,
|
||||||
|
@ -252,6 +258,7 @@ export async function loadPlugins(backend: FG.Backend, baseRoutes: RouteRecordRa
|
||||||
shortcuts: [],
|
shortcuts: [],
|
||||||
outerShortcuts: [],
|
outerShortcuts: [],
|
||||||
widgets: [],
|
widgets: [],
|
||||||
|
settingWidgets: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
// Wait for all plugins to be loaded
|
// Wait for all plugins to be loaded
|
||||||
|
|
Loading…
Reference in New Issue