Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions apps/files/src/actions/moveOrCopyAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import { emit } from '@nextcloud/event-bus'
import { FileAction, FileType, getUniqueName, NodeStatus, Permission } from '@nextcloud/files'
import { defaultRootPath, getClient, getDefaultPropfind, resultToNode } from '@nextcloud/files/dav'
import { t } from '@nextcloud/l10n'
import { n, t } from '@nextcloud/l10n'
import { basename, join } from '@nextcloud/paths'
import { getConflicts } from '@nextcloud/upload'
import { basename, join } from 'path'
import Vue from 'vue'

import CopyIconSvg from '@mdi/svg/svg/folder-multiple-outline.svg?raw'
Expand Down Expand Up @@ -158,7 +158,11 @@
}
}

const actionFinished = createLoadingNotification(method, nodes.map((node) => node.basename), destination.path)
const actionFinished = createLoadingNotification(
method,
nodes.map((node) => node.displayname),
join(destination.dirname, destination.displayname),
)
const queue = getQueue()
try {
for (const node of nodes) {
Expand Down Expand Up @@ -247,13 +251,13 @@
function createLoadingNotification(mode: MoveCopyAction, sources: string[], destination: string): () => void {
const text = mode === MoveCopyAction.MOVE
? (sources.length === 1
? t('files', 'Moving "{source}" to "{destination}" …', { source: sources[0], destination })
: t('files', 'Moving {count} files to "{destination}" …', { count: sources.length, destination })
)
? t('files', 'Moving "{source}" to "{destination}" …', { source: sources[0]!, destination })

Check failure on line 254 in apps/files/src/actions/moveOrCopyAction.ts

View workflow job for this annotation

GitHub Actions / NPM lint

Expected indentation of 3 tabs but found 4
: n('files', 'Moving %n file to "{destination}" …', 'Moving %n files to "{destination}" …', sources.length, { destination })

Check failure on line 255 in apps/files/src/actions/moveOrCopyAction.ts

View workflow job for this annotation

GitHub Actions / NPM lint

Expected indentation of 3 tabs but found 4
)

Check failure on line 256 in apps/files/src/actions/moveOrCopyAction.ts

View workflow job for this annotation

GitHub Actions / NPM lint

Expected indentation of 2 tabs but found 3
: (sources.length === 1
? t('files', 'Copying "{source}" to "{destination}" …', { source: sources[0], destination })
: t('files', 'Copying {count} files to "{destination}" …', { count: sources.length, destination })
)
? t('files', 'Copying "{source}" to "{destination}" …', { source: sources[0]!, destination })

Check failure on line 258 in apps/files/src/actions/moveOrCopyAction.ts

View workflow job for this annotation

GitHub Actions / NPM lint

Expected indentation of 3 tabs but found 4
: n('files', 'Copying %n file to "{destination}" …', 'Copying %n files to "{destination}" …', sources.length, { destination })

Check failure on line 259 in apps/files/src/actions/moveOrCopyAction.ts

View workflow job for this annotation

GitHub Actions / NPM lint

Expected indentation of 3 tabs but found 4
)

Check failure on line 260 in apps/files/src/actions/moveOrCopyAction.ts

View workflow job for this annotation

GitHub Actions / NPM lint

Expected indentation of 2 tabs but found 3

const toast = showLoading(text)
return () => toast && toast.hideToast()
Expand Down
Loading