Add profiles settings page
This commit is contained in:
@@ -46,8 +46,10 @@ pub struct BrowserSnapshot {
|
||||
pub installed_plugins: Vec<InstalledPlugin>,
|
||||
pub plugin_audit_events: Vec<PluginAuditEvent>,
|
||||
pub spaces: Vec<Space>,
|
||||
pub profiles: Vec<Profile>,
|
||||
pub active_tab_id: TabId,
|
||||
pub active_space_id: SpaceId,
|
||||
pub active_profile_id: ProfileId,
|
||||
pub active_space_name: String,
|
||||
pub active_profile_name: String,
|
||||
pub active_download_policy: DownloadPolicy,
|
||||
@@ -198,9 +200,11 @@ impl BrowserCore {
|
||||
installed_plugins: self.installed_plugins.clone(),
|
||||
plugin_audit_events: self.plugin_audit_events.clone(),
|
||||
spaces: self.spaces.clone(),
|
||||
profiles: self.profiles.clone(),
|
||||
tabs: self.visible_tabs(),
|
||||
active_tab_id: self.active_tab_id.clone(),
|
||||
active_space_id: self.active_space_id.clone(),
|
||||
active_profile_id: self.active_profile_id.clone(),
|
||||
active_space_name: active_space.name().to_string(),
|
||||
active_profile_name: active_profile.name().to_string(),
|
||||
active_download_policy: active_profile.download_policy().clone(),
|
||||
|
||||
@@ -168,7 +168,9 @@ fn new_profile_command_creates_and_selects_named_profile() -> Result<(), Box<dyn
|
||||
let active_tab = core.active_tab()?;
|
||||
|
||||
assert_eq!(intent, Some(CommandIntent::Command("new-profile Personal".to_string())));
|
||||
assert_eq!(snapshot.profiles.len(), 2);
|
||||
assert_eq!(snapshot.active_profile_name, "Personal");
|
||||
assert_eq!(snapshot.active_profile_id, active_tab.profile_id().clone());
|
||||
assert_ne!(active_tab.profile_id(), &default_profile_id);
|
||||
assert_eq!(active_tab.url().as_str(), "ely://new-tab");
|
||||
assert_eq!(snapshot.command_query, "");
|
||||
|
||||
Reference in New Issue
Block a user