mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-08-23 23:10:17 +05:30
feat(media): add Image/Audio/Video Tools dialogs wired to new operation backends
Adds Tools > Image/Audio/Video Tools... menu items and a single dynamic renderer dialog (src/renderer/media-operations-dialog.js) that lets the user pick a media-kind-scoped operation, fill in its operation-specific fields, and invoke process-image-operation/process-audio-operation/ process-video-operation (Tasks 9-11's backends). File selection reuses the existing <input type="file"> + file.path convention; the one folder picker need (video frame extraction) reuses the existing generic select-folder/folder-selected IPC channels, so no new IPC handler was required. Also removes the three dead electronAPI.image/audio/video convenience blocks from preload.js (stale pre-Task-9-11 channel names, unused everywhere).
This commit is contained in:
@@ -11,6 +11,7 @@ const DOMPurify = createDOMPurify(window);
|
||||
const hljs = require('highlight.js');
|
||||
const { createEditor } = require('./editor/codemirror-setup');
|
||||
const { undo, redo } = require('@codemirror/commands');
|
||||
const { showMediaOperationsDialog } = require('./renderer/media-operations-dialog');
|
||||
|
||||
/**
|
||||
* Toggle body classes that drive the monospace font + ligatures CSS tokens.
|
||||
@@ -3723,6 +3724,17 @@ ipcRenderer.on('show-pdf-editor-dialog', (event, operation, openedFilePath) => {
|
||||
currentPDFOperation = operation;
|
||||
showPDFEditorDialog(operation, openedFilePath);
|
||||
});
|
||||
|
||||
// Show Media Operations Dialogs (Tools > Image/Audio/Video Tools...)
|
||||
ipcRenderer.on('show-image-converter', () => {
|
||||
showMediaOperationsDialog('image');
|
||||
});
|
||||
ipcRenderer.on('show-audio-converter', () => {
|
||||
showMediaOperationsDialog('audio');
|
||||
});
|
||||
ipcRenderer.on('show-video-converter', () => {
|
||||
showMediaOperationsDialog('video');
|
||||
});
|
||||
function showPDFEditorDialog(operation, openedFilePath = null) {
|
||||
const title = document.getElementById('pdf-editor-title');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user