diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/src/actions/editLocallyAction.spec.ts | 6 | ||||
-rw-r--r-- | apps/files/src/actions/openFolderAction.spec.ts | 5 | ||||
-rw-r--r-- | apps/files/src/actions/sidebarAction.ts | 1 | ||||
-rw-r--r-- | apps/files/src/components/SidebarTab.vue | 1 | ||||
-rw-r--r-- | apps/files/src/services/RouterService.ts | 14 | ||||
-rw-r--r-- | apps/files/src/views/Navigation.cy.ts | 2 | ||||
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryInternal.vue | 1 | ||||
-rw-r--r-- | apps/settings/src/components/AppList.vue | 10 | ||||
-rw-r--r-- | apps/settings/src/components/GroupListItem.vue | 7 | ||||
-rw-r--r-- | apps/settings/src/components/PersonalInfo/shared/FederationControlAction.vue | 24 | ||||
-rw-r--r-- | apps/theming/src/components/BackgroundSettings.vue | 4 |
11 files changed, 34 insertions, 41 deletions
diff --git a/apps/files/src/actions/editLocallyAction.spec.ts b/apps/files/src/actions/editLocallyAction.spec.ts index 93315c5a016..3582c0d9138 100644 --- a/apps/files/src/actions/editLocallyAction.spec.ts +++ b/apps/files/src/actions/editLocallyAction.spec.ts @@ -21,11 +21,11 @@ */ import { action } from './editLocallyAction' import { expect } from '@jest/globals' -import { File, Folder, Permission } from '@nextcloud/files' +import { File, Permission } from '@nextcloud/files' import { FileAction } from '../services/FileAction' +import * as ncDialogs from '@nextcloud/dialogs' import axios from '@nextcloud/axios' import type { Navigation } from '../services/Navigation' -import ncDialogs from '@nextcloud/dialogs' const view = { id: 'files', @@ -140,7 +140,7 @@ describe('Edit locally action execute tests', () => { test('Edit locally fails and show error', async () => { jest.spyOn(axios, 'post').mockImplementation(async () => ({})) - jest.spyOn(ncDialogs, 'showError') + jest.spyOn(ncDialogs, 'showError').mockImplementation(async () => ({})) const file = new File({ id: 1, diff --git a/apps/files/src/actions/openFolderAction.spec.ts b/apps/files/src/actions/openFolderAction.spec.ts index 07502be2eed..140b6722608 100644 --- a/apps/files/src/actions/openFolderAction.spec.ts +++ b/apps/files/src/actions/openFolderAction.spec.ts @@ -21,7 +21,7 @@ */ import { action } from './openFolderAction' import { expect } from '@jest/globals' -import { File, Folder, Permission } from '@nextcloud/files' +import { File, Folder, Node, Permission } from '@nextcloud/files' import { FileAction } from '../services/FileAction' import type { Navigation } from '../services/Navigation' @@ -139,8 +139,7 @@ describe('Open folder action execute tests', () => { const goToRouteMock = jest.fn() window.OCP = { Files: { Router: { goToRoute: goToRouteMock } } } - // @ts-ignore null as Node - const exec = await action.exec(null, view, '/') + const exec = await action.exec(null as unknown as Node, view, '/') expect(exec).toBe(false) expect(goToRouteMock).toBeCalledTimes(0) }) diff --git a/apps/files/src/actions/sidebarAction.ts b/apps/files/src/actions/sidebarAction.ts index d0baf611992..4766d2e90df 100644 --- a/apps/files/src/actions/sidebarAction.ts +++ b/apps/files/src/actions/sidebarAction.ts @@ -65,4 +65,3 @@ export const action = new FileAction({ }) registerFileAction(action) - diff --git a/apps/files/src/components/SidebarTab.vue b/apps/files/src/components/SidebarTab.vue index 0a6432b47b6..78c050048f1 100644 --- a/apps/files/src/components/SidebarTab.vue +++ b/apps/files/src/components/SidebarTab.vue @@ -1,4 +1,3 @@ - <!-- - @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com> - diff --git a/apps/files/src/services/RouterService.ts b/apps/files/src/services/RouterService.ts index 978e009514e..55033f9c79c 100644 --- a/apps/files/src/services/RouterService.ts +++ b/apps/files/src/services/RouterService.ts @@ -19,14 +19,13 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -import type { Route } from 'vue-router'; -import type VueRouter from 'vue-router'; -import type { Dictionary } from 'vue-router/types/router'; -import type { Location } from 'vue-router/types/router'; +import type { Route } from 'vue-router' +import type VueRouter from 'vue-router' +import type { Dictionary, Location } from 'vue-router/types/router' export default class RouterService { - private _router: VueRouter; + private _router: VueRouter constructor(router: VueRouter) { this._router = router @@ -34,12 +33,12 @@ export default class RouterService { /** * Trigger a route change on the files app - * + * * @param path the url path, eg: '/trashbin?dir=/Deleted' * @param replace replace the current history * @see https://router.vuejs.org/guide/essentials/navigation.html#navigate-to-a-different-location */ - goTo(path: string, replace: boolean = false): Promise<Route> { + goTo(path: string, replace = false): Promise<Route> { return this._router.push({ path, replace, @@ -68,4 +67,5 @@ export default class RouterService { replace, } as Location) } + } diff --git a/apps/files/src/views/Navigation.cy.ts b/apps/files/src/views/Navigation.cy.ts index c9a7ca98ee1..97f1f8ee7b8 100644 --- a/apps/files/src/views/Navigation.cy.ts +++ b/apps/files/src/views/Navigation.cy.ts @@ -161,7 +161,7 @@ describe('Quota rendering', () => { // TODO: remove when @nextcloud/l10n 2.0 is released // https://github.com/nextcloud/nextcloud-l10n/pull/542 cy.stub(L10n, 'translate', (app, text, vars = {}, number) => { - cy.log({app, text, vars, number}) + cy.log({ app, text, vars, number }) return text.replace(/%n/g, '' + number).replace(/{([^{}]*)}/g, (match, key) => { return vars[key] }) diff --git a/apps/files_sharing/src/components/SharingEntryInternal.vue b/apps/files_sharing/src/components/SharingEntryInternal.vue index c7c75a6777f..8d2194c62b0 100644 --- a/apps/files_sharing/src/components/SharingEntryInternal.vue +++ b/apps/files_sharing/src/components/SharingEntryInternal.vue @@ -1,4 +1,3 @@ - <template> <ul> <SharingEntrySimple ref="shareEntrySimple" diff --git a/apps/settings/src/components/AppList.vue b/apps/settings/src/components/AppList.vue index 234fde088e1..734c1952998 100644 --- a/apps/settings/src/components/AppList.vue +++ b/apps/settings/src/components/AppList.vue @@ -196,15 +196,13 @@ export default { return (this.category === 'app-bundles') }, allBundlesEnabled() { - const self = this - return function(id) { - return self.bundleApps(id).filter(app => !app.active).length === 0 + return (id) => { + return this.bundleApps(id).filter(app => !app.active).length === 0 } }, bundleToggleText() { - const self = this - return function(id) { - if (self.allBundlesEnabled(id)) { + return (id) => { + if (this.allBundlesEnabled(id)) { return t('settings', 'Disable all') } return t('settings', 'Enable all') diff --git a/apps/settings/src/components/GroupListItem.vue b/apps/settings/src/components/GroupListItem.vue index 639811d1e39..b7c01ec284f 100644 --- a/apps/settings/src/components/GroupListItem.vue +++ b/apps/settings/src/components/GroupListItem.vue @@ -123,16 +123,15 @@ export default { } }, removeGroup(groupid) { - const self = this // TODO migrate to a vue js confirm dialog component OC.dialogs.confirm( t('settings', 'You are about to remove the group {group}. The users will NOT be deleted.', { group: groupid }), t('settings', 'Please confirm the group removal '), - function(success) { + (success) => { if (success) { - self.$store.dispatch('removeGroup', groupid) + this.$store.dispatch('removeGroup', groupid) } - } + }, ) }, }, diff --git a/apps/settings/src/components/PersonalInfo/shared/FederationControlAction.vue b/apps/settings/src/components/PersonalInfo/shared/FederationControlAction.vue index 8290ece03c4..60fc6a6f639 100644 --- a/apps/settings/src/components/PersonalInfo/shared/FederationControlAction.vue +++ b/apps/settings/src/components/PersonalInfo/shared/FederationControlAction.vue @@ -87,18 +87,18 @@ export default { </script> <style lang="scss" scoped> - .federation-actions__btn { - &::v-deep p { - width: 150px !important; - padding: 8px 0 !important; - color: var(--color-main-text) !important; - font-size: 12.8px !important; - line-height: 1.5em !important; - } +.federation-actions__btn { + &::v-deep p { + width: 150px !important; + padding: 8px 0 !important; + color: var(--color-main-text) !important; + font-size: 12.8px !important; + line-height: 1.5em !important; } +} - .federation-actions__btn--active { - background-color: var(--color-primary-element-light) !important; - box-shadow: inset 2px 0 var(--color-primary-element) !important; - } +.federation-actions__btn--active { + background-color: var(--color-primary-element-light) !important; + box-shadow: inset 2px 0 var(--color-primary-element) !important; +} </style> diff --git a/apps/theming/src/components/BackgroundSettings.vue b/apps/theming/src/components/BackgroundSettings.vue index 20c7ef622de..efe18634989 100644 --- a/apps/theming/src/components/BackgroundSettings.vue +++ b/apps/theming/src/components/BackgroundSettings.vue @@ -252,8 +252,8 @@ export default { const result = await axios.post(generateUrl('/apps/theming/background/color'), { color }) this.update(result.data) }, - debouncePickColor: debounce(function() { - this.pickColor(...arguments) + debouncePickColor: debounce(function(...args) { + this.pickColor(...args) }, 200), async pickFile() { |