use super::SettingsUI;
use super::section::section_matches;
use std::collections::HashSet;
mod dynamic_sources;
mod management;
pub fn show(
ui: &mut egui::Ui,
settings: &mut SettingsUI,
changes_this_frame: &mut bool,
collapsed: &mut HashSet<String>,
) {
let query = settings.search_query.trim().to_lowercase();
if section_matches(
&query,
"Profile Management",
&[
"profile",
"manage",
"create",
"edit",
"delete",
"duplicate",
"default",
],
) {
management::show_management_section(ui, settings, collapsed);
}
if section_matches(
&query,
"Display Options",
&[
"drawer",
"button",
"toggle",
"show",
"hide",
"profile indicator",
],
) {
management::show_display_options_section(ui, settings, changes_this_frame, collapsed);
}
if section_matches(
&query,
"Dynamic Profile Sources",
&[
"dynamic", "remote", "url", "fetch", "refresh", "team", "shared", "download", "sync",
],
) {
dynamic_sources::show_dynamic_sources_section(ui, settings, changes_this_frame, collapsed);
}
}
pub fn keywords() -> &'static [&'static str] {
&[
"profile",
"profiles",
"shell",
"shell selection",
"login shell",
"login",
"bash",
"zsh",
"fish",
"powershell",
"tags",
"inheritance",
"shortcut",
"auto switch",
"hostname",
"ssh",
"ssh host",
"ssh user",
"ssh port",
"identity file",
"remote",
"connection",
"profile drawer",
"dynamic",
"dynamic profiles",
"remote url",
"fetch",
"refresh",
"team",
"shared",
"download",
"sync",
"duplicate",
"default profile",
"set default",
"conflict resolution",
"http headers",
"headers",
"max download",
"download size",
"fetch timeout",
"tmux",
"tmux session",
"auto-connect",
]
}