mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-19 05:59:34 +02:00
chore: remove unnecessary files
This commit is contained in:
22
.idea/workspace.xml
generated
22
.idea/workspace.xml
generated
@@ -6,11 +6,7 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="feat: crop png">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/components/ToolContent.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/ToolContent.tsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/components/input/ToolFileInput.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/input/ToolFileInput.tsx" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/pages/tools/image/png/crop/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/tools/image/png/crop/index.tsx" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
@@ -334,14 +330,6 @@
|
||||
<workItem from="1740933006573" duration="3679000" />
|
||||
<workItem from="1741475969294" duration="4215000" />
|
||||
</task>
|
||||
<task id="LOCAL-00103" summary="feat: update readme">
|
||||
<option name="closed" value="true" />
|
||||
<created>1740276092528</created>
|
||||
<option name="number" value="00103" />
|
||||
<option name="presentableId" value="LOCAL-00103" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1740276092528</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00104" summary="feat: compress png">
|
||||
<option name="closed" value="true" />
|
||||
<created>1740321721526</created>
|
||||
@@ -726,7 +714,15 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1741487735223</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="152" />
|
||||
<task id="LOCAL-00152" summary="feat: crop png">
|
||||
<option name="closed" value="true" />
|
||||
<created>1741492688761</created>
|
||||
<option name="number" value="00152" />
|
||||
<option name="presentableId" value="LOCAL-00152" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1741492688761</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="153" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
|
@@ -80,15 +80,6 @@ export default function ToolFileInput({
|
||||
}
|
||||
};
|
||||
|
||||
const handlePaste = (event: ClipboardEvent) => {
|
||||
const clipboardItems = event.clipboardData?.items ?? [];
|
||||
const item = clipboardItems[0];
|
||||
if (item && item.type.includes('image')) {
|
||||
const file = item.getAsFile();
|
||||
if (file) onChange(file);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (value) {
|
||||
const objectUrl = URL.createObjectURL(value);
|
||||
@@ -138,7 +129,6 @@ export default function ToolFileInput({
|
||||
}
|
||||
};
|
||||
|
||||
// Handle crop changes from react-image-crop
|
||||
const handleCropChange = (newCrop: Crop) => {
|
||||
setCrop(newCrop);
|
||||
};
|
||||
@@ -156,12 +146,20 @@ export default function ToolFileInput({
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const handlePaste = (event: ClipboardEvent) => {
|
||||
const clipboardItems = event.clipboardData?.items ?? [];
|
||||
const item = clipboardItems[0];
|
||||
if (item && item.type.includes('image')) {
|
||||
const file = item.getAsFile();
|
||||
if (file) onChange(file);
|
||||
}
|
||||
};
|
||||
window.addEventListener('paste', handlePaste);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('paste', handlePaste);
|
||||
};
|
||||
}, [handlePaste]);
|
||||
}, [onChange]);
|
||||
|
||||
return (
|
||||
<Box>
|
||||
|
@@ -1,6 +0,0 @@
|
||||
import { expect, describe, it } from 'vitest';
|
||||
// import { } from './service';
|
||||
//
|
||||
// describe('crop', () => {
|
||||
//
|
||||
// })
|
Reference in New Issue
Block a user