mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 12:26:19 -05:00
Not showing files that will not be moved during collection reorganization preview. Adding button to mark collection as reorganized when no files need to be reorganized.
This commit is contained in:
parent
99a716aa13
commit
298a67159a
3 changed files with 96 additions and 5 deletions
|
|
@ -374,7 +374,10 @@ export function CollectionReorganizeModal({
|
|||
<Grid.Column>
|
||||
<Message info>
|
||||
<Message.Header>No Files Need Reorganization</Message.Header>
|
||||
<p>All files are already organized according to the current format.</p>
|
||||
<p>
|
||||
All files are already organized according to the current format.
|
||||
{needsReorganization && ' Click "Mark as Organized" to dismiss the warning.'}
|
||||
</p>
|
||||
</Message>
|
||||
</Grid.Column>
|
||||
</Grid.Row>
|
||||
|
|
@ -422,6 +425,7 @@ export function CollectionReorganizeModal({
|
|||
const isInProgress = polling || (status && status.status !== 'complete' && status.status !== 'error');
|
||||
const hasConflicts = preview && preview.has_conflicts;
|
||||
const canReorganize = preview && preview.files_needing_move > 0 && !isInProgress && !jobId && !hasConflicts;
|
||||
const canMarkAsOrganized = preview && preview.files_needing_move === 0 && needsReorganization && !isInProgress && !jobId;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
@ -470,6 +474,15 @@ export function CollectionReorganizeModal({
|
|||
Reorganize Files
|
||||
</APIButton>
|
||||
)}
|
||||
{canMarkAsOrganized && (
|
||||
<APIButton
|
||||
color='green'
|
||||
onClick={handleReorganize}
|
||||
obeyWROLMode={true}
|
||||
>
|
||||
Mark as Organized
|
||||
</APIButton>
|
||||
)}
|
||||
</Modal.Actions>
|
||||
</Modal>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue