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, -}) +}))