feat: configurable tab labels and search nouns from plugin metadata
Script plugins can now declare tab_label and search_noun in their plugin.toml [[providers]] section. These flow through the Provider trait, IPC ProviderDesc, and into the UI via provider_meta::resolve(). Unknown plugins auto-generate labels from type_id instead of showing a generic "Plugin" label.
This commit is contained in:
@@ -34,6 +34,8 @@ fn register_provider(lua: &Lua, config: Table) -> LuaResult<()> {
|
||||
.get::<Option<String>>("default_icon")?
|
||||
.unwrap_or_else(|| "application-x-addon".to_string());
|
||||
let prefix: Option<String> = config.get("prefix")?;
|
||||
let tab_label: Option<String> = config.get("tab_label")?;
|
||||
let search_noun: Option<String> = config.get("search_noun")?;
|
||||
|
||||
// Check if it's a dynamic provider (has query function) or static (has refresh)
|
||||
let has_query: bool = config.contains_key("query")?;
|
||||
@@ -70,6 +72,8 @@ fn register_provider(lua: &Lua, config: Table) -> LuaResult<()> {
|
||||
default_icon,
|
||||
prefix,
|
||||
is_dynamic,
|
||||
tab_label,
|
||||
search_noun,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user