pull/4791/head
filip mertens 6 months ago
parent 9c850f7bbe
commit 2324e82c6b
  1. 2
      libs/remix-ui/git/src/components/buttons/commitmessage.tsx
  2. 4
      libs/remix-ui/git/src/components/buttons/sourceControlBase.tsx
  3. 2
      libs/remix-ui/git/src/components/panels/branches/localbranchdetails.tsx
  4. 4
      libs/remix-ui/git/src/components/panels/commands/pushpull.tsx
  5. 2
      libs/remix-ui/git/src/lib/gitactions.ts

@ -86,7 +86,7 @@ export const CommitMessage = () => {
} }
const setButtonStateValues = () => { const setButtonStateValues = () => {
if (!commitNotAllowed() || context.allchangesnotstaged.length > 0 || context.staged.length > 0){ if (!commitNotAllowed() || context.allchangesnotstaged.length > 0 || context.staged.length > 0){
if (context.allchangesnotstaged.length == 0 && context.staged.length == 0 && message.value === "" && publishEnabled()){ if (context.allchangesnotstaged.length == 0 && context.staged.length == 0 && message.value === "" && publishEnabled()){
setButtonState(buttonStateValues.PublishBranch) setButtonState(buttonStateValues.PublishBranch)

@ -32,7 +32,7 @@ export const SourceControlBase = (props: SourceControlButtonsProps) => {
const [commitsBehind, setCommitsBehind] = useState<ReadCommitResult[]>([]) const [commitsBehind, setCommitsBehind] = useState<ReadCommitResult[]>([])
useEffect(() => { useEffect(() => {
setDefaultRemote() setDefaultRemote()
if (remote && branch && context.branchDifferences && context.branchDifferences[`${remote.name}/${branch.name}`]) { if (remote && branch && context.branchDifferences && context.branchDifferences[`${remote.name}/${branch.name}`]) {
setCommitsAhead(context.branchDifferences[`${remote.name}/${branch.name}`]?.uniqueHeadCommits) setCommitsAhead(context.branchDifferences[`${remote.name}/${branch.name}`]?.uniqueHeadCommits)
@ -70,7 +70,7 @@ export const SourceControlBase = (props: SourceControlButtonsProps) => {
}, []) }, [])
useEffect(() => { useEffect(() => {
if (!props.branch) { if (!props.branch) {
setBranch(context.currentBranch) setBranch(context.currentBranch)
} }

@ -25,7 +25,7 @@ export const LocalBranchDetails = (props: BrancheDetailsProps) => {
useEffect(() => { useEffect(() => {
if (activePanel === "0") { if (activePanel === "0") {
if (lastPageNumber === 0) if (lastPageNumber === 0)
actions.getBranchCommits(branch, 1) actions.getBranchCommits(branch, 1)
actions.getBranchDifferences(branch, null, context) actions.getBranchDifferences(branch, null, context)

@ -90,7 +90,7 @@ export const PushPull = () => {
} }
useEffect(() => { useEffect(() => {
const localBranches = context.branches && context.branches.length > 0 && context.branches const localBranches = context.branches && context.branches.length > 0 && context.branches
.filter(branch => !branch.remote) .filter(branch => !branch.remote)
.map(repo => { .map(repo => {
@ -109,7 +109,7 @@ export const PushPull = () => {
}, [context.branches]) }, [context.branches])
useEffect(() => { useEffect(() => {
// map context.repositories to options // map context.repositories to options
const options = context.remotes && context.remotes.length > 0 && context.remotes const options = context.remotes && context.remotes.length > 0 && context.remotes
.map(repo => { .map(repo => {

@ -710,7 +710,7 @@ export const getBranchDifferences = async (branch: branch, remote: remote, state
} }
if (!remote) return if (!remote) return
try { try {
const branchDifference: branchDifference = await plugin.call('dgitApi', 'compareBranches', { const branchDifference: branchDifference = await plugin.call('dgitApi', 'compareBranches', {
branch, branch,
remote remote

Loading…
Cancel
Save