mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #49348 from nextcloud/fix/eslint-warnings
chore: Resolve ESLint warnings
This commit is contained in:
commit
bca2685074
16 changed files with 35 additions and 38 deletions
|
|
@ -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() } }
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -225,11 +225,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()
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export default {
|
|||
},
|
||||
icon: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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<boolean> {
|
||||
export async function isCachedPreview(previewUrl: string): Promise<boolean> {
|
||||
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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,8 +14,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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -55,17 +55,16 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import axios from '@nextcloud/axios'
|
||||
import { generateUrl, imagePath } from '@nextcloud/router'
|
||||
import { t } from '@nextcloud/l10n'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { generateUrl, imagePath } from '@nextcloud/router'
|
||||
import axios from '@nextcloud/axios'
|
||||
import pLimit from 'p-limit'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
|
||||
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
|
||||
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
|
||||
|
||||
import logger from '../../logger.js'
|
||||
|
||||
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
|
||||
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch.js'
|
||||
|
||||
const recommended = {
|
||||
calendar: {
|
||||
description: t('core', 'Schedule work & meetings, synced with all your devices.'),
|
||||
|
|
|
|||
4
dist/core-recommendedapps.js
vendored
4
dist/core-recommendedapps.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-recommendedapps.js.map
vendored
2
dist/core-recommendedapps.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files-sidebar.js
vendored
4
dist/files-sidebar.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-sidebar.js.map
vendored
2
dist/files-sidebar.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/settings-users-3239.js
vendored
4
dist/settings-users-3239.js
vendored
File diff suppressed because one or more lines are too long
2
dist/settings-users-3239.js.map
vendored
2
dist/settings-users-3239.js.map
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue