Skip to content

Commit

Permalink
fix: ctrl v
Browse files Browse the repository at this point in the history
  • Loading branch information
iib0011 committed Feb 22, 2025
1 parent 23c5d63 commit 62f084e
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 112 deletions.
104 changes: 55 additions & 49 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# 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,
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)

Expand Down Expand Up @@ -76,20 +76,27 @@ npm run test
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">)

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contact
## 🤝 Looking to contribute?

We welcome contributions! You can help by:

For any questions or suggestions, feel free to open an issue or contact us at:
- ✅ Reporting bugs
- ✅ Suggesting new features
- ✅ Improving documentation
- ✅ Submitting pull requests

Email: [email protected]
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>
2 changes: 1 addition & 1 deletion src/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function Hero() {
<Box width={{ xs: '90%', md: '80%', lg: '60%' }}>
<Stack mb={1} direction={'row'} spacing={1} justifyContent={'center'}>
<Typography sx={{ textAlign: 'center' }} fontSize={{ xs: 25, md: 30 }}>
Transform Your Workflow with{' '}
Get Things Done Quickly with{' '}
<Typography
fontSize={{ xs: 25, md: 30 }}
display={'inline'}
Expand Down
111 changes: 60 additions & 51 deletions src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,26 @@ const Navbar: React.FC = () => {
const toggleDrawer = (open: boolean) => () => {
setDrawerOpen(open);
};
const navItems: { label: string; path: string }[] = [
// { label: 'Features', path: '/features' }
// { label: 'About Us', path: '/about-us' }
];

const drawerList = (
<List>
<ListItemButton onClick={() => navigate('/features')}>
<ListItemText primary="Features" />
</ListItemButton>
<ListItemButton onClick={() => navigate('/about-us')}>
<ListItemText primary="About Us" />
</ListItemButton>
<ListItemButton
component="a"
href="https://github.com/iib0011/omni-tools"
target="_blank"
rel="noopener noreferrer"
>
<img
src={githubIcon}
alt="GitHub"
style={{ height: '24px', marginRight: '8px' }}
/>
<Typography variant="button">Star us</Typography>
</ListItemButton>
{navItems.map((navItem) => (
<ListItemButton onClick={() => navigate(navItem.path)}>
<ListItemText primary={navItem.label} />
</ListItemButton>
))}
<iframe
src="https://ghbtns.com/github-btn.html?user=twbs&repo=bootstrap&type=star&count=true&size=large"
frameBorder="0"
scrolling="0"
width="170"
height="30"
title="GitHub"
></iframe>
</List>
);

Expand All @@ -59,15 +57,27 @@ const Navbar: React.FC = () => {
<Toolbar sx={{ justifyContent: 'space-between', alignItems: 'center' }}>
<Typography
onClick={() => navigate('/')}
fontSize={20}
sx={{ cursor: 'pointer' }}
fontSize={25}
sx={{
cursor: 'pointer',
fontWeight: 600,
textShadow: '1px 1px 2px rgba(0,0,0,0.2)'
}}
color={'primary'}
>
OmniTools
</Typography>
{isMobile ? (
<>
<IconButton color="inherit" onClick={toggleDrawer(true)}>
<IconButton
color="inherit"
onClick={toggleDrawer(true)}
sx={{
'&:hover': {
backgroundColor: theme.palette.primary.main
}
}}
>
<MenuIcon />
</IconButton>
<Drawer
Expand All @@ -79,36 +89,35 @@ const Navbar: React.FC = () => {
</Drawer>
</>
) : (
<Stack direction={'row'}>
<Button color="inherit">
<Link
to="/features"
style={{ textDecoration: 'none', color: 'inherit' }}
>
Features
</Link>
</Button>
<Button color="inherit">
<Link
to="/about-us"
style={{ textDecoration: 'none', color: 'inherit' }}
<Stack direction={'row'} spacing={2}>
{navItems.map((item) => (
<Button
key={item.label}
color="inherit"
sx={{
'&:hover': {
color: theme.palette.primary.main,
transition: 'color 0.3s ease',
backgroundColor: 'white'
}
}}
>
About Us
</Link>
</Button>
<IconButton
color="primary"
href="https://github.com/iib0011/omni-tools"
target="_blank"
rel="noopener noreferrer"
>
<img
src={githubIcon}
alt="GitHub"
style={{ height: '24px', marginRight: '8px' }}
/>
<Typography variant="button">Star us</Typography>
</IconButton>
<Link
to={item.path}
style={{ textDecoration: 'none', color: 'inherit' }}
>
{item.label}
</Link>
</Button>
))}
<iframe
src="https://ghbtns.com/github-btn.html?user=iib0011&repo=omni-tools&type=star&count=true&size=large"
frameBorder="0"
scrolling="0"
width="170"
height="30"
title="GitHub"
></iframe>
</Stack>
)}
</Toolbar>
Expand Down
17 changes: 17 additions & 0 deletions src/components/input/ToolFileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
if (value) {
const objectUrl = URL.createObjectURL(value);
Expand All @@ -57,6 +65,15 @@ export default function ToolFileInput({
const handleImportClick = () => {
fileInputRef.current?.click();
};

useEffect(() => {
window.addEventListener('paste', handlePaste);

return () => {
window.removeEventListener('paste', handlePaste);
};
}, [handlePaste]);

return (
<Box>
<InputHeader title={title} />
Expand Down

0 comments on commit 62f084e

Please sign in to comment.