Add 'Save Image As...' to context menu and image saving support
Introduces a 'Save Image As...' option to the context menu for images. Implements IPC handlers in main and preload scripts to save images from URLs, data URLs, and file URLs. Updates renderer logic to handle saving images from various sources, including blob URLs via webview conversion.
This commit is contained in:
+3
-1
@@ -70,7 +70,9 @@ const electronAPI = {
|
||||
} catch (err) {
|
||||
console.error('IPC showContextMenu error:', err);
|
||||
}
|
||||
}
|
||||
},
|
||||
saveImageToDisk: async (suggestedName, dataUrl) => ipcRenderer.invoke('save-image-from-dataurl', { suggestedName, dataUrl }),
|
||||
saveImageFromNet: async (url) => ipcRenderer.invoke('save-image-from-url', { url })
|
||||
};
|
||||
|
||||
// Cache for bookmarks to reduce IPC calls
|
||||
|
||||
Reference in New Issue
Block a user