update text color

pull/5370/head
yann300 5 months ago committed by Aniket
parent 280714058b
commit 7e124cd008
  1. 5
      apps/remix-ide/src/app/files/dgitProvider.ts
  2. 8
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -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
}

@ -30,6 +30,7 @@ export function Workspace() {
const [showDropdown, setShowDropdown] = useState<boolean>(false)
const [showIconsMenu, hideIconsMenu] = useState<boolean>(false)
const [showBranches, setShowBranches] = useState<boolean>(false)
const [highlightUpdateSubmodules, setHighlightUpdateSubmodules] = useState<boolean>(false)
const [branchFilter, setBranchFilter] = useState<string>('')
const displayOzCustomRef = useRef<HTMLDivElement>()
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?
<div className="pt-1 mr-1">
{global.fs.browser.isRequestingCloning ? <div style={{ height: 30 }} className='btn btn-sm border text-muted small'><i className="fad fa-spinner fa-spin"></i> updating submodules</div> :
<div style={{ height: 30 }} onClick={updateSubModules} data-id='updatesubmodules' className='btn btn-sm border text-muted small'>update submodules</div>}
<div style={{ height: 30 }} onClick={updateSubModules} data-id='updatesubmodules' className={`btn btn-sm border small ${highlightUpdateSubmodules ? 'text-warning' : 'text-muted'}`}>update submodules</div>}
</div>
: null}
<div className="pt-1 mr-1" data-id="workspaceGitBranchesDropdown">

Loading…
Cancel
Save