Skip to content

Commit

Permalink
Use new API to register Files view
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge authored and backportbot-nextcloud[bot] committed Nov 28, 2023
1 parent 0203e44 commit ffa07d1
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 ffa07d1

Please sign in to comment.