mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
UI plugin dependencies (#4307)
* Add requires field to UI plugin config * Use defer instead of async for useScript * Load plugins based on dependency * Document new field
This commit is contained in:
@@ -43,6 +43,10 @@ ui:
|
||||
javascript:
|
||||
- <path to javascript file>
|
||||
|
||||
# optional list of plugin IDs to load prior to this plugin
|
||||
requires:
|
||||
- <plugin ID>
|
||||
|
||||
# optional list of assets
|
||||
assets:
|
||||
urlPrefix: fsLocation
|
||||
@@ -77,6 +81,9 @@ The `exec`, `interface`, `errLog` and `tasks` fields are used only for plugins w
|
||||
The `css` and `javascript` field values may be relative paths to the plugin configuration file, or
|
||||
may be full external URLs.
|
||||
|
||||
The `requires` field is a list of plugin IDs which must have their javascript/css files loaded
|
||||
before this plugins javascript/css files.
|
||||
|
||||
The `assets` field is a map of URL prefixes to filesystem paths relative to the plugin configuration file.
|
||||
Assets are mounted to the `/plugin/{pluginID}/assets` path.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user