chore: ToolCodeInput.tsx dark mode

This commit is contained in:
Ibrahima G. Coulibaly
2025-07-18 03:40:01 +01:00
parent 05d698906d
commit ad2c70841f
2 changed files with 129 additions and 121 deletions

246
.idea/workspace.xml generated
View File

@@ -4,10 +4,9 @@
<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="chore: i18n pull dutch"> <list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="chore: sync locize">
<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$/public/locales/en/video.json" beforeDir="false" afterPath="$PROJECT_DIR$/public/locales/en/video.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/components/input/ToolCodeInput.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/input/ToolCodeInput.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pages/tools/video/merge-video/meta.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/pages/tools/video/merge-video/meta.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" />
@@ -28,7 +27,7 @@
<option name="PUSH_AUTO_UPDATE" value="true" /> <option name="PUSH_AUTO_UPDATE" value="true" />
<option name="RECENT_BRANCH_BY_REPOSITORY"> <option name="RECENT_BRANCH_BY_REPOSITORY">
<map> <map>
<entry key="$PROJECT_DIR$" value="fork/y1hao/bookmark" /> <entry key="$PROJECT_DIR$" value="fork/bhavesh158/json-compare" />
</map> </map>
</option> </option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@@ -47,185 +46,192 @@
&quot;state&quot;: &quot;OPEN&quot; &quot;state&quot;: &quot;OPEN&quot;
} }
}</component> }</component>
<component name="GitHubPullRequestState">{ <component name="GitHubPullRequestState"><![CDATA[{
&quot;prStates&quot;: [ "prStates": [
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts51PkS9&quot;, "id": "PR_kwDOMJIfts51PkS9",
&quot;number&quot;: 22 "number": 22
}, },
&quot;lastSeen&quot;: 1741207144695 "lastSeen": 1741207144695
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6NiNYl&quot;, "id": "PR_kwDOMJIfts6NiNYl",
&quot;number&quot;: 32 "number": 32
}, },
&quot;lastSeen&quot;: 1741209723869 "lastSeen": 1741209723869
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6Nheyd&quot;, "id": "PR_kwDOMJIfts6Nheyd",
&quot;number&quot;: 31 "number": 31
}, },
&quot;lastSeen&quot;: 1741213371410 "lastSeen": 1741213371410
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6NmRBs&quot;, "id": "PR_kwDOMJIfts6NmRBs",
&quot;number&quot;: 33 "number": 33
}, },
&quot;lastSeen&quot;: 1741282429036 "lastSeen": 1741282429036
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts5zyFTs&quot;, "id": "PR_kwDOMJIfts5zyFTs",
&quot;number&quot;: 15 "number": 15
}, },
&quot;lastSeen&quot;: 1741535540953 "lastSeen": 1741535540953
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6QQB3c&quot;, "id": "PR_kwDOMJIfts6QQB3c",
&quot;number&quot;: 59 "number": 59
}, },
&quot;lastSeen&quot;: 1743018960900 "lastSeen": 1743018960900
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6QMPEg&quot;, "id": "PR_kwDOMJIfts6QMPEg",
&quot;number&quot;: 58 "number": 58
}, },
&quot;lastSeen&quot;: 1743019452983 "lastSeen": 1743019452983
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6QZvRI&quot;, "id": "PR_kwDOMJIfts6QZvRI",
&quot;number&quot;: 61 "number": 61
}, },
&quot;lastSeen&quot;: 1743103196866 "lastSeen": 1743103196866
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6QqPrQ&quot;, "id": "PR_kwDOMJIfts6QqPrQ",
&quot;number&quot;: 73 "number": 73
}, },
&quot;lastSeen&quot;: 1743265865001 "lastSeen": 1743265865001
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6Qp5nI&quot;, "id": "PR_kwDOMJIfts6Qp5nI",
&quot;number&quot;: 72 "number": 72
}, },
&quot;lastSeen&quot;: 1743338472110 "lastSeen": 1743338472110
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6QsjlS&quot;, "id": "PR_kwDOMJIfts6QsjlS",
&quot;number&quot;: 76 "number": 76
}, },
&quot;lastSeen&quot;: 1743352150953 "lastSeen": 1743352150953
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6Q0JBe&quot;, "id": "PR_kwDOMJIfts6Q0JBe",
&quot;number&quot;: 82 "number": 82
}, },
&quot;lastSeen&quot;: 1743470267269 "lastSeen": 1743470267269
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6UE9-x&quot;, "id": "PR_kwDOMJIfts6UE9-x",
&quot;number&quot;: 102 "number": 102
}, },
&quot;lastSeen&quot;: 1747171977348 "lastSeen": 1747171977348
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6XPua_&quot;, "id": "PR_kwDOMJIfts6XPua_",
&quot;number&quot;: 117 "number": 117
}, },
&quot;lastSeen&quot;: 1747929835864 "lastSeen": 1747929835864
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6XY-mZ&quot;, "id": "PR_kwDOMJIfts6XY-mZ",
&quot;number&quot;: 119 "number": 119
}, },
&quot;lastSeen&quot;: 1748028108508 "lastSeen": 1748028108508
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6Xdz4n&quot;, "id": "PR_kwDOMJIfts6Xdz4n",
&quot;number&quot;: 120 "number": 120
}, },
&quot;lastSeen&quot;: 1748282672214 "lastSeen": 1748282672214
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6X_zxl&quot;, "id": "PR_kwDOMJIfts6X_zxl",
&quot;number&quot;: 131 "number": 131
}, },
&quot;lastSeen&quot;: 1748881279494 "lastSeen": 1748881279494
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6bhieT&quot;, "id": "PR_kwDOMJIfts6bhieT",
&quot;number&quot;: 152 "number": 152
}, },
&quot;lastSeen&quot;: 1751848489082 "lastSeen": 1751848489082
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6dOyRk&quot;, "id": "PR_kwDOMJIfts6dOyRk",
&quot;number&quot;: 154 "number": 154
}, },
&quot;lastSeen&quot;: 1751849436454 "lastSeen": 1751849436454
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6cHjNi&quot;, "id": "PR_kwDOMJIfts6cHjNi",
&quot;number&quot;: 153 "number": 153
}, },
&quot;lastSeen&quot;: 1751849501498 "lastSeen": 1751849501498
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6Zs1FN&quot;, "id": "PR_kwDOMJIfts6Zs1FN",
&quot;number&quot;: 145 "number": 145
}, },
&quot;lastSeen&quot;: 1751849770308 "lastSeen": 1751849770308
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6bgKi9&quot;, "id": "PR_kwDOMJIfts6bgKi9",
&quot;number&quot;: 150 "number": 150
}, },
&quot;lastSeen&quot;: 1751850367300 "lastSeen": 1751850367300
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6eUKC-&quot;, "id": "PR_kwDOMJIfts6eUKC-",
&quot;number&quot;: 176 "number": 176
}, },
&quot;lastSeen&quot;: 1752158748013 "lastSeen": 1752158748013
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6eqzP7&quot;, "id": "PR_kwDOMJIfts6eqzP7",
&quot;number&quot;: 190 "number": 190
}, },
&quot;lastSeen&quot;: 1752404173008 "lastSeen": 1752404173008
}, },
{ {
&quot;id&quot;: { "id": {
&quot;id&quot;: &quot;PR_kwDOMJIfts6et6vx&quot;, "id": "PR_kwDOMJIfts6et6vx",
&quot;number&quot;: 192 "number": 192
}, },
&quot;lastSeen&quot;: 1752585709582 "lastSeen": 1752585709582
},
{
"id": {
"id": "PR_kwDOMJIfts6d36mi",
"number": 168
},
"lastSeen": 1752805763664
} }
] ]
}</component> }]]></component>
<component name="GithubPullRequestsUISettings">{ <component name="GithubPullRequestsUISettings">{
&quot;selectedUrlAndAccountId&quot;: { &quot;selectedUrlAndAccountId&quot;: {
&quot;url&quot;: &quot;https://github.com/iib0011/omni-tools.git&quot;, &quot;url&quot;: &quot;https://github.com/iib0011/omni-tools.git&quot;,
@@ -285,7 +291,7 @@
"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": "#168 on fork/AshAnand34/merge-video-tool", "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", "last_opened_file_path": "C:/Users/Ibrahima/IdeaProjects/omni-tools",
@@ -415,9 +421,9 @@
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="npm.dev" /> <item itemvalue="npm.dev" />
<item itemvalue="npm.i18n:sync" />
<item itemvalue="npm.i18n:pull" /> <item itemvalue="npm.i18n:pull" />
<item itemvalue="npm.i18n:extract" /> <item itemvalue="npm.i18n:extract" />
<item itemvalue="npm.i18n:sync" />
<item itemvalue="Vitest.generatePassword" /> <item itemvalue="Vitest.generatePassword" />
</list> </list>
</recent_temporary> </recent_temporary>
@@ -533,14 +539,6 @@
<workItem from="1752493585622" duration="11629000" /> <workItem from="1752493585622" duration="11629000" />
<workItem from="1752507105323" duration="9008000" /> <workItem from="1752507105323" duration="9008000" />
</task> </task>
<task id="LOCAL-00195" summary="fix: misc">
<option name="closed" value="true" />
<created>1747172914927</created>
<option name="number" value="00195" />
<option name="presentableId" value="LOCAL-00195" />
<option name="project" value="LOCAL" />
<updated>1747172914927</updated>
</task>
<task id="LOCAL-00196" summary="chore: revert create-tool.mjs"> <task id="LOCAL-00196" summary="chore: revert create-tool.mjs">
<option name="closed" value="true" /> <option name="closed" value="true" />
<created>1748027090253</created> <created>1748027090253</created>
@@ -925,7 +923,15 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1752605940802</updated> <updated>1752605940802</updated>
</task> </task>
<option name="localTasksCounter" value="244" /> <task id="LOCAL-00244" summary="chore: sync locize">
<option name="closed" value="true" />
<created>1752805853344</created>
<option name="number" value="00244" />
<option name="presentableId" value="LOCAL-00244" />
<option name="project" value="LOCAL" />
<updated>1752805853344</updated>
</task>
<option name="localTasksCounter" value="245" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@@ -972,7 +978,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="feat: pdf editor" />
<MESSAGE value="chore: style link" /> <MESSAGE value="chore: style link" />
<MESSAGE value="refactor: PDF editor" /> <MESSAGE value="refactor: PDF editor" />
<MESSAGE value="docs: edit pdf meta" /> <MESSAGE value="docs: edit pdf meta" />
@@ -997,7 +1002,8 @@
<MESSAGE value="fix: broken translations" /> <MESSAGE value="fix: broken translations" />
<MESSAGE value="fix: i18n tsc" /> <MESSAGE value="fix: i18n tsc" />
<MESSAGE value="chore: i18n pull dutch" /> <MESSAGE value="chore: i18n pull dutch" />
<option name="LAST_COMMIT_MESSAGE" value="chore: i18n pull dutch" /> <MESSAGE value="chore: sync locize" />
<option name="LAST_COMMIT_MESSAGE" value="chore: sync locize" />
</component> </component>
<component name="VgoProject"> <component name="VgoProject">
<integration-enabled>false</integration-enabled> <integration-enabled>false</integration-enabled>

View File

@@ -1,4 +1,4 @@
import { Box } from '@mui/material'; import { Box, useTheme } from '@mui/material';
import React, { useContext, useRef } from 'react'; import React, { useContext, useRef } from 'react';
import { CustomSnackBarContext } from '../../contexts/CustomSnackBarContext'; import { CustomSnackBarContext } from '../../contexts/CustomSnackBarContext';
import InputHeader from '../InputHeader'; import InputHeader from '../InputHeader';
@@ -21,6 +21,7 @@ export default function ToolCodeInput({
const { t } = useTranslation(); const { t } = useTranslation();
const { showSnackBar } = useContext(CustomSnackBarContext); const { showSnackBar } = useContext(CustomSnackBarContext);
const fileInputRef = useRef<HTMLInputElement>(null); const fileInputRef = useRef<HTMLInputElement>(null);
const theme = useTheme();
const handleCopy = () => { const handleCopy = () => {
navigator.clipboard navigator.clipboard
@@ -56,6 +57,7 @@ export default function ToolCodeInput({
<Editor <Editor
height={'87%'} height={'87%'}
language={language} language={language}
theme={theme.palette.mode === 'dark' ? 'vs-dark' : 'light'}
value={value} value={value}
onChange={(value) => onChange(value ?? '')} onChange={(value) => onChange(value ?? '')}
/> />