Skip to content

Commit

Permalink
Merge pull request #2645 from nextcloud/artonge/fix/navigation_regist…
Browse files Browse the repository at this point in the history
…ration

Use new API to register Files view
  • Loading branch information
artonge authored Nov 28, 2023
2 parents e997dbb + c4e82bd commit 27f4a11
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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,
})
}))

0 comments on commit 27f4a11

Please sign in to comment.