|
111 | 111 | const operationLabel = $derived(operationLabelMap[operationType]) |
112 | 112 | const operationGerund = $derived(operationGerundMap[operationType]) |
113 | 113 | const isDeleteOrTrash = $derived(operationType === 'delete' || operationType === 'trash') |
| 114 | + const isCopy = $derived(operationType === 'copy') |
114 | 115 |
|
115 | 116 | /** Whether this is a move involving an MTP volume (implemented as copy + delete). */ |
116 | 117 | const isMtpMove = $derived( |
|
738 | 739 |
|
739 | 740 | <!-- Cancel at bottom --> |
740 | 741 | <div class="conflict-cancel"> |
741 | | - <button |
742 | | - class="danger-text" |
743 | | - onclick={() => handleCancel(true)} |
744 | | - disabled={isCancelling || isResolvingConflict} |
745 | | - > |
746 | | - Rollback |
747 | | - </button> |
| 742 | + {#if isCopy} |
| 743 | + <button |
| 744 | + class="danger-text" |
| 745 | + onclick={() => handleCancel(true)} |
| 746 | + disabled={isCancelling || isResolvingConflict} |
| 747 | + > |
| 748 | + Rollback |
| 749 | + </button> |
| 750 | + {:else} |
| 751 | + <button |
| 752 | + class="danger-text" |
| 753 | + onclick={() => handleCancel(false)} |
| 754 | + disabled={isCancelling || isResolvingConflict} |
| 755 | + > |
| 756 | + Cancel |
| 757 | + </button> |
| 758 | + {/if} |
748 | 759 | </div> |
749 | 760 | </div> |
750 | | - {:else if !isDeleteOrTrash && isRollingBack} |
751 | | - <!-- Rollback in progress (copy/move only) --> |
| 761 | + {:else if isCopy && isRollingBack} |
| 762 | + <!-- Rollback in progress (copy only) --> |
752 | 763 | <div class="rollback-section"> |
753 | 764 | <div class="rollback-indicator"> |
754 | 765 | <span class="spinner spinner-md rollback-spinner"></span> |
755 | 766 | </div> |
756 | 767 | <p class="rollback-message"> |
757 | | - Deleting {filesDone} |
758 | | - {operationType === 'copy' ? 'copied' : 'partially moved'} files... |
| 768 | + Deleting {filesDone} copied files... |
759 | 769 | </p> |
760 | 770 | </div> |
761 | 771 | {:else} |
|
827 | 837 | <!-- Action buttons --> |
828 | 838 | <div class="button-row"> |
829 | 839 | <Button variant="secondary" onclick={() => handleCancel(false)} disabled={isCancelling}>Cancel</Button> |
830 | | - {#if !isDeleteOrTrash && !(isMtpMove && mtpMovePhase === 'delete')} |
| 840 | + {#if isCopy} |
831 | 841 | <span use:tooltip={'Cancel and delete any partial target files created'}> |
832 | 842 | <Button variant="danger" onclick={() => handleCancel(true)} disabled={isCancelling}>Rollback</Button |
833 | 843 | > |
|
0 commit comments