Add local file open support and improve URL handling
Introduces a dialog to open local HTML files via Ctrl+O/Cmd+O, converting file paths to file:// URLs for navigation. Also improves input handling by stripping quotes and better detecting local file paths. Updates bookmarks and clears site history.
This commit is contained in:
@@ -55,6 +55,14 @@ const electronAPI = {
|
||||
console.error('IPC open-devtools error:', err);
|
||||
return Promise.reject(err);
|
||||
}
|
||||
},
|
||||
openLocalFile: async () => {
|
||||
try {
|
||||
return await ipcRenderer.invoke('show-open-file-dialog');
|
||||
} catch (err) {
|
||||
console.error('IPC openLocalFile error:', err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user