From c4e82bd25dfac3c58d17007874aa0280000e17c4 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Tue, 28 Nov 2023 18:27:57 +0100 Subject: [PATCH] Use new API to register Files view Signed-off-by: Louis Chemineau --- src/main.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index f2fea3103..a10d7139e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,6 +21,7 @@ */ /* eslint-disable */ import { translate as t } from '@nextcloud/l10n' +import { View, getNavigation } from '@nextcloud/files' import FolderSvg from '@mdi/svg/svg/folder-account.svg?raw' import { getContents } from './services/groupfolders' import './actions/openGroupfolderAction' @@ -33,16 +34,19 @@ declare global { const appName: string } -const Navigation = window.OCP.Files.Navigation -Navigation.register({ +const Navigation = getNavigation() +Navigation.register(new View({ id: appName, name: t('groupfolders', 'Group folders'), caption: t('groupfolders', 'List of group folders.'), + emptyTitle: t('files', 'No group folders yet'), + emptyCaption: t('files', 'Group folders will show up here'), + icon: FolderSvg, order: 20, columns: [], getContents, -}) +}))