mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-10-10 17:16:36 +00:00
docs(plugin-config): match the config tab, icon and web-action docs to the code
- PLUGIN_CONFIG_QUICK_START / PLUGIN_CONFIGURATION_TABS / PLUGIN_CONFIGURATION_GUIDE: there is no "Reset to Defaults" button (the tab has Refresh, Update, Uninstall, Save Configuration); plugin config hot-reloads (ConfigService + on_config_change), so no restart; the schema is found by the fixed name config_schema.json, not a manifest config_schema field; the tab row is "Plugin Manager", not "Plugins"; forms are server-rendered from /v3/partials/plugin-config/<id>; the duration hook is get_display_duration()/display_duration; a class_name mismatch raises PluginError; the store requires id, name, class_name and display_modes (not version); plugin_system.debug/log_level do not exist (use run.py -d / LEDMATRIX_DEBUG). Drop "future" features that shipped. - PLUGIN_CONFIG_CORE_PROPERTIES: list all of CORE_PLUGIN_PROPERTIES, including skin, skin_options and the vegas_* tuning keys. - PLUGIN_CUSTOM_ICONS: icon is only a Font Awesome class (fallback fa-puzzle-piece); emoji/URL icons and getPluginIcon() never existed in v3. Note that /api/v3/plugins/installed currently omits icon. - PLUGIN_WEB_UI_ACTIONS (+ example JSON): success_message, error_message and step1_message are never read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,9 +25,6 @@ Add a `web_ui_actions` array to your plugin's `manifest.json`:
|
||||
"script": "path/to/script.py",
|
||||
"oauth_flow": false,
|
||||
"section_description": "Optional section description",
|
||||
"success_message": "Action completed successfully",
|
||||
"error_message": "Action failed",
|
||||
"step1_message": "Authorization URL generated",
|
||||
"step2_prompt": "Please paste the full redirect URL:",
|
||||
"step2_button_text": "Complete Authentication"
|
||||
}
|
||||
@@ -52,12 +49,13 @@ Add a `web_ui_actions` array to your plugin's `manifest.json`:
|
||||
- **`color`**: Color theme - `"blue"`, `"green"`, `"red"`, `"yellow"`, `"purple"`, etc. (defaults to `"blue"`)
|
||||
- **`oauth_flow`**: Set to `true` for OAuth-style two-step authentication flows
|
||||
- **`section_description`**: Description shown at the top of the actions section
|
||||
- **`success_message`**: Message shown on successful completion
|
||||
- **`error_message`**: Message shown on failure
|
||||
- **`step1_message`**: Message shown after step 1 (for OAuth flows)
|
||||
- **`step2_prompt`**: Prompt text for step 2 redirect URL input
|
||||
- **`step2_button_text`**: Button text for step 2 (defaults to "Complete Authentication")
|
||||
|
||||
The status messages shown after an action runs come from the action's
|
||||
response (`message`), with built-in fallbacks such as "Action completed
|
||||
successfully"; there are no manifest fields for them.
|
||||
|
||||
## Action Types
|
||||
|
||||
### Script Actions (`type: "script"`)
|
||||
@@ -98,7 +96,6 @@ For two-step OAuth flows (e.g., Spotify):
|
||||
"color": "green",
|
||||
"script": "authenticate_spotify.py",
|
||||
"oauth_flow": true,
|
||||
"step1_message": "Authorization URL generated",
|
||||
"step2_prompt": "Please paste the full redirect URL from Spotify after authorization:",
|
||||
"step2_button_text": "Complete Authentication"
|
||||
}
|
||||
@@ -131,9 +128,6 @@ Here's a complete example for the `ledmatrix-music` plugin:
|
||||
"script": "authenticate_spotify.py",
|
||||
"oauth_flow": true,
|
||||
"section_description": "Authenticate with Spotify or YouTube Music to enable music playback display.",
|
||||
"success_message": "Spotify authentication completed successfully",
|
||||
"error_message": "Spotify authentication failed",
|
||||
"step1_message": "Authorization URL generated",
|
||||
"step2_prompt": "Please paste the full redirect URL from Spotify after authorization:",
|
||||
"step2_button_text": "Complete Authentication"
|
||||
},
|
||||
@@ -145,9 +139,7 @@ Here's a complete example for the `ledmatrix-music` plugin:
|
||||
"button_text": "Authenticate YTM",
|
||||
"icon": "fab fa-youtube",
|
||||
"color": "red",
|
||||
"script": "authenticate_ytm.py",
|
||||
"success_message": "YouTube Music authentication completed successfully",
|
||||
"error_message": "YouTube Music authentication failed"
|
||||
"script": "authenticate_ytm.py"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user