|
|
@ -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) |
|
|
@ -1205,11 +1211,11 @@ export function Workspace() { |
|
|
|
{selectedWorkspace && ( |
|
|
|
{selectedWorkspace && ( |
|
|
|
<div className={`bg-light border-top ${selectedWorkspace.isGitRepo && currentBranch ? 'd-block' : 'd-none'}`} data-id="workspaceGitPanel"> |
|
|
|
<div className={`bg-light border-top ${selectedWorkspace.isGitRepo && currentBranch ? 'd-block' : 'd-none'}`} data-id="workspaceGitPanel"> |
|
|
|
<div className="d-flex justify-space-between p-1"> |
|
|
|
<div className="d-flex justify-space-between p-1"> |
|
|
|
<div className="mr-auto text-uppercase text-dark pt-2 pl-2">GIT</div> |
|
|
|
<div className="mr-auto text-uppercase text-dark pt-2 px-1">GIT</div> |
|
|
|
{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, minWidth: 165 }} 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, minWidth: 165 }} 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"> |
|
|
|