|
|
@ -24,7 +24,7 @@ export interface ClipboardEvent<T = Element> extends SyntheticEvent<T, any> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export const RemixUiTerminal = (props: RemixUiTerminalProps) => { |
|
|
|
export const RemixUiTerminal = (props: RemixUiTerminalProps) => { |
|
|
|
const { call, _deps, on, config, event, gistHandler, logHtml, logResponse, version } = props.plugin |
|
|
|
const { call, _deps, on, config, event, gistHandler, logHtmlResponse, logResponse, version } = props.plugin |
|
|
|
const [toggleDownUp, setToggleDownUp] = useState('fa-angle-double-down') |
|
|
|
const [toggleDownUp, setToggleDownUp] = useState('fa-angle-double-down') |
|
|
|
const [_cmdIndex, setCmdIndex] = useState(-1) |
|
|
|
const [_cmdIndex, setCmdIndex] = useState(-1) |
|
|
|
const [_cmdTemp, setCmdTemp] = useState('') |
|
|
|
const [_cmdTemp, setCmdTemp] = useState('') |
|
|
@ -74,8 +74,8 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
scriptRunnerDispatch({ type: 'html', payload: { message: logHtml } }) |
|
|
|
scriptRunnerDispatch({ type: 'html', payload: { message: logHtmlResponse } }) |
|
|
|
}, [logHtml]) |
|
|
|
}, [logHtmlResponse]) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
scriptRunnerDispatch({ type: 'log', payload: { message: logResponse } }) |
|
|
|
scriptRunnerDispatch({ type: 'log', payload: { message: logResponse } }) |
|
|
@ -105,7 +105,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
scrollToBottom() |
|
|
|
scrollToBottom() |
|
|
|
}, [newstate.journalBlocks.length, logHtml.length]) |
|
|
|
}, [newstate.journalBlocks.length, logHtmlResponse.length]) |
|
|
|
|
|
|
|
|
|
|
|
function execute (file, cb) { |
|
|
|
function execute (file, cb) { |
|
|
|
function _execute (content, cb) { |
|
|
|
function _execute (content, cb) { |
|
|
|