From 7e124cd00835d4acae7d16de0baffdfbdef5c40e Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 19 Jun 2024 23:31:43 +0200 Subject: [PATCH] update text color --- apps/remix-ide/src/app/files/dgitProvider.ts | 5 ++++- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/files/dgitProvider.ts b/apps/remix-ide/src/app/files/dgitProvider.ts index 10154c1e5b..3245820f21 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.ts +++ b/apps/remix-ide/src/app/files/dgitProvider.ts @@ -454,7 +454,10 @@ class DGitProvider extends Plugin { } this.emit('clone') this.call('fileManager', 'hasGitSubmodules').then((submodules) => { - if (submodules) this.call('terminal', 'log', { type: 'warn', value: 'This repository has submodules. Please update submodules to pull all the dependencies.'}) + if (submodules) { + this.call('terminal', 'log', { type: 'warn', value: 'This repository has submodules. Please update submodules to pull all the dependencies.'}) + this.emit('repositoryWithSubmodulesCloned') + } }) return result } diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 2368fc6a83..baa44e9f0b 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -30,6 +30,7 @@ export function Workspace() { const [showDropdown, setShowDropdown] = useState(false) const [showIconsMenu, hideIconsMenu] = useState(false) const [showBranches, setShowBranches] = useState(false) + const [highlightUpdateSubmodules, setHighlightUpdateSubmodules] = useState(false) const [branchFilter, setBranchFilter] = useState('') const displayOzCustomRef = useRef() const mintableCheckboxRef = useRef() @@ -123,6 +124,10 @@ export function Workspace() { cloneGitRepository() } } + + global.plugin.on('dGitProvider', 'repositoryWithSubmodulesCloned', () => { + setHighlightUpdateSubmodules(true) + }) }, []) useEffect(() => { @@ -677,6 +682,7 @@ export function Workspace() { const updateSubModules = async () => { try { + setHighlightUpdateSubmodules(false) await global.dispatchUpdateGitSubmodules() } catch (e) { console.error(e) @@ -1208,7 +1214,7 @@ export function Workspace() { {selectedWorkspace.hasGitSubmodules?
{global.fs.browser.isRequestingCloning ?
updating submodules
: -
update submodules
} +
update submodules
}
: null}