File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed
lib/osf-components/addon/components/move-file-modal Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ export default class ListItemComponent extends Component<ListItemArgs> {
2626 @service toast ! : Toast ;
2727
2828 get isBeingMoved ( ) {
29- return this . args . filesToMove . includes ( this . args . item as File ) ;
29+ const { item, filesToMove } = this . args ;
30+ return filesToMove . findBy ( 'id' , item . id ) ;
3031 }
3132
3233 get isReadOnlyProvider ( ) {
@@ -44,13 +45,6 @@ export default class ListItemComponent extends Component<ListItemArgs> {
4445 return this . isBeingMoved || this . isReadOnlyProvider || currentUserIsReadOnly ;
4546 }
4647
47- get destinationSelectHelpText ( ) {
48- if ( this . args . currentNode && ! this . args . currentNode . userHasWritePermission ) {
49- return this . intl . t ( 'osf-components.move_file_modal.no_write_permission' ) ;
50- }
51- return this . intl . t ( 'osf-components.move_file_modal.select_provider' ) ;
52- }
53-
5448 get assetPrefix ( ) {
5549 return config . assetsPrefix ;
5650 }
Original file line number Diff line number Diff line change 1818 data-analytics-name =' Go to nested folder'
1919 data-test-move-to-folder ={{ @item.name }}
2020 @layout =' fake-link'
21- local-class =' NavButton {{ if this.isReadOnlyProvider ' InvalidDestination' }} '
21+ local-class =' NavButton {{ if this.shouldDisable ' InvalidDestination' }} '
2222 disabled ={{ this.shouldDisable }}
2323 {{ on ' click' (fn @onFolderSelect @item )}}
2424 >
3131 >
3232 {{ t (concat ' osf-components.file-browser.storage_providers.' @item.name )}}
3333 {{ #if this.isReadOnlyProvider }}
34- <span local-class = ' ReadOnlyProvider ' >
34+ <span >
3535 {{ t ' osf-components.move_file_modal.read_only_provider' }}
3636 </span >
3737 {{ /if }}
38+ {{ else if this.isBeingMoved}}
39+ <FaIcon @icon =' folder-open' />
40+ {{ @item.name }}
41+ <span >
42+ {{ t (concat ' osf-components.move_file_modal.' (if @preserveOriginal ' is_being_copied' ' is_being_moved' ))}}
43+ </span >
3844 {{ else }}
3945 <FaIcon @icon =' folder-open' />
4046 {{ @item.name }}
Original file line number Diff line number Diff line change 118118 @onNodeSelect ={{ this.updateNode }}
119119 @onFolderSelect ={{ this.updateFolder }}
120120 @isProvider ={{ eq this.breadcrumbs.length 0 }}
121+ @preserveOriginal ={{ @preserveOriginal }}
121122 />
122123 </:item >
123124 <:empty >
Original file line number Diff line number Diff line change @@ -1831,6 +1831,8 @@ osf-components:
18311831 no_children : ' No children'
18321832 no_folders : ' No files or folders'
18331833 read_only_provider : ' - Cannot move or copy to this file provider'
1834+ is_being_moved : ' - This folder is being moved'
1835+ is_being_copied : ' - This folder is being copied'
18341836 read_only_warning : ' Moving or copying files to this file provider is not supported. Please select a different provider.'
18351837 icon_alt : ' Icon for {provider}'
18361838 moving_files : ' Moving...'
You can’t perform that action at this time.
0 commit comments