mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 02:12:30 +01:00
parent
2c7f166e01
commit
68804229d6
@ -267,6 +267,8 @@ function initApp() {
|
||||
await shell.trashItem(path);
|
||||
});
|
||||
|
||||
ipcMain.handle('showItemInFolder', (e, path) => shell.showItemInFolder(path));
|
||||
|
||||
ipcMain.on('apiKeyboardActionResponse', (e, { id }) => {
|
||||
apiKeyboardActionRequests.get(id)?.();
|
||||
});
|
||||
|
@ -11,10 +11,9 @@ import { parseDuration, formatDuration } from '../util/duration';
|
||||
import Swal, { swalToastOptions, toast } from '../swal';
|
||||
import { parseYouTube } from '../edlFormats';
|
||||
import CopyClipboardButton from '../components/CopyClipboardButton';
|
||||
import { isWindows } from '../util';
|
||||
import { isWindows, showItemInFolder } from '../util';
|
||||
|
||||
const { dialog } = window.require('@electron/remote');
|
||||
const { shell } = window.require('electron');
|
||||
|
||||
const ReactSwal = withReactContent(Swal);
|
||||
|
||||
@ -571,7 +570,7 @@ export async function openDirToast({ filePath, text, html, ...props }) {
|
||||
html,
|
||||
...props,
|
||||
});
|
||||
if (value) shell.showItemInFolder(filePath);
|
||||
if (value) showItemInFolder(filePath);
|
||||
}
|
||||
|
||||
const UnorderedList = ({ children }) => <ul style={{ paddingLeft: '1em' }}>{children}</ul>;
|
||||
|
@ -19,6 +19,9 @@ const { unlink } = fsExtra;
|
||||
|
||||
const trashFile = async (path) => ipcRenderer.invoke('tryTrashItem', path);
|
||||
|
||||
export const showItemInFolder = async (path) => ipcRenderer.invoke('showItemInFolder', path);
|
||||
|
||||
|
||||
export function getFileDir(filePath) {
|
||||
return filePath ? dirname(filePath) : undefined;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user