diff options
Diffstat (limited to 'apps/files/src/views/recent.ts')
-rw-r--r-- | apps/files/src/views/recent.ts | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/files/src/views/recent.ts b/apps/files/src/views/recent.ts new file mode 100644 index 00000000000..fda1d99e13d --- /dev/null +++ b/apps/files/src/views/recent.ts @@ -0,0 +1,28 @@ +/** + * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +import { View, getNavigation } from '@nextcloud/files' +import { translate as t } from '@nextcloud/l10n' +import HistorySvg from '@mdi/svg/svg/history.svg?raw' + +import { getContents } from '../services/Recent' + +export default () => { + const Navigation = getNavigation() + Navigation.register(new View({ + id: 'recent', + name: t('files', 'Recent'), + caption: t('files', 'List of recently modified files and folders.'), + + emptyTitle: t('files', 'No recently modified files'), + emptyCaption: t('files', 'Files and folders you recently modified will show up here.'), + + icon: HistorySvg, + order: 10, + + defaultSortKey: 'mtime', + + getContents, + })) +} |