mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-22 10:51:02 +01:00
feat: Implement exclusive selection for incoming/outgoing changes
This commit is contained in:
@@ -71,7 +71,7 @@ const ChangeTable = ({
|
||||
<SortableHeader sortKey='name' className='w-2/6'>
|
||||
Name
|
||||
</SortableHeader>
|
||||
<th className='px-4 py-2 text-left text-gray-300 w-1/6'>
|
||||
<th className='px-4 py-2 text-left text-gray-300 w-1/12'>
|
||||
Actions
|
||||
</th>
|
||||
<th className='px-4 py-2 text-right text-gray-300 w-1/12'>
|
||||
|
||||
@@ -34,6 +34,9 @@ const StatusContainer = ({
|
||||
|
||||
const handleSelectChange = (filePath, isIncoming) => {
|
||||
if (isIncoming) {
|
||||
if (selectedOutgoingChanges.length > 0) {
|
||||
setSelectedOutgoingChanges([]);
|
||||
}
|
||||
setSelectedIncomingChanges(prevSelected => {
|
||||
if (prevSelected.includes(filePath)) {
|
||||
return prevSelected.filter(path => path !== filePath);
|
||||
@@ -42,6 +45,9 @@ const StatusContainer = ({
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (selectedIncomingChanges.length > 0) {
|
||||
setSelectedIncomingChanges([]);
|
||||
}
|
||||
const change = status.outgoing_changes.find(
|
||||
c => c.file_path === filePath
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user