aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/views/publicShare.ts
blob: 118973f54f5178768eeb4dc22a22e0295db25c5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
 * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
import { translate as t } from '@nextcloud/l10n'
import { View, getNavigation } from '@nextcloud/files'
import LinkSvg from '@mdi/svg/svg/link.svg?raw'

import { getContents } from '../../../files/src/services/Files'

export default () => {
	const view = new View({
		id: 'public-share',
		name: t('files_sharing', 'Public share'),
		caption: t('files_sharing', 'Public shared files.'),

		emptyTitle: t('files_sharing', 'No files'),
		emptyCaption: t('files_sharing', 'Files and folders shared with you will show up here'),

		icon: LinkSvg,
		order: 1,

		getContents,
	})

	const Navigation = getNavigation()
	Navigation.register(view)
}