diff --git a/src-next/components/TreeNode/index.tsx b/src-next/components/TreeNode/index.tsx index 073ca48..0a5ab22 100644 --- a/src-next/components/TreeNode/index.tsx +++ b/src-next/components/TreeNode/index.tsx @@ -40,11 +40,11 @@ const TreeNode: React.FC = ({ node, rootSize }) => {
- {node.name} - Subfolders: {node.subfolderCount} - Files: {node.fileCount} - Size: {beautifyBytes(node.totalSize)} -
+ {node.path} + Subfolders: {node.subfolderCount} + Files: {node.fileCount} + Size: {beautifyBytes(node.totalSize)} +
70 ? 'red' : percentage > 40 ? 'yellow' : ''}`} diff --git a/src-next/css/index.css b/src-next/css/index.css index 044dc98..aed58e2 100644 --- a/src-next/css/index.css +++ b/src-next/css/index.css @@ -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; +} diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 8fbd5c5..ab66f8d 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -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(); }