mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-20 14:39:34 +02:00
chore: examples button visibility
This commit is contained in:
149
.idea/workspace.xml
generated
149
.idea/workspace.xml
generated
@@ -4,14 +4,12 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="feat: convert to jpg">
|
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="fix: favicons">
|
||||||
<change afterPath="$PROJECT_DIR$/src/pages/tools/image/generic/editor/index.tsx" afterDir="false" />
|
|
||||||
<change afterPath="$PROJECT_DIR$/src/pages/tools/image/generic/editor/meta.ts" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<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-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$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/components/ToolInputAndResult.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/ToolInputAndResult.tsx" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/components/ToolHeader.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/ToolHeader.tsx" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/pages/tools/image/generic/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/tools/image/generic/index.ts" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/pages/tools/pdf/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/tools/pdf/index.ts" 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" />
|
||||||
@@ -233,56 +231,56 @@
|
|||||||
<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"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ASKED_ADD_EXTERNAL_FILES": "true",
|
"ASKED_ADD_EXTERNAL_FILES": "true",
|
||||||
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"Docker.Dockerfile build.executor": "Run",
|
"Docker.Dockerfile build.executor": "Run",
|
||||||
"Docker.Dockerfile.executor": "Run",
|
"Docker.Dockerfile.executor": "Run",
|
||||||
"Playwright.Create transparent PNG.should make png color transparent.executor": "Run",
|
"Playwright.Create transparent PNG.should make png color transparent.executor": "Run",
|
||||||
"Playwright.JoinText Component.executor": "Run",
|
"Playwright.JoinText Component.executor": "Run",
|
||||||
"Playwright.JoinText Component.should merge text pieces with specified join character.executor": "Run",
|
"Playwright.JoinText Component.should merge text pieces with specified join character.executor": "Run",
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"RunOnceActivity.git.unshallow": "true",
|
"RunOnceActivity.git.unshallow": "true",
|
||||||
"Vitest.compute function (1).executor": "Run",
|
"Vitest.compute function (1).executor": "Run",
|
||||||
"Vitest.compute function.executor": "Run",
|
"Vitest.compute function.executor": "Run",
|
||||||
"Vitest.mergeText.executor": "Run",
|
"Vitest.mergeText.executor": "Run",
|
||||||
"Vitest.mergeText.should merge lines and preserve blank lines when deleteBlankLines is false.executor": "Run",
|
"Vitest.mergeText.should merge lines and preserve blank lines when deleteBlankLines is false.executor": "Run",
|
||||||
"Vitest.mergeText.should merge lines, preserve blank lines and trailing spaces when both deleteBlankLines and deleteTrailingSpaces are false.executor": "Run",
|
"Vitest.mergeText.should merge lines, preserve blank lines and trailing spaces when both deleteBlankLines and deleteTrailingSpaces are false.executor": "Run",
|
||||||
"Vitest.parsePageRanges.executor": "Run",
|
"Vitest.parsePageRanges.executor": "Run",
|
||||||
"Vitest.removeDuplicateLines function.executor": "Run",
|
"Vitest.removeDuplicateLines function.executor": "Run",
|
||||||
"Vitest.removeDuplicateLines function.newlines option.executor": "Run",
|
"Vitest.removeDuplicateLines function.newlines option.executor": "Run",
|
||||||
"Vitest.removeDuplicateLines function.newlines option.should filter newlines when newlines is set to filter.executor": "Run",
|
"Vitest.removeDuplicateLines function.newlines option.should filter newlines when newlines is set to filter.executor": "Run",
|
||||||
"Vitest.replaceText function (regexp mode).should return the original text when passed an invalid regexp.executor": "Run",
|
"Vitest.replaceText function (regexp mode).should return the original text when passed an invalid regexp.executor": "Run",
|
||||||
"Vitest.replaceText function.executor": "Run",
|
"Vitest.replaceText function.executor": "Run",
|
||||||
"Vitest.timeBetweenDates.executor": "Run",
|
"Vitest.timeBetweenDates.executor": "Run",
|
||||||
"git-widget-placeholder": "main",
|
"git-widget-placeholder": "main",
|
||||||
"ignore.virus.scanning.warn.message": "true",
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
"kotlin-language-version-configured": "true",
|
"kotlin-language-version-configured": "true",
|
||||||
"last_opened_file_path": "C:/Users/Ibrahima/IdeaProjects/omni-tools/public",
|
"last_opened_file_path": "C:/Users/Ibrahima/IdeaProjects/omni-tools/public",
|
||||||
"node.js.detected.package.eslint": "true",
|
"node.js.detected.package.eslint": "true",
|
||||||
"node.js.detected.package.tslint": "true",
|
"node.js.detected.package.tslint": "true",
|
||||||
"node.js.selected.package.eslint": "(autodetect)",
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
"node.js.selected.package.tslint": "(autodetect)",
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
"nodejs_package_manager_path": "npm",
|
"nodejs_package_manager_path": "npm",
|
||||||
"npm.build.executor": "Run",
|
"npm.build.executor": "Run",
|
||||||
"npm.dev.executor": "Run",
|
"npm.dev.executor": "Run",
|
||||||
"npm.lint.executor": "Run",
|
"npm.lint.executor": "Run",
|
||||||
"npm.prebuild.executor": "Run",
|
"npm.prebuild.executor": "Run",
|
||||||
"npm.script:create:tool.executor": "Run",
|
"npm.script:create:tool.executor": "Run",
|
||||||
"npm.test.executor": "Run",
|
"npm.test.executor": "Run",
|
||||||
"npm.test:e2e.executor": "Run",
|
"npm.test:e2e.executor": "Run",
|
||||||
"npm.test:e2e:run.executor": "Run",
|
"npm.test:e2e:run.executor": "Run",
|
||||||
"prettierjs.PrettierConfiguration.Package": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\prettier",
|
"prettierjs.PrettierConfiguration.Package": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\prettier",
|
||||||
"project.structure.last.edited": "Problems",
|
"project.structure.last.edited": "Problems",
|
||||||
"project.structure.proportion": "0.0",
|
"project.structure.proportion": "0.0",
|
||||||
"project.structure.side.proportion": "0.2",
|
"project.structure.side.proportion": "0.2",
|
||||||
"settings.editor.selected.configurable": "refactai_advanced_settings",
|
"settings.editor.selected.configurable": "refactai_advanced_settings",
|
||||||
"ts.external.directory.path": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\typescript\\lib",
|
"ts.external.directory.path": "C:\\Users\\Ibrahima\\IdeaProjects\\omni-tools\\node_modules\\typescript\\lib",
|
||||||
"vue.rearranger.settings.migration": "true"
|
"vue.rearranger.settings.migration": "true"
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="ReactDesignerToolWindowState">
|
<component name="ReactDesignerToolWindowState">
|
||||||
<option name="myId2Visible">
|
<option name="myId2Visible">
|
||||||
<map>
|
<map>
|
||||||
@@ -494,22 +492,9 @@
|
|||||||
<workItem from="1748282636141" duration="478000" />
|
<workItem from="1748282636141" duration="478000" />
|
||||||
<workItem from="1749047510481" duration="879000" />
|
<workItem from="1749047510481" duration="879000" />
|
||||||
<workItem from="1751846528195" duration="4358000" />
|
<workItem from="1751846528195" duration="4358000" />
|
||||||
</task>
|
<workItem from="1752070315115" duration="19000" />
|
||||||
<task id="LOCAL-00162" summary="feat: trim video">
|
<workItem from="1752071020011" duration="1599000" />
|
||||||
<option name="closed" value="true" />
|
<workItem from="1752077170501" duration="2423000" />
|
||||||
<created>1741580004784</created>
|
|
||||||
<option name="number" value="00162" />
|
|
||||||
<option name="presentableId" value="LOCAL-00162" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1741580004784</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00163" summary="feat: trim video">
|
|
||||||
<option name="closed" value="true" />
|
|
||||||
<created>1741580736359</created>
|
|
||||||
<option name="number" value="00163" />
|
|
||||||
<option name="presentableId" value="LOCAL-00163" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1741580736359</updated>
|
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00164" summary="refactor: file inputs">
|
<task id="LOCAL-00164" summary="refactor: file inputs">
|
||||||
<option name="closed" value="true" />
|
<option name="closed" value="true" />
|
||||||
@@ -887,7 +872,23 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1752026153328</updated>
|
<updated>1752026153328</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="211" />
|
<task id="LOCAL-00211" summary="feat: edit image">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1752032092273</created>
|
||||||
|
<option name="number" value="00211" />
|
||||||
|
<option name="presentableId" value="LOCAL-00211" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1752032092274</updated>
|
||||||
|
</task>
|
||||||
|
<task id="LOCAL-00212" summary="fix: favicons">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1752071147050</created>
|
||||||
|
<option name="number" value="00212" />
|
||||||
|
<option name="presentableId" value="LOCAL-00212" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1752071147050</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="213" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TypeScriptGeneratedFilesManager">
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
@@ -934,8 +935,6 @@
|
|||||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||||
<option name="CHECK_NEW_TODO" value="false" />
|
<option name="CHECK_NEW_TODO" value="false" />
|
||||||
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
||||||
<MESSAGE value="fix: vite worker format" />
|
|
||||||
<MESSAGE value="fix: tests" />
|
|
||||||
<MESSAGE value="chore: uninstall @jspawn/ghostscript-wasm" />
|
<MESSAGE value="chore: uninstall @jspawn/ghostscript-wasm" />
|
||||||
<MESSAGE value="feat: protect pdf" />
|
<MESSAGE value="feat: protect pdf" />
|
||||||
<MESSAGE value="feat: image to text" />
|
<MESSAGE value="feat: image to text" />
|
||||||
@@ -959,7 +958,9 @@
|
|||||||
<MESSAGE value="chore: png icon" />
|
<MESSAGE value="chore: png icon" />
|
||||||
<MESSAGE value="fix: remove xml viewer" />
|
<MESSAGE value="fix: remove xml viewer" />
|
||||||
<MESSAGE value="feat: convert to jpg" />
|
<MESSAGE value="feat: convert to jpg" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="feat: convert to jpg" />
|
<MESSAGE value="feat: edit image" />
|
||||||
|
<MESSAGE value="fix: favicons" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="fix: favicons" />
|
||||||
</component>
|
</component>
|
||||||
<component name="VgoProject">
|
<component name="VgoProject">
|
||||||
<integration-enabled>false</integration-enabled>
|
<integration-enabled>false</integration-enabled>
|
||||||
|
11
package-lock.json
generated
11
package-lock.json
generated
@@ -18,6 +18,7 @@
|
|||||||
"@mui/icons-material": "^5.15.20",
|
"@mui/icons-material": "^5.15.20",
|
||||||
"@mui/material": "^5.15.20",
|
"@mui/material": "^5.15.20",
|
||||||
"@playwright/test": "^1.45.0",
|
"@playwright/test": "^1.45.0",
|
||||||
|
"@simplepdf/react-embed-pdf": "^1.9.0",
|
||||||
"@types/ffmpeg": "^1.0.7",
|
"@types/ffmpeg": "^1.0.7",
|
||||||
"@types/js-quantities": "^1.6.6",
|
"@types/js-quantities": "^1.6.6",
|
||||||
"@types/lodash": "^4.17.5",
|
"@types/lodash": "^4.17.5",
|
||||||
@@ -2968,6 +2969,16 @@
|
|||||||
"integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==",
|
"integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@simplepdf/react-embed-pdf": {
|
||||||
|
"version": "1.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@simplepdf/react-embed-pdf/-/react-embed-pdf-1.9.0.tgz",
|
||||||
|
"integrity": "sha512-qp0K5Fh8E+Zk7m3vyHtvksNlozOUyYRG2wR/TiEjhNh12kj+ar4N+1rEJA7BOsf/M2HnSplwjNOPuci2CKkKGg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^18.2.0 || ^19.0.0",
|
||||||
|
"react-dom": "^18.2.0 || ^19.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@sinclair/typebox": {
|
"node_modules/@sinclair/typebox": {
|
||||||
"version": "0.27.8",
|
"version": "0.27.8",
|
||||||
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
|
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
|
||||||
|
@@ -35,6 +35,7 @@
|
|||||||
"@mui/icons-material": "^5.15.20",
|
"@mui/icons-material": "^5.15.20",
|
||||||
"@mui/material": "^5.15.20",
|
"@mui/material": "^5.15.20",
|
||||||
"@playwright/test": "^1.45.0",
|
"@playwright/test": "^1.45.0",
|
||||||
|
"@simplepdf/react-embed-pdf": "^1.9.0",
|
||||||
"@types/ffmpeg": "^1.0.7",
|
"@types/ffmpeg": "^1.0.7",
|
||||||
"@types/js-quantities": "^1.6.6",
|
"@types/js-quantities": "^1.6.6",
|
||||||
"@types/lodash": "^4.17.5",
|
"@types/lodash": "^4.17.5",
|
||||||
|
@@ -6,6 +6,7 @@ import Grid from '@mui/material/Grid';
|
|||||||
import { Icon, IconifyIcon } from '@iconify/react';
|
import { Icon, IconifyIcon } from '@iconify/react';
|
||||||
import { categoriesColors } from '../config/uiConfig';
|
import { categoriesColors } from '../config/uiConfig';
|
||||||
import { getToolsByCategory } from '@tools/index';
|
import { getToolsByCategory } from '@tools/index';
|
||||||
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
const StyledButton = styled(Button)(({ theme }) => ({
|
const StyledButton = styled(Button)(({ theme }) => ({
|
||||||
backgroundColor: 'white',
|
backgroundColor: 'white',
|
||||||
@@ -23,11 +24,25 @@ interface ToolHeaderProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ToolLinks() {
|
function ToolLinks() {
|
||||||
const theme = useTheme();
|
const [examplesVisible, setExamplesVisible] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const timeout = setTimeout(() => {
|
||||||
|
const element = document.getElementById('examples');
|
||||||
|
if (element && isVisible(element)) {
|
||||||
|
setExamplesVisible(true);
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
return () => clearTimeout(timeout);
|
||||||
|
}, []);
|
||||||
|
|
||||||
const scrollToElement = (id: string) => {
|
const scrollToElement = (id: string) => {
|
||||||
document.getElementById(id)?.scrollIntoView({ behavior: 'smooth' });
|
document.getElementById(id)?.scrollIntoView({ behavior: 'smooth' });
|
||||||
};
|
};
|
||||||
|
function isVisible(elm: HTMLElement | null) {
|
||||||
|
return !!elm;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<Grid container spacing={2} mt={1}>
|
<Grid container spacing={2} mt={1}>
|
||||||
<Grid item md={12} lg={6}>
|
<Grid item md={12} lg={6}>
|
||||||
@@ -40,6 +55,7 @@ function ToolLinks() {
|
|||||||
Use This Tool
|
Use This Tool
|
||||||
</StyledButton>
|
</StyledButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
{examplesVisible && (
|
||||||
<Grid item md={12} lg={6}>
|
<Grid item md={12} lg={6}>
|
||||||
<StyledButton
|
<StyledButton
|
||||||
fullWidth
|
fullWidth
|
||||||
@@ -50,6 +66,7 @@ function ToolLinks() {
|
|||||||
See Examples
|
See Examples
|
||||||
</StyledButton>
|
</StyledButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
)}
|
||||||
{/*<Grid item md={12} lg={4}>*/}
|
{/*<Grid item md={12} lg={4}>*/}
|
||||||
{/* <StyledButton fullWidth variant="outlined" href="#tour">*/}
|
{/* <StyledButton fullWidth variant="outlined" href="#tour">*/}
|
||||||
{/* Learn How to Use*/}
|
{/* Learn How to Use*/}
|
||||||
|
@@ -6,6 +6,7 @@ import { DefinedTool } from '@tools/defineTool';
|
|||||||
import { tool as compressPdfTool } from './compress-pdf/meta';
|
import { tool as compressPdfTool } from './compress-pdf/meta';
|
||||||
import { tool as protectPdfTool } from './protect-pdf/meta';
|
import { tool as protectPdfTool } from './protect-pdf/meta';
|
||||||
import { meta as pdfToEpub } from './pdf-to-epub/meta';
|
import { meta as pdfToEpub } from './pdf-to-epub/meta';
|
||||||
|
import { tool as pdfEditor } from './editor/meta';
|
||||||
|
|
||||||
export const pdfTools: DefinedTool[] = [
|
export const pdfTools: DefinedTool[] = [
|
||||||
splitPdfMeta,
|
splitPdfMeta,
|
||||||
@@ -14,5 +15,6 @@ export const pdfTools: DefinedTool[] = [
|
|||||||
protectPdfTool,
|
protectPdfTool,
|
||||||
mergePdf,
|
mergePdf,
|
||||||
pdfToEpub,
|
pdfToEpub,
|
||||||
pdfPdfToPng
|
pdfPdfToPng,
|
||||||
|
pdfEditor
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user