From c1fabe8ee33d8eceb4844069a6fd472b6984bb0b Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 1 Nov 2023 13:28:11 +0100 Subject: [PATCH] lint --- .../terminal/src/lib/remix-ui-terminal.tsx | 170 +++++++++--------- .../workspace/src/lib/actions/workspace.ts | 58 +++--- 2 files changed, 114 insertions(+), 114 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 d9d944b615..8123b617a4 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -575,63 +575,63 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { return ( ( !props.visible? <>: -
-
-
- : } - > - - -
- }> - - -
- }> -
0
-
-
- - +
+
+
+ : } + > + - - +
+ }> + + +
+ }> +
0
-
-
- - setSearchInput(event.target.value.trim())} - type="text" - className="remix_ui_terminal_filter border form-control" - id="searchInput" - placeholder={intl.formatMessage({ id: 'terminal.search' })} - data-id="terminalInputSearch" - /> +
+ + + + + + +
+
+ + setSearchInput(event.target.value.trim())} + type="text" + className="remix_ui_terminal_filter border form-control" + id="searchInput" + placeholder={intl.formatMessage({ id: 'terminal.search' })} + data-id="terminalInputSearch" + /> +
-
-
- {handleAutoComplete()} -
-
- {!clearConsole && } - {newstate.journalBlocks && +
+ {handleAutoComplete()} +
+
+ {!clearConsole && } + {newstate.journalBlocks && newstate.journalBlocks.map((x, index) => { if (x.name === EMPTY_BLOCK) { return ( @@ -768,41 +768,41 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { } } })} -
-
- {isOpen && ( -
- {'>'} - onChange(event)} - onKeyDown={(event) => handleKeyDown(event)} - value={autoCompletState.userInput} - onPaste={handlePaste} - > +
- )} + {isOpen && ( +
+ {'>'} + onChange(event)} + onKeyDown={(event) => handleKeyDown(event)} + value={autoCompletState.userInput} + onPaste={handlePaste} + > +
+ )} +
+ + {toaster && } + {toastProvider.show && }
- - {toaster && } - {toastProvider.show && } -
- )) + )) } const typewrite = (elementsRef, message, callback) => { diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts index c79129f630..7830c108b4 100644 --- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts @@ -597,37 +597,37 @@ export const cloneRepository = async (url: string) => { dispatch(cloneRepositoryRequest()) promise .then(async () => { - const isActive = await plugin.call('manager', 'isActive', 'dgit') - - if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit') - await fetchWorkspaceDirectory(ROOT_PATH) - const workspacesPath = plugin.fileProviders.workspace.workspacesPath - const branches = await getGitRepoBranches(workspacesPath + '/' + repoName) - - dispatch(setCurrentWorkspaceBranches(branches)) - const currentBranch = await getGitRepoCurrentBranch(workspacesPath + '/' + repoName) - - dispatch(setCurrentWorkspaceCurrentBranch(currentBranch)) - dispatch(cloneRepositorySuccess()) - }).catch(() => { - const cloneModal = { - id: 'cloneGitRepository', - title: 'Clone Git Repository', - message: + const isActive = await plugin.call('manager', 'isActive', 'dgit') + + if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit') + await fetchWorkspaceDirectory(ROOT_PATH) + const workspacesPath = plugin.fileProviders.workspace.workspacesPath + const branches = await getGitRepoBranches(workspacesPath + '/' + repoName) + + dispatch(setCurrentWorkspaceBranches(branches)) + const currentBranch = await getGitRepoCurrentBranch(workspacesPath + '/' + repoName) + + dispatch(setCurrentWorkspaceCurrentBranch(currentBranch)) + dispatch(cloneRepositorySuccess()) + }).catch(() => { + const cloneModal = { + id: 'cloneGitRepository', + title: 'Clone Git Repository', + message: 'An error occurred: Please check that you have the correct URL for the repo. If the repo is private, you need to add your github credentials (with the valid token permissions) in Settings plugin', - modalType: 'modal', - okLabel: 'OK', - okFn: async () => { - await deleteWorkspace(repoName) - dispatch(cloneRepositoryFailed()) - }, - hideFn: async () => { - await deleteWorkspace(repoName) - dispatch(cloneRepositoryFailed()) + modalType: 'modal', + okLabel: 'OK', + okFn: async () => { + await deleteWorkspace(repoName) + dispatch(cloneRepositoryFailed()) + }, + hideFn: async () => { + await deleteWorkspace(repoName) + dispatch(cloneRepositoryFailed()) + } } - } - plugin.call('notification', 'modal', cloneModal) - }) + plugin.call('notification', 'modal', cloneModal) + }) } catch (e) { dispatch(displayPopUp('An error occured: ' + e)) }