fix: ctrl v

This commit is contained in:
Ibrahima G. Coulibaly
2025-02-23 00:41:04 +01:00
parent 23c5d63ad9
commit 62f084eb45
5 changed files with 151 additions and 112 deletions

104
.idea/workspace.xml generated
View File

@@ -5,7 +5,11 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="chore: use string tools"> <list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="chore: use string tools">
<change beforePath="$PROJECT_DIR$/src/pages/list/shuffle/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/list/shuffle/index.tsx" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/components/Hero.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/Hero.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/components/Navbar/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/Navbar/index.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/components/input/ToolFileInput.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/input/ToolFileInput.tsx" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -33,12 +37,12 @@
&quot;assignee&quot;: &quot;iib0011&quot; &quot;assignee&quot;: &quot;iib0011&quot;
} }
}</component> }</component>
<component name="GithubPullRequestsUISettings">{ <component name="GithubPullRequestsUISettings"><![CDATA[{
&quot;selectedUrlAndAccountId&quot;: { "selectedUrlAndAccountId": {
&quot;url&quot;: &quot;https://github.com/iib0011/omni-tools&quot;, "url": "https://github.com/iib0011/omni-tools.git",
&quot;accountId&quot;: &quot;59b4836a-7ded-49a0-a358-5e8d81d0d44b&quot; "accountId": "45f8cd51-000f-4ba4-a4c6-c4d96ac9b1e5"
} }
}</component> }]]></component>
<component name="KubernetesApiProvider">{ <component name="KubernetesApiProvider">{
&quot;isMigrated&quot;: true &quot;isMigrated&quot;: true
}</component> }</component>
@@ -57,46 +61,47 @@
<option name="hideEmptyMiddlePackages" value="true" /> <option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;, "ASKED_ADD_EXTERNAL_FILES": "true",
&quot;ASKED_SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;, "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
&quot;Docker.Dockerfile build.executor&quot;: &quot;Run&quot;, "Docker.Dockerfile build.executor": "Run",
&quot;Docker.Dockerfile.executor&quot;: &quot;Run&quot;, "Docker.Dockerfile.executor": "Run",
&quot;Playwright.JoinText Component.executor&quot;: &quot;Run&quot;, "Playwright.JoinText Component.executor": "Run",
&quot;Playwright.JoinText Component.should merge text pieces with specified join character.executor&quot;: &quot;Run&quot;, "Playwright.JoinText Component.should merge text pieces with specified join character.executor": "Run",
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "true",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;Vitest.compute function (1).executor&quot;: &quot;Run&quot;, "RunOnceActivity.git.unshallow": "true",
&quot;Vitest.compute function.executor&quot;: &quot;Run&quot;, "Vitest.compute function (1).executor": "Run",
&quot;Vitest.mergeText.executor&quot;: &quot;Run&quot;, "Vitest.compute function.executor": "Run",
&quot;Vitest.mergeText.should merge lines and preserve blank lines when deleteBlankLines is false.executor&quot;: &quot;Run&quot;, "Vitest.mergeText.executor": "Run",
&quot;Vitest.mergeText.should merge lines, preserve blank lines and trailing spaces when both deleteBlankLines and deleteTrailingSpaces are false.executor&quot;: &quot;Run&quot;, "Vitest.mergeText.should merge lines and preserve blank lines when deleteBlankLines is false.executor": "Run",
&quot;git-widget-placeholder&quot;: &quot;main&quot;, "Vitest.mergeText.should merge lines, preserve blank lines and trailing spaces when both deleteBlankLines and deleteTrailingSpaces are false.executor": "Run",
&quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;, "git-widget-placeholder": "main",
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;, "ignore.virus.scanning.warn.message": "true",
&quot;last_opened_file_path&quot;: &quot;C:/Users/HP/IdeaProjects/omni-tools/src/components/options&quot;, "kotlin-language-version-configured": "true",
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;, "last_opened_file_path": "C:/Users/HP/IdeaProjects/omni-tools/src/components/options",
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;, "node.js.detected.package.eslint": "true",
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;, "node.js.detected.package.tslint": "true",
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;, "node.js.selected.package.eslint": "(autodetect)",
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;, "node.js.selected.package.tslint": "(autodetect)",
&quot;npm.dev.executor&quot;: &quot;Run&quot;, "nodejs_package_manager_path": "npm",
&quot;npm.lint.executor&quot;: &quot;Run&quot;, "npm.dev.executor": "Run",
&quot;npm.prebuild.executor&quot;: &quot;Run&quot;, "npm.lint.executor": "Run",
&quot;npm.script:create:tool.executor&quot;: &quot;Run&quot;, "npm.prebuild.executor": "Run",
&quot;npm.test.executor&quot;: &quot;Run&quot;, "npm.script:create:tool.executor": "Run",
&quot;npm.test:e2e.executor&quot;: &quot;Run&quot;, "npm.test.executor": "Run",
&quot;npm.test:e2e:run.executor&quot;: &quot;Run&quot;, "npm.test:e2e.executor": "Run",
&quot;prettierjs.PrettierConfiguration.Package&quot;: &quot;C:\\Users\\HP\\IdeaProjects\\omni-tools\\node_modules\\prettier&quot;, "npm.test:e2e:run.executor": "Run",
&quot;project.structure.last.edited&quot;: &quot;Problems&quot;, "prettierjs.PrettierConfiguration.Package": "C:\\Users\\HP\\IdeaProjects\\omni-tools\\node_modules\\prettier",
&quot;project.structure.proportion&quot;: &quot;0.0&quot;, "project.structure.last.edited": "Problems",
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;, "project.structure.proportion": "0.0",
&quot;settings.editor.selected.configurable&quot;: &quot;settings.typescriptcompiler&quot;, "project.structure.side.proportion": "0.2",
&quot;ts.external.directory.path&quot;: &quot;C:\\Users\\HP\\IdeaProjects\\omni-tools\\node_modules\\typescript\\lib&quot;, "settings.editor.selected.configurable": "settings.typescriptcompiler",
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot; "ts.external.directory.path": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\typescript\\lib",
"vue.rearranger.settings.migration": "true"
} }
}</component> }]]></component>
<component name="ReactDesignerToolWindowState"> <component name="ReactDesignerToolWindowState">
<option name="myId2Visible"> <option name="myId2Visible">
<map> <map>
@@ -121,7 +126,7 @@
<recent name="C:\Users\HP\IdeaProjects\omni-tools\src\tools" /> <recent name="C:\Users\HP\IdeaProjects\omni-tools\src\tools" />
</key> </key>
</component> </component>
<component name="RunManager" selected="npm.lint"> <component name="RunManager" selected="npm.dev">
<configuration name="Dockerfile build" type="docker-deploy" factoryName="dockerfile" temporary="true" server-name="Docker"> <configuration name="Dockerfile build" type="docker-deploy" factoryName="dockerfile" temporary="true" server-name="Docker">
<deployment type="dockerfile"> <deployment type="dockerfile">
<settings> <settings>
@@ -187,8 +192,8 @@
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="npm.lint" />
<item itemvalue="npm.dev" /> <item itemvalue="npm.dev" />
<item itemvalue="npm.lint" />
<item itemvalue="Docker.Dockerfile build" /> <item itemvalue="Docker.Dockerfile build" />
<item itemvalue="Docker.Dockerfile" /> <item itemvalue="Docker.Dockerfile" />
<item itemvalue="npm.test:e2e" /> <item itemvalue="npm.test:e2e" />
@@ -198,8 +203,8 @@
<component name="SharedIndexes"> <component name="SharedIndexes">
<attachedChunks> <attachedChunks>
<set> <set>
<option value="bundled-jdk-9f38398b9061-39b83d9b5494-intellij.indexing.shared.core-IU-241.18034.62" /> <option value="bundled-jdk-9823dce3aa75-125ca727e0f0-intellij.indexing.shared.core-IU-243.24978.46" />
<option value="bundled-js-predefined-1d06a55b98c1-0b3e54e931b4-JavaScript-IU-241.18034.62" /> <option value="bundled-js-predefined-d6986cc7102b-76f8388c3a79-JavaScript-IU-243.24978.46" />
</set> </set>
</attachedChunks> </attachedChunks>
</component> </component>
@@ -244,6 +249,7 @@
<workItem from="1720729165596" duration="3258000" /> <workItem from="1720729165596" duration="3258000" />
<workItem from="1720911748039" duration="331000" /> <workItem from="1720911748039" duration="331000" />
<workItem from="1720912096050" duration="3065000" /> <workItem from="1720912096050" duration="3065000" />
<workItem from="1740259920741" duration="4992000" />
</task> </task>
<task id="LOCAL-00053" summary="chore: printRunningSum"> <task id="LOCAL-00053" summary="chore: printRunningSum">
<option name="closed" value="true" /> <option name="closed" value="true" />

View File

@@ -1,9 +1,9 @@
# OmniTools # OmniTools
Welcome to **OmniTools**, an open-source alternative to OnlineTools.com. Welcome to **OmniTools**, a self hosted alternative to OnlineTools.com.
This project offers a variety of online tools to help with everyday tasks, This project offers a variety of online tools to help with everyday tasks,
all available for free and open for community contributions. Please don't forget to star the repo to support us. all available for free and open for community contributions. Please don't forget to star the repo to support us.
Here is the [live](https://omnitools.netlify.app/) website. Here is the [demo](https://omnitools.netlify.app/) website.
![img.png](img.png) ![img.png](img.png)
@@ -76,20 +76,27 @@ npm run test
npm run test:e2e npm run test:e2e
``` ```
### Contributors
<a href="https://github.com/iib0011/omni-tools/graphs/contributors">
<img src="https://contrib.rocks/image?repo=iib0011/omni-tools" />
</a>
[//]: # (<img src="https://api.star-history.com/svg?repos=iib0011/omni-tools&type=Date">) [//]: # (<img src="https://api.star-history.com/svg?repos=iib0011/omni-tools&type=Date">)
## License ## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Contact ## 🤝 Looking to contribute?
For any questions or suggestions, feel free to open an issue or contact us at: We welcome contributions! You can help by:
Email: ibracool99@gmail.com - ✅ Reporting bugs
- ✅ Suggesting new features
- ✅ Improving documentation
- ✅ Submitting pull requests
Check CONTRIBUTING.md inside each subproject for details.
You can also join our [Discord server](https://discord.gg/A6eMSNwg)
### Contributors
<a href="https://github.com/iib0011/omni-tools/graphs/contributors">
<img src="https://contrib.rocks/image?repo=iib0011/omni-tools" />
</a>

View File

@@ -39,7 +39,7 @@ export default function Hero() {
<Box width={{ xs: '90%', md: '80%', lg: '60%' }}> <Box width={{ xs: '90%', md: '80%', lg: '60%' }}>
<Stack mb={1} direction={'row'} spacing={1} justifyContent={'center'}> <Stack mb={1} direction={'row'} spacing={1} justifyContent={'center'}>
<Typography sx={{ textAlign: 'center' }} fontSize={{ xs: 25, md: 30 }}> <Typography sx={{ textAlign: 'center' }} fontSize={{ xs: 25, md: 30 }}>
Transform Your Workflow with{' '} Get Things Done Quickly with{' '}
<Typography <Typography
fontSize={{ xs: 25, md: 30 }} fontSize={{ xs: 25, md: 30 }}
display={'inline'} display={'inline'}

View File

@@ -26,28 +26,26 @@ const Navbar: React.FC = () => {
const toggleDrawer = (open: boolean) => () => { const toggleDrawer = (open: boolean) => () => {
setDrawerOpen(open); setDrawerOpen(open);
}; };
const navItems: { label: string; path: string }[] = [
// { label: 'Features', path: '/features' }
// { label: 'About Us', path: '/about-us' }
];
const drawerList = ( const drawerList = (
<List> <List>
<ListItemButton onClick={() => navigate('/features')}> {navItems.map((navItem) => (
<ListItemText primary="Features" /> <ListItemButton onClick={() => navigate(navItem.path)}>
</ListItemButton> <ListItemText primary={navItem.label} />
<ListItemButton onClick={() => navigate('/about-us')}> </ListItemButton>
<ListItemText primary="About Us" /> ))}
</ListItemButton> <iframe
<ListItemButton src="https://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=star&count=true&size=large"
component="a" frameBorder="0"
href="https://github.com/iib0011/omni-tools" scrolling="0"
target="_blank" width="170"
rel="noopener noreferrer" height="30"
> title="GitHub"
<img ></iframe>
src={githubIcon}
alt="GitHub"
style={{ height: '24px', marginRight: '8px' }}
/>
<Typography variant="button">Star us</Typography>
</ListItemButton>
</List> </List>
); );
@@ -59,15 +57,27 @@ const Navbar: React.FC = () => {
<Toolbar sx={{ justifyContent: 'space-between', alignItems: 'center' }}> <Toolbar sx={{ justifyContent: 'space-between', alignItems: 'center' }}>
<Typography <Typography
onClick={() => navigate('/')} onClick={() => navigate('/')}
fontSize={20} fontSize={25}
sx={{ cursor: 'pointer' }} sx={{
cursor: 'pointer',
fontWeight: 600,
textShadow: '1px 1px 2px rgba(0,0,0,0.2)'
}}
color={'primary'} color={'primary'}
> >
OmniTools OmniTools
</Typography> </Typography>
{isMobile ? ( {isMobile ? (
<> <>
<IconButton color="inherit" onClick={toggleDrawer(true)}> <IconButton
color="inherit"
onClick={toggleDrawer(true)}
sx={{
'&:hover': {
backgroundColor: theme.palette.primary.main
}
}}
>
<MenuIcon /> <MenuIcon />
</IconButton> </IconButton>
<Drawer <Drawer
@@ -79,36 +89,35 @@ const Navbar: React.FC = () => {
</Drawer> </Drawer>
</> </>
) : ( ) : (
<Stack direction={'row'}> <Stack direction={'row'} spacing={2}>
<Button color="inherit"> {navItems.map((item) => (
<Link <Button
to="/features" key={item.label}
style={{ textDecoration: 'none', color: 'inherit' }} color="inherit"
sx={{
'&:hover': {
color: theme.palette.primary.main,
transition: 'color 0.3s ease',
backgroundColor: 'white'
}
}}
> >
Features <Link
</Link> to={item.path}
</Button> style={{ textDecoration: 'none', color: 'inherit' }}
<Button color="inherit"> >
<Link {item.label}
to="/about-us" </Link>
style={{ textDecoration: 'none', color: 'inherit' }} </Button>
> ))}
About Us <iframe
</Link> src="https://ghbtns.com/github-btn.html?user=iib0011&repo=omni-tools&type=star&count=true&size=large"
</Button> frameBorder="0"
<IconButton scrolling="0"
color="primary" width="170"
href="https://github.com/iib0011/omni-tools" height="30"
target="_blank" title="GitHub"
rel="noopener noreferrer" ></iframe>
>
<img
src={githubIcon}
alt="GitHub"
style={{ height: '24px', marginRight: '8px' }}
/>
<Typography variant="button">Star us</Typography>
</IconButton>
</Stack> </Stack>
)} )}
</Toolbar> </Toolbar>

View File

@@ -38,6 +38,14 @@ export default function ToolFileInput({
}); });
} }
}; };
const handlePaste = (event: ClipboardEvent) => {
const clipboardItems = event.clipboardData?.items ?? [];
const item = clipboardItems[0];
if (item.type.includes('image')) {
const file = item.getAsFile();
onChange(file!);
}
};
useEffect(() => { useEffect(() => {
if (value) { if (value) {
const objectUrl = URL.createObjectURL(value); const objectUrl = URL.createObjectURL(value);
@@ -57,6 +65,15 @@ export default function ToolFileInput({
const handleImportClick = () => { const handleImportClick = () => {
fileInputRef.current?.click(); fileInputRef.current?.click();
}; };
useEffect(() => {
window.addEventListener('paste', handlePaste);
return () => {
window.removeEventListener('paste', handlePaste);
};
}, [handlePaste]);
return ( return (
<Box> <Box>
<InputHeader title={title} /> <InputHeader title={title} />