update text color

pull/4924/head
yann300 8 months ago committed by Aniket
parent 9dee56776f
commit 21b79c931a
  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.emit('clone')
this.call('fileManager', 'hasGitSubmodules').then((submodules) => { 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 return result
} }

@ -30,6 +30,7 @@ export function Workspace() {
const [showDropdown, setShowDropdown] = useState<boolean>(false) const [showDropdown, setShowDropdown] = useState<boolean>(false)
const [showIconsMenu, hideIconsMenu] = useState<boolean>(false) const [showIconsMenu, hideIconsMenu] = useState<boolean>(false)
const [showBranches, setShowBranches] = useState<boolean>(false) const [showBranches, setShowBranches] = useState<boolean>(false)
const [highlightUpdateSubmodules, setHighlightUpdateSubmodules] = useState<boolean>(false)
const [branchFilter, setBranchFilter] = useState<string>('') const [branchFilter, setBranchFilter] = useState<string>('')
const displayOzCustomRef = useRef<HTMLDivElement>() const displayOzCustomRef = useRef<HTMLDivElement>()
const mintableCheckboxRef = useRef() const mintableCheckboxRef = useRef()
@ -123,6 +124,10 @@ export function Workspace() {
cloneGitRepository() cloneGitRepository()
} }
} }
global.plugin.on('dGitProvider', 'repositoryWithSubmodulesCloned', () => {
setHighlightUpdateSubmodules(true)
})
}, []) }, [])
useEffect(() => { useEffect(() => {
@ -677,6 +682,7 @@ export function Workspace() {
const updateSubModules = async () => { const updateSubModules = async () => {
try { try {
setHighlightUpdateSubmodules(false)
await global.dispatchUpdateGitSubmodules() await global.dispatchUpdateGitSubmodules()
} catch (e) { } catch (e) {
console.error(e) console.error(e)
@ -1208,7 +1214,7 @@ export function Workspace() {
{selectedWorkspace.hasGitSubmodules? {selectedWorkspace.hasGitSubmodules?
<div className="pt-1 mr-1"> <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> : {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> </div>
: null} : null}
<div className="pt-1 mr-1" data-id="workspaceGitBranchesDropdown"> <div className="pt-1 mr-1" data-id="workspaceGitBranchesDropdown">

Loading…
Cancel
Save