mirror of
https://github.com/desktop/desktop
synced 2024-09-19 16:12:20 +00:00
Merge pull request #14204 from tsvetilian-ty/include-exclude-file-selection
Add include and exclude functionality to selected files
This commit is contained in:
commit
2e5e8143fb
|
@ -534,6 +534,32 @@ export class ChangesList extends React.Component<
|
|||
})
|
||||
})
|
||||
|
||||
if (paths.length > 1) {
|
||||
items.push(
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: __DARWIN__
|
||||
? 'Include Selected Files'
|
||||
: 'Include selected files',
|
||||
action: () => {
|
||||
selectedFiles.map(file =>
|
||||
this.props.onIncludeChanged(file.path, true)
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
label: __DARWIN__
|
||||
? 'Exclude Selected Files'
|
||||
: 'Exclude selected files',
|
||||
action: () => {
|
||||
selectedFiles.map(file =>
|
||||
this.props.onIncludeChanged(file.path, false)
|
||||
)
|
||||
},
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
const enabled = status.kind !== AppFileStatusKind.Deleted
|
||||
items.push(
|
||||
{ type: 'separator' },
|
||||
|
|
Loading…
Reference in a new issue