mirror of
https://github.com/desktop/desktop
synced 2024-09-17 23:21:55 +00:00
prevent user from toggling files when commit is in progress
This commit is contained in:
parent
13b21a8984
commit
9cea8a04de
|
@ -12,6 +12,7 @@ interface IChangedFileProps {
|
|||
readonly oldPath?: string
|
||||
readonly include: boolean | null
|
||||
readonly availableWidth: number
|
||||
readonly disabled: boolean
|
||||
readonly onIncludeChanged: (path: string, include: boolean) => void
|
||||
|
||||
/** Callback called when user right-clicks on an item */
|
||||
|
@ -65,6 +66,7 @@ export class ChangedFile extends React.Component<IChangedFileProps, {}> {
|
|||
tabIndex={-1}
|
||||
value={this.checkboxValue}
|
||||
onChange={this.handleCheckboxChange}
|
||||
disabled={this.props.disabled}
|
||||
/>
|
||||
|
||||
<PathLabel
|
||||
|
|
|
@ -176,6 +176,7 @@ export class ChangesList extends React.Component<
|
|||
onContextMenu={this.onItemContextMenu}
|
||||
onIncludeChanged={this.props.onIncludeChanged}
|
||||
availableWidth={this.props.availableWidth}
|
||||
disabled={this.props.isCommitting}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
@ -376,7 +377,7 @@ export class ChangesList extends React.Component<
|
|||
label={filesDescription}
|
||||
value={this.includeAllValue}
|
||||
onChange={this.onIncludeAllChanged}
|
||||
disabled={fileCount === 0}
|
||||
disabled={fileCount === 0 || this.props.isCommitting}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue