This commit is contained in:
Damien 2025-02-23 12:53:56 -05:00
parent 81c56acfe3
commit 40cf177f7f
3 changed files with 17 additions and 8 deletions

View File

@ -40,11 +40,11 @@ const TreeNode: React.FC<TreeNodeProps> = ({ node, rootSize }) => {
<div className="treeNode"> <div className="treeNode">
<div className="nodeHeader" onClick={toggleExpand}> <div className="nodeHeader" onClick={toggleExpand}>
<span className="nodeName">{node.name}</span> <span className="nodePath">{node.path}</span>
<span className="subfolderBadge">Subfolders: {node.subfolderCount}</span> <span className="subfolderBadge">Subfolders: {node.subfolderCount}</span>
<span className="fileBadge">Files: {node.fileCount}</span> <span className="fileBadge">Files: {node.fileCount}</span>
<span className="fileBadge">Size: {beautifyBytes(node.totalSize)}</span> <span className="fileBadge">Size: {beautifyBytes(node.totalSize)}</span>
</div> </div>
<div className="progressBarContainer"> <div className="progressBarContainer">
<div <div
className={`progressBar ${percentage > 70 ? 'red' : percentage > 40 ? 'yellow' : ''}`} className={`progressBar ${percentage > 70 ? 'red' : percentage > 40 ? 'yellow' : ''}`}

View File

@ -41,7 +41,7 @@ body {
padding: 5px; padding: 5px;
background-color: #333; background-color: #333;
color: #fff; color: #fff;
justify-content: flex-end; justify-content: space-between;
} }
.nodeName { .nodeName {
@ -91,3 +91,12 @@ body {
.children { .children {
margin-left: 10px; margin-left: 10px;
} }
.nodePath {
margin-right: 5px;
color: gray;
font-size: 0.8em;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

View File

@ -23,8 +23,8 @@ fn main() {
} }
#[tauri::command] #[tauri::command]
fn load_folders(app: AppHandle){ fn load_folders(app: AppHandle, folder_path: String){
let root_path = PathBuf::from("C:\\Users\\Damie\\Data443\\dim_argocd"); let root_path = PathBuf::from(folder_path);
let folder_data = folder_crawler::load_folder(root_path); let folder_data = folder_crawler::load_folder(root_path);
app.emit("folders-loaded", folder_data).unwrap(); app.emit("folders-loaded", folder_data).unwrap();
} }