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="nodeHeader" onClick={toggleExpand}>
<span className="nodeName">{node.name}</span>
<span className="subfolderBadge">Subfolders: {node.subfolderCount}</span>
<span className="fileBadge">Files: {node.fileCount}</span>
<span className="fileBadge">Size: {beautifyBytes(node.totalSize)}</span>
</div>
<span className="nodePath">{node.path}</span>
<span className="subfolderBadge">Subfolders: {node.subfolderCount}</span>
<span className="fileBadge">Files: {node.fileCount}</span>
<span className="fileBadge">Size: {beautifyBytes(node.totalSize)}</span>
</div>
<div className="progressBarContainer">
<div
className={`progressBar ${percentage > 70 ? 'red' : percentage > 40 ? 'yellow' : ''}`}

View File

@ -41,7 +41,7 @@ body {
padding: 5px;
background-color: #333;
color: #fff;
justify-content: flex-end;
justify-content: space-between;
}
.nodeName {
@ -91,3 +91,12 @@ body {
.children {
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]
fn load_folders(app: AppHandle){
let root_path = PathBuf::from("C:\\Users\\Damie\\Data443\\dim_argocd");
fn load_folders(app: AppHandle, folder_path: String){
let root_path = PathBuf::from(folder_path);
let folder_data = folder_crawler::load_folder(root_path);
app.emit("folders-loaded", folder_data).unwrap();
}