Compare commits

..

10 Commits

Author SHA1 Message Date
Julian Freeman
e041523dbd add type of browser 2026-04-16 19:24:00 -04:00
Julian Freeman
aac78b4b9c support color avatar 2026-04-16 19:11:43 -04:00
Julian Freeman
3e7bf3a7ce support internal icon 2026-04-16 18:59:08 -04:00
Julian Freeman
c3501d00af fix ext icon 2026-04-16 18:50:04 -04:00
Julian Freeman
076b3a273f fix refresh icon 2026-04-16 18:27:15 -04:00
Julian Freeman
6cf4e6b56f op sidebar ui 2026-04-16 18:23:14 -04:00
Julian Freeman
c61b516410 fix table ui 2026-04-16 18:20:14 -04:00
Julian Freeman
c2fec5a960 switch to table 2026-04-16 18:15:16 -04:00
Julian Freeman
761e4f3186 sort detailed profiles 2026-04-16 17:53:18 -04:00
Julian Freeman
65b9401726 detailed profiles info 2026-04-16 17:50:33 -04:00
159 changed files with 982 additions and 320 deletions

View File

@@ -34,7 +34,7 @@ pub fn resolve_browser_configs(app: &AppHandle) -> Result<Vec<BrowserConfigEntry
.map(|config| BrowserConfigEntry {
id: config.id,
source: BrowserConfigSource::Custom,
browser_family_id: None,
browser_family_id: config.browser_family_id.or(config.icon_key.clone()),
icon_key: config.icon_key,
name: config.name,
executable_path: config.executable_path,
@@ -61,6 +61,7 @@ pub fn create_custom_browser_config(
});
let executable_path = input.executable_path.trim();
let user_data_path = input.user_data_path.trim();
let browser_family_id = infer_browser_family_id(icon_key.as_deref());
if name.is_empty() {
return Err("Name is required.".to_string());
@@ -77,6 +78,7 @@ pub fn create_custom_browser_config(
id: generate_custom_config_id(),
name: name.to_string(),
icon_key,
browser_family_id,
executable_path: executable_path.to_string(),
user_data_path: user_data_path.to_string(),
});
@@ -197,3 +199,12 @@ fn generate_custom_config_id() -> String {
.unwrap_or(0);
format!("custom-{timestamp}")
}
fn infer_browser_family_id(icon_key: Option<&str>) -> Option<String> {
match icon_key {
Some("chrome") => Some("chrome".to_string()),
Some("edge") => Some("edge".to_string()),
Some("brave") => Some("brave".to_string()),
_ => None,
}
}

View File

@@ -1,4 +1,4 @@
use std::collections::BTreeSet;
use std::collections::{BTreeMap, BTreeSet};
use serde::{Deserialize, Serialize};
@@ -37,6 +37,9 @@ pub struct ProfileSummary {
pub name: String,
pub email: Option<String>,
pub avatar_data_url: Option<String>,
pub avatar_icon: Option<String>,
pub default_avatar_fill_color: Option<i64>,
pub default_avatar_stroke_color: Option<i64>,
pub avatar_label: String,
pub path: String,
}
@@ -49,6 +52,7 @@ pub struct ExtensionSummary {
pub version: Option<String>,
pub icon_data_url: Option<String>,
pub profile_ids: Vec<String>,
pub profiles: Vec<AssociatedProfileSummary>,
}
#[derive(Serialize)]
@@ -57,6 +61,32 @@ pub struct BookmarkSummary {
pub url: String,
pub title: String,
pub profile_ids: Vec<String>,
pub profiles: Vec<BookmarkAssociatedProfileSummary>,
}
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct AssociatedProfileSummary {
pub id: String,
pub name: String,
pub avatar_data_url: Option<String>,
pub avatar_icon: Option<String>,
pub default_avatar_fill_color: Option<i64>,
pub default_avatar_stroke_color: Option<i64>,
pub avatar_label: String,
}
#[derive(Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct BookmarkAssociatedProfileSummary {
pub id: String,
pub name: String,
pub avatar_data_url: Option<String>,
pub avatar_icon: Option<String>,
pub default_avatar_fill_color: Option<i64>,
pub default_avatar_stroke_color: Option<i64>,
pub avatar_label: String,
pub bookmark_path: String,
}
#[derive(Serialize)]
@@ -107,6 +137,8 @@ pub struct CustomBrowserConfigRecord {
pub name: String,
#[serde(default)]
pub icon_key: Option<String>,
#[serde(default)]
pub browser_family_id: Option<String>,
pub executable_path: String,
pub user_data_path: String,
}
@@ -124,10 +156,12 @@ pub struct TempExtension {
pub version: Option<String>,
pub icon_data_url: Option<String>,
pub profile_ids: BTreeSet<String>,
pub profiles: BTreeMap<String, AssociatedProfileSummary>,
}
pub struct TempBookmark {
pub url: String,
pub title: String,
pub profile_ids: BTreeSet<String>,
pub profiles: BTreeMap<String, BookmarkAssociatedProfileSummary>,
}

View File

@@ -10,8 +10,9 @@ use tauri::AppHandle;
use crate::{
config_store,
models::{
BookmarkSummary, BrowserConfigEntry, BrowserStats, BrowserView, ExtensionSummary,
ProfileSummary, ScanResponse, TempBookmark, TempExtension,
AssociatedProfileSummary, BookmarkAssociatedProfileSummary, BookmarkSummary,
BrowserConfigEntry, BrowserStats, BrowserView, ExtensionSummary, ProfileSummary,
ScanResponse, TempBookmark, TempExtension,
},
utils::{first_non_empty, load_image_as_data_url, pick_latest_subdirectory, read_json_file},
};
@@ -57,14 +58,15 @@ fn scan_browser(config: BrowserConfigEntry) -> Option<BrowserView> {
}
let profile_info = profile_cache.and_then(|cache| cache.get(&profile_id));
profiles.push(build_profile_summary(
let profile_summary = build_profile_summary(
&root,
&profile_path,
&profile_id,
profile_info,
));
scan_extensions_for_profile(&profile_path, &profile_id, &mut extensions);
scan_bookmarks_for_profile(&profile_path, &profile_id, &mut bookmarks);
);
scan_extensions_for_profile(&profile_path, &profile_summary, &mut extensions);
scan_bookmarks_for_profile(&profile_path, &profile_summary, &mut bookmarks);
profiles.push(profile_summary);
}
let profiles = sort_profiles(profiles);
@@ -76,6 +78,7 @@ fn scan_browser(config: BrowserConfigEntry) -> Option<BrowserView> {
version: entry.version,
icon_data_url: entry.icon_data_url,
profile_ids: entry.profile_ids.into_iter().collect(),
profiles: entry.profiles.into_values().collect(),
})
.collect::<Vec<_>>();
let bookmarks = bookmarks
@@ -84,6 +87,7 @@ fn scan_browser(config: BrowserConfigEntry) -> Option<BrowserView> {
url: entry.url,
title: entry.title,
profile_ids: entry.profile_ids.into_iter().collect(),
profiles: entry.profiles.into_values().collect(),
})
.collect::<Vec<_>>();
@@ -150,6 +154,17 @@ fn build_profile_summary(
.map(str::to_string);
let avatar_data_url = resolve_profile_avatar(root, profile_path, profile_info);
let avatar_icon = profile_info
.and_then(|value| value.get("avatar_icon"))
.and_then(Value::as_str)
.filter(|value| !value.is_empty())
.map(str::to_string);
let default_avatar_fill_color = profile_info
.and_then(|value| value.get("default_avatar_fill_color"))
.and_then(Value::as_i64);
let default_avatar_stroke_color = profile_info
.and_then(|value| value.get("default_avatar_stroke_color"))
.and_then(Value::as_i64);
let avatar_label = name
.chars()
.find(|character| !character.is_whitespace())
@@ -161,6 +176,9 @@ fn build_profile_summary(
name,
email,
avatar_data_url,
avatar_icon,
default_avatar_fill_color,
default_avatar_stroke_color,
avatar_label,
path: profile_path.display().to_string(),
}
@@ -188,7 +206,7 @@ fn resolve_profile_avatar(
fn scan_extensions_for_profile(
profile_path: &Path,
profile_id: &str,
profile: &ProfileSummary,
extensions: &mut BTreeMap<String, TempExtension>,
) {
let extensions_root = profile_path.join("Extensions");
@@ -231,6 +249,7 @@ fn scan_extensions_for_profile(
version: version.clone(),
icon_data_url: icon_data_url.clone(),
profile_ids: BTreeSet::new(),
profiles: BTreeMap::new(),
});
if entry.name == entry.id && name != extension_id {
@@ -242,7 +261,19 @@ fn scan_extensions_for_profile(
if entry.icon_data_url.is_none() {
entry.icon_data_url = icon_data_url.clone();
}
entry.profile_ids.insert(profile_id.to_string());
entry.profile_ids.insert(profile.id.clone());
entry
.profiles
.entry(profile.id.clone())
.or_insert_with(|| AssociatedProfileSummary {
id: profile.id.clone(),
name: profile.name.clone(),
avatar_data_url: profile.avatar_data_url.clone(),
avatar_icon: profile.avatar_icon.clone(),
default_avatar_fill_color: profile.default_avatar_fill_color,
default_avatar_stroke_color: profile.default_avatar_stroke_color,
avatar_label: profile.avatar_label.clone(),
});
}
}
@@ -337,7 +368,7 @@ fn icon_candidates_from_object(map: &serde_json::Map<String, Value>) -> Vec<(u32
fn scan_bookmarks_for_profile(
profile_path: &Path,
profile_id: &str,
profile: &ProfileSummary,
bookmarks: &mut BTreeMap<String, TempBookmark>,
) {
let bookmarks_path = profile_path.join("Bookmarks");
@@ -350,14 +381,15 @@ fn scan_bookmarks_for_profile(
};
for root in roots.values() {
collect_bookmarks(root, profile_id, bookmarks);
collect_bookmarks(root, profile, bookmarks, &[]);
}
}
fn collect_bookmarks(
node: &Value,
profile_id: &str,
profile: &ProfileSummary,
bookmarks: &mut BTreeMap<String, TempBookmark>,
ancestors: &[String],
) {
match node.get("type").and_then(Value::as_str) {
Some("url") => {
@@ -381,17 +413,47 @@ fn collect_bookmarks(
url: url.to_string(),
title: title.clone(),
profile_ids: BTreeSet::new(),
profiles: BTreeMap::new(),
});
if entry.title == entry.url && title != url {
entry.title = title;
}
entry.profile_ids.insert(profile_id.to_string());
entry.profile_ids.insert(profile.id.clone());
let bookmark_path = if ancestors.is_empty() {
"Root".to_string()
} else {
ancestors.join(" > ")
};
entry
.profiles
.entry(profile.id.clone())
.or_insert_with(|| BookmarkAssociatedProfileSummary {
id: profile.id.clone(),
name: profile.name.clone(),
avatar_data_url: profile.avatar_data_url.clone(),
avatar_icon: profile.avatar_icon.clone(),
default_avatar_fill_color: profile.default_avatar_fill_color,
default_avatar_stroke_color: profile.default_avatar_stroke_color,
avatar_label: profile.avatar_label.clone(),
bookmark_path,
});
}
Some("folder") => {
if let Some(children) = node.get("children").and_then(Value::as_array) {
let folder_name = node
.get("name")
.and_then(Value::as_str)
.filter(|value| !value.is_empty());
let next_ancestors = if let Some(name) = folder_name {
let mut path = ancestors.to_vec();
path.push(name.to_string());
path
} else {
ancestors.to_vec()
};
for child in children {
collect_bookmarks(child, profile_id, bookmarks);
collect_bookmarks(child, profile, bookmarks, &next_ancestors);
}
}
}

View File

@@ -6,7 +6,7 @@ import { useBrowserManager } from "./composables/useBrowserManager";
const {
activeSection,
bookmarkProfilesExpanded,
associatedProfilesModal,
bookmarkSortKey,
browserConfigs,
browserMonogram,
@@ -21,7 +21,6 @@ const {
domainFromUrl,
error,
extensionMonogram,
extensionProfilesExpanded,
extensionSortKey,
isDeletingConfig,
isOpeningProfile,
@@ -36,11 +35,12 @@ const {
savingConfig,
sectionCount,
selectedBrowserId,
showBookmarkProfilesModal,
showExtensionProfilesModal,
sortedBookmarks,
sortedExtensions,
sortedProfiles,
toggleBookmarkProfiles,
toggleExtensionProfiles,
closeAssociatedProfilesModal,
} = useBrowserManager();
</script>
@@ -109,16 +109,16 @@ const {
:section-count="sectionCount"
:is-opening-profile="isOpeningProfile"
:extension-monogram="extensionMonogram"
:extension-profiles-expanded="extensionProfilesExpanded"
:bookmark-profiles-expanded="bookmarkProfilesExpanded"
:domain-from-url="domainFromUrl"
:associated-profiles-modal="associatedProfilesModal"
@update:active-section="activeSection = $event"
@update:profile-sort-key="profileSortKey = $event"
@update:extension-sort-key="extensionSortKey = $event"
@update:bookmark-sort-key="bookmarkSortKey = $event"
@open-profile="(browserId, profileId) => openBrowserProfile(browserId, profileId)"
@toggle-extension-profiles="toggleExtensionProfiles"
@toggle-bookmark-profiles="toggleBookmarkProfiles"
@show-extension-profiles="showExtensionProfilesModal"
@show-bookmark-profiles="showBookmarkProfilesModal"
@close-associated-profiles="closeAssociatedProfilesModal"
/>
<template v-else>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Some files were not shown because too many files have changed in this diff Show More