Open haoxiang-xu opened 1 month ago
Involved files:
/Users/red/Desktop/GITRepo/surface-editor/MAIN/main.js
/Users/red/Desktop/GITRepo/surface-editor/MAIN/preload.js
/Users/red/Desktop/GITRepo/surface-editor/MAIN/src/DATA_MANAGERs/root_data_manager/root_data_manager.js
receives directory-data at line 516-519
directory-data
useEffect(() => { window.electron.receive("directory-data", (data) => { setDir(data); }); }, []);
access file content by calling readFile() at line 864-875
readFile()
const access_file_content_by_path = (path) => { if (path in file) { return file[path].fileContent; } else { //AWAIT ELECTRONJS TO LOAD THAT PATH IN SYSTEM window.electronAPI.readFile( access_file_absolute_path_by_path(path), path ); return path; } };
/Users/red/Desktop/GITRepo/surface-editor/MAIN/src/COMPONENTs/explorer/explorer.js
calls triggerReadDir() at line 474-476
triggerReadDir()
case "openFolder": { window.electronAPI.triggerReadDir(); }
/Users/red/Desktop/GITRepo/surface-editor/MAIN/src/BUILTIN_COMPONENTs/headerMenuBar/headerMenuBar.js
app window frame control at line 40-48
const handleClose = () => { window.electron.send("window-control", "close"); }; const handleMinimize = () => { window.electron.send("window-control", "minimize"); }; const handleMaximize = () => { window.electron.send("window-control", "maximize"); };
Involved files:
/Users/red/Desktop/GITRepo/surface-editor/MAIN/main.js
/Users/red/Desktop/GITRepo/surface-editor/MAIN/preload.js
/Users/red/Desktop/GITRepo/surface-editor/MAIN/src/DATA_MANAGERs/root_data_manager/root_data_manager.js
receives
directory-data
at line 516-519access file content by calling
readFile()
at line 864-875/Users/red/Desktop/GITRepo/surface-editor/MAIN/src/COMPONENTs/explorer/explorer.js
calls
triggerReadDir()
at line 474-476/Users/red/Desktop/GITRepo/surface-editor/MAIN/src/BUILTIN_COMPONENTs/headerMenuBar/headerMenuBar.js
app window frame control at line 40-48