Merge pull request #14204 from tsvetilian-ty/include-exclude-file-selection

Add include and exclude functionality to selected files
This commit is contained in:
tidy-dev 2022-03-30 09:23:23 -04:00 committed by GitHub
commit 2e5e8143fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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' },