diff --git a/e2e/folders.spec.ts b/e2e/folders.spec.ts index 19ffe2904..57c97c95f 100644 --- a/e2e/folders.spec.ts +++ b/e2e/folders.spec.ts @@ -35,7 +35,7 @@ test.describe('Open', () => { await page.locator('tr[data-filename="Photos"]').click(); // Action button - await page.locator('.dialog button[aria-label^="Move"]').click(); + await page.locator('.dialog button[aria-label="Move"]').click(); await page.waitForTimeout(2000); // Check if the file is moved diff --git a/src/services/utils/dialog.ts b/src/services/utils/dialog.ts index 23d66caf4..39f8b9cb3 100644 --- a/src/services/utils/dialog.ts +++ b/src/services/utils/dialog.ts @@ -1,20 +1,15 @@ -import type { IFilePickerButton } from '@nextcloud/dialogs'; import { getFilePickerBuilder, showError } from '@nextcloud/dialogs'; -import type { Node } from '@nextcloud/files'; import { translatePlural as n, translate as t } from '@services/l10n'; import { bus } from './event-bus'; import { fragment } from './fragment'; +import type { Node } from '@nextcloud/files'; +import type { IFilePickerButton } from '@nextcloud/dialogs'; + // https://github.com/nextcloud/server/blob/4b7ec0a0c18d4e2007565dc28ee214814940161e/core/src/OC/dialogs.js const oc_dialogs = (OC).dialogs; -type IFilePickerButtonFactory = ( - selectedNodes: Node[], - currentPath: string, - currentView: string, -) => IFilePickerButton[]; - type ConfirmOptions = { /** Title of dialog */ title?: string; @@ -181,7 +176,7 @@ function chooseButtonFactory(nodes: Node[]): IFilePickerButton[] { export async function chooseNcFolder( title: string, initial: string = '/', - buttonFactory: IFilePickerButtonFactory = chooseButtonFactory, + buttonFactory = chooseButtonFactory, ): Promise { const picker = getFilePickerBuilder(title) .setMultiSelect(false)