From e0b80f44f629c40db0cd310f3d30eab60abd0d58 Mon Sep 17 00:00:00 2001 From: tizah Date: Mon, 5 Jul 2021 12:44:44 +0100 Subject: [PATCH] adding method to the terminal.ts --- .../terminal/src/lib/remix-ui-terminal.tsx | 16 ++++++++++++++-- package.json | 4 ++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index 85351939d2..60249b4193 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -18,7 +18,7 @@ export interface RemixUiTerminalProps { export const RemixUiTerminal = (props: RemixUiTerminalProps) => { const [toggleDownUp, setToggleDownUp] = useState('fa-angle-double-down') - + const [inserted, setInserted] = useState(false) // events useEffect(() => { // window.addEventListener('resize', function () { @@ -46,6 +46,16 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { } console.log(props.event, 'event.trigger') } + + const reattached = (event) => { + let el = event.currentTarget + var isBottomed = el.scrollHeight - el.scrollTop - el.clientHeight < 30 + if (isBottomed) { + + } + } + + return (
@@ -91,7 +101,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
-
+
{/* onScroll=${throttle(reattach, 10)} onkeydown=${focusinput} */} {/* {props.autoCompletePopup.render()} */} {console.log({ props })} @@ -103,6 +113,8 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { zIndex: -1 }}>
+
+
diff --git a/package.json b/package.json index 895639bd6c..10a169c65f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "workspace-schematic": "nx workspace-schematic", "dep-graph": "nx dep-graph", "help": "nx help", - "lint:libs": "nx run-many --target=lint --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd,remix-ui-tree-view,remix-ui-modal-dialog,remix-ui-toaster,remix-ui-file-explorer,remix-ui-debugger-ui,remix-ui-workspace,remix-ui-static-analyser,remix-ui-checkbox", + "lint:libs": "nx run-many --target=lint --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd,remix-ui-tree-view,remix-ui-modal-dialog,remix-ui-toaster,remix-ui-file-explorer,remix-ui-debugger-ui,remix-ui-workspace,remix-ui-static-analyser,remix-ui-checkbox,remix-ui-settings", "build:libs": "nx run-many --target=build --parallel=false --with-deps=true --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd", "test:libs": "nx run-many --target=test --projects=remix-analyzer,remix-astwalker,remix-debug,remix-lib,remix-simulator,remix-solidity,remix-tests,remix-url-resolver,remixd", "publish:libs": "npm run build:libs && lerna publish --skip-git && npm run bumpVersion:libs", @@ -87,7 +87,7 @@ "onchange": "onchange apps/remix-ide/build/app.js -- npm-run-all lint", "remixd": "nx build remixd && nx serve remixd --folder=./apps/remix-ide/contracts --remixide=http://127.0.0.1:8080", "selenium": "selenium-standalone start", - "selenium-install": "selenium-standalone install", + "selenium-install": "selenium-standalone install", "sourcemap": "exorcist --root ../ apps/remix-ide/build/app.js.map > apps/remix-ide/build/app.js", "test-browser": "npm-run-all -lpr selenium make-mock-compiler serve browsertest", "watch": "watchify apps/remix-ide/src/index.js -dv -p browserify-reload -o apps/remix-ide/build/app.js --exclude solc",