aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/src/files_views/trashbinView.ts
blob: 5b547071cc7aea083b973b13bf7d517885d2b38c (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
29
30
31
32
33
34
35
/**
 * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
import { View } from '@nextcloud/files'
import { t } from '@nextcloud/l10n'
import { deleted, deletedBy, originalLocation } from './columns.ts'
import { getContents } from '../services/trashbin.ts'

import svgDelete from '@mdi/svg/svg/delete.svg?raw'

export const TRASHBIN_VIEW_ID = 'trashbin'

export const trashbinView = new View({
	id: TRASHBIN_VIEW_ID,
	name: t('files_trashbin', 'Deleted files'),
	caption: t('files_trashbin', 'List of files that have been deleted.'),

	emptyTitle: t('files_trashbin', 'No deleted files'),
	emptyCaption: t('files_trashbin', 'Files and folders you have deleted will show up here'),

	icon: svgDelete,
	order: 50,
	sticky: true,

	defaultSortKey: 'deleted',

	columns: [
		originalLocation,
		deletedBy,
		deleted,
	],

	getContents,
})