diff --git a/apps/files/src/actions/editLocallyAction.spec.ts b/apps/files/src/actions/editLocallyAction.spec.ts index 9c7de1b78be31..07ccac5043d53 100644 --- a/apps/files/src/actions/editLocallyAction.spec.ts +++ b/apps/files/src/actions/editLocallyAction.spec.ts @@ -17,10 +17,11 @@ const view = { name: 'Files', } as View -// Mock webroot variable +// Mock web root variable beforeAll(() => { // eslint-disable-next-line @typescript-eslint/no-explicit-any (window as any)._oc_webroot = ''; + // eslint-disable-next-line @typescript-eslint/no-explicit-any (window as any).OCA = { Viewer: { open: vi.fn() } } }) diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts index 4a4e4f497b5ec..38059471da426 100644 --- a/apps/files/src/components/FileEntryMixin.ts +++ b/apps/files/src/components/FileEntryMixin.ts @@ -213,11 +213,11 @@ export default defineComponent({ /** * When the source changes, reset the preview * and fetch the new one. - * @param a - * @param b + * @param newSource The new value of the source prop + * @param oldSource The previous value */ - source(a: Node, b: Node) { - if (a.source !== b.source) { + source(newSource: Node, oldSource: Node) { + if (newSource.source !== oldSource.source) { this.resetState() } }, diff --git a/apps/files/src/components/SidebarTab.vue b/apps/files/src/components/SidebarTab.vue index a8a94fd4752d4..88dfd27ce5c7a 100644 --- a/apps/files/src/components/SidebarTab.vue +++ b/apps/files/src/components/SidebarTab.vue @@ -48,7 +48,7 @@ export default { }, icon: { type: String, - required: false, + default: '', }, /** diff --git a/apps/files/src/services/PreviewService.ts b/apps/files/src/services/PreviewService.ts index 769a1fcfb9f37..6dbb67f30b6e9 100644 --- a/apps/files/src/services/PreviewService.ts +++ b/apps/files/src/services/PreviewService.ts @@ -8,18 +8,14 @@ const SWCacheName = 'previews' /** * Check if the preview is already cached by the service worker - * @param previewUrl + * @param previewUrl URL to check */ -export const isCachedPreview = function(previewUrl: string): Promise { +export async function isCachedPreview(previewUrl: string): Promise { if (!window?.caches?.open) { - return Promise.resolve(false) + return false } - return window?.caches?.open(SWCacheName) - .then(function(cache) { - return cache.match(previewUrl) - .then(function(response) { - return !!response - }) - }) + const cache = await window.caches.open(SWCacheName) + const response = await cache.match(previewUrl) + return response !== undefined } diff --git a/apps/files/src/store/dragging.ts b/apps/files/src/store/dragging.ts index 667c6fe67a726..da60f8413b037 100644 --- a/apps/files/src/store/dragging.ts +++ b/apps/files/src/store/dragging.ts @@ -13,8 +13,8 @@ export const useDragAndDropStore = defineStore('dragging', { actions: { /** - * Set the selection of fileIds - * @param selection + * Set the selection of files being dragged currently + * @param selection array of node sources */ set(selection = [] as FileSource[]) { Vue.set(this, 'dragging', selection) diff --git a/apps/files/src/store/files.ts b/apps/files/src/store/files.ts index 952e3cd41c5b8..f2079bb1d4d5a 100644 --- a/apps/files/src/store/files.ts +++ b/apps/files/src/store/files.ts @@ -58,7 +58,7 @@ export const useFilesStore = function(...args) { * * @param service The service (files view) * @param path The path relative within the service - * @returns Array of cached nodes within the path + * @return Array of cached nodes within the path */ getNodesByPath(service: string, path?: string): Node[] { const pathsStore = usePathsStore() diff --git a/apps/files_external/tests/appSpec.js b/apps/files_external/tests/appSpec.js index fcbef7ef8221e..4d150cd36bb9f 100644 --- a/apps/files_external/tests/appSpec.js +++ b/apps/files_external/tests/appSpec.js @@ -2,6 +2,7 @@ * SPDX-FileCopyrightText: 2014 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ +import $ from 'jquery' describe('OCA.Files_External.App tests', function() { const App = OCA.Files_External.App diff --git a/apps/settings/src/components/AppStoreSidebar/AppDetailsTab.vue b/apps/settings/src/components/AppStoreSidebar/AppDetailsTab.vue index f70696f410008..f3adbfd2a1ca5 100644 --- a/apps/settings/src/components/AppStoreSidebar/AppDetailsTab.vue +++ b/apps/settings/src/components/AppStoreSidebar/AppDetailsTab.vue @@ -343,16 +343,16 @@ export default { .sort((a, b) => a.name.localeCompare(b.name)) }, }, - mounted() { - if (this.app.groups.length > 0) { - this.groupCheckedAppsData = true - } - }, watch: { 'app.id'() { this.removeData = false }, }, + mounted() { + if (this.app.groups.length > 0) { + this.groupCheckedAppsData = true + } + }, methods: { toggleRemoveData() { this.removeData = !this.removeData @@ -427,6 +427,7 @@ export default { border-color: var(--color-error); background: var(--color-main-background); } + .force:hover, .force:active { color: var(--color-main-background); diff --git a/core/src/components/setup/RecommendedApps.vue b/core/src/components/setup/RecommendedApps.vue index 9bab568a924e0..ffd1480cc493e 100644 --- a/core/src/components/setup/RecommendedApps.vue +++ b/core/src/components/setup/RecommendedApps.vue @@ -55,16 +55,15 @@