Skip to content

Commit

Permalink
Merge pull request #2648 from nextcloud/backport/2645/stable28
Browse files Browse the repository at this point in the history
[stable28] Use new API to register Files view
  • Loading branch information
artonge authored Nov 29, 2023
2 parents 4530f0b + 4004c77 commit 6d6e6da
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 6d6e6da

Please sign in to comment.