diff options
Diffstat (limited to 'apps/files/src/utils')
-rw-r--r-- | apps/files/src/utils/actionUtils.ts | 6 | ||||
-rw-r--r-- | apps/files/src/utils/davUtils.ts | 2 | ||||
-rw-r--r-- | apps/files/src/utils/filesViews.spec.ts | 8 |
3 files changed, 7 insertions, 9 deletions
diff --git a/apps/files/src/utils/actionUtils.ts b/apps/files/src/utils/actionUtils.ts index f6d43727c29..adacf621b4c 100644 --- a/apps/files/src/utils/actionUtils.ts +++ b/apps/files/src/utils/actionUtils.ts @@ -59,13 +59,13 @@ export const executeAction = async (action: FileAction) => { } if (success) { - showSuccess(t('files', '"{displayName}" action executed successfully', { displayName })) + showSuccess(t('files', '{displayName}: done', { displayName })) return } - showError(t('files', '"{displayName}" action failed', { displayName })) + showError(t('files', '{displayName}: failed', { displayName })) } catch (error) { logger.error('Error while executing action', { action, error }) - showError(t('files', '"{displayName}" action failed', { displayName })) + showError(t('files', '{displayName}: failed', { displayName })) } finally { // Reset the loading marker Vue.set(currentNode, 'status', undefined) diff --git a/apps/files/src/utils/davUtils.ts b/apps/files/src/utils/davUtils.ts index d8dc12d069d..54c1a6ea966 100644 --- a/apps/files/src/utils/davUtils.ts +++ b/apps/files/src/utils/davUtils.ts @@ -29,7 +29,7 @@ export function humanizeWebDAVError(error: unknown) { } else if (status === 403) { return t('files', 'This operation is forbidden') } else if (status === 500) { - return t('files', 'This directory is unavailable, please check the logs or contact the administrator') + return t('files', 'This folder is unavailable, please try again later or contact the administration') } else if (status === 503) { return t('files', 'Storage is temporarily not available') } diff --git a/apps/files/src/utils/filesViews.spec.ts b/apps/files/src/utils/filesViews.spec.ts index e8c2ab3a6c1..03b0bb9aeb0 100644 --- a/apps/files/src/utils/filesViews.spec.ts +++ b/apps/files/src/utils/filesViews.spec.ts @@ -26,11 +26,7 @@ describe('hasPersonalFilesView', () => { }) describe('defaultView', () => { - beforeEach(() => { - document.querySelectorAll('input[type="hidden"]').forEach((el) => { - el.remove() - }) - }) + beforeEach(removeInitialState) test('Returns files view if set', () => { mockInitialState('files', 'config', { default_view: 'files' }) @@ -57,6 +53,8 @@ function removeInitialState(): void { document.querySelectorAll('input[type="hidden"]').forEach((el) => { el.remove() }) + // clear the cache + delete globalThis._nc_initial_state } /** |