From 13611824395d1a187b28f153e933b5ff56a4e566 Mon Sep 17 00:00:00 2001 From: John Molakvoæ Date: Tue, 4 Apr 2023 18:19:17 +0200 Subject: chore(eslint): clean and fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- apps/files_trashbin/src/actions/restoreAction.ts | 5 +++-- apps/files_trashbin/src/css/trashbin.css | 3 --- apps/files_trashbin/src/main.ts | 6 +++--- apps/files_trashbin/src/services/trashbin.ts | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) delete mode 100644 apps/files_trashbin/src/css/trashbin.css (limited to 'apps/files_trashbin/src') diff --git a/apps/files_trashbin/src/actions/restoreAction.ts b/apps/files_trashbin/src/actions/restoreAction.ts index 0d309a3f3c6..493106953a6 100644 --- a/apps/files_trashbin/src/actions/restoreAction.ts +++ b/apps/files_trashbin/src/actions/restoreAction.ts @@ -27,7 +27,8 @@ import { translate as t } from '@nextcloud/l10n' import axios from '@nextcloud/axios' import History from '@mdi/svg/svg/history.svg?raw' -import { registerFileAction, FileAction } from '../../../files/src/services/FileAction' +import { registerFileAction, FileAction } from '../../../files/src/services/FileAction.ts' +import logger from '../../../files/src/logger.js' registerFileAction(new FileAction({ id: 'restore', @@ -64,7 +65,7 @@ registerFileAction(new FileAction({ emit('files:file:deleted', node) return true } catch (error) { - console.error(error) + logger.error(error) return false } }, diff --git a/apps/files_trashbin/src/css/trashbin.css b/apps/files_trashbin/src/css/trashbin.css deleted file mode 100644 index 40bbdfb037b..00000000000 --- a/apps/files_trashbin/src/css/trashbin.css +++ /dev/null @@ -1,3 +0,0 @@ -.files-list__row-trashbin-deleted { - -} diff --git a/apps/files_trashbin/src/main.ts b/apps/files_trashbin/src/main.ts index 118f0ec72ee..aa41f48ab12 100644 --- a/apps/files_trashbin/src/main.ts +++ b/apps/files_trashbin/src/main.ts @@ -19,14 +19,14 @@ * along with this program. If not, see . * */ -import type NavigationService from '../../files/src/services/Navigation' -import type { Navigation } from '../../files/src/services/Navigation' +import type NavigationService from '../../files/src/services/Navigation.ts' +import type { Navigation } from '../../files/src/services/Navigation.ts' import { translate as t, translate } from '@nextcloud/l10n' import DeleteSvg from '@mdi/svg/svg/delete.svg?raw' import moment from '@nextcloud/moment' -import getContents from './services/trashbin' +import { getContents } from './services/trashbin' // Register restore action import './actions/restoreAction' diff --git a/apps/files_trashbin/src/services/trashbin.ts b/apps/files_trashbin/src/services/trashbin.ts index b20911b5b2d..9982750ba5c 100644 --- a/apps/files_trashbin/src/services/trashbin.ts +++ b/apps/files_trashbin/src/services/trashbin.ts @@ -25,7 +25,7 @@ import { File, Folder, parseWebdavPermissions } from '@nextcloud/files' import { generateRemoteUrl, generateUrl } from '@nextcloud/router' import type { FileStat, ResponseDataDetailed } from 'webdav' -import type { ContentsWithRoot } from '../../../files/src/services/Navigation' +import type { ContentsWithRoot } from '../../../files/src/services/Navigation.ts' import client, { rootPath } from './client' @@ -78,7 +78,7 @@ const resultToNode = function(node: FileStat): File | Folder { : new Folder(nodeData) } -export default async (path: string = '/'): Promise => { +export const getContents = async (path: string = '/'): Promise => { // TODO: use only one request when webdav-client supports it // @see https://github.com/perry-mitchell/webdav-client/pull/334 const rootResponse = await client.stat(path, { -- cgit v1.2.3