2023-09-21 06:15:11 -04:00
|
|
|
/**
|
2024-05-28 10:42:42 -04:00
|
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2023-09-21 06:15:11 -04:00
|
|
|
*/
|
2023-09-29 05:10:51 -04:00
|
|
|
|
2024-01-18 12:27:22 -05:00
|
|
|
import { addNewFileMenuEntry, registerDavProperty, registerFileAction } from '@nextcloud/files'
|
2024-09-04 12:42:04 -04:00
|
|
|
import { isPublicShare } from '@nextcloud/sharing/public'
|
2025-01-10 05:56:17 -05:00
|
|
|
import { registerConvertActions } from './actions/convertAction.ts'
|
2023-09-21 06:15:11 -04:00
|
|
|
import { action as deleteAction } from './actions/deleteAction.ts'
|
|
|
|
|
import { action as downloadAction } from './actions/downloadAction.ts'
|
|
|
|
|
import { action as favoriteAction } from './actions/favoriteAction.ts'
|
2023-08-24 06:16:53 -04:00
|
|
|
import { action as moveOrCopyAction } from './actions/moveOrCopyAction.ts'
|
2023-09-21 06:15:11 -04:00
|
|
|
import { action as openFolderAction } from './actions/openFolderAction.ts'
|
|
|
|
|
import { action as openInFilesAction } from './actions/openInFilesAction.ts'
|
2023-02-23 07:35:31 -05:00
|
|
|
import { action as editLocallyAction } from './actions/openLocallyAction.ts'
|
2023-09-21 06:15:11 -04:00
|
|
|
import { action as renameAction } from './actions/renameAction.ts'
|
|
|
|
|
import { action as sidebarAction } from './actions/sidebarAction.ts'
|
|
|
|
|
import { action as viewInFolderAction } from './actions/viewInFolderAction.ts'
|
2025-06-24 09:00:23 -04:00
|
|
|
import { registerFilenameFilter } from './filters/FilenameFilter.ts'
|
2024-06-07 08:14:55 -04:00
|
|
|
import { registerHiddenFilesFilter } from './filters/HiddenFilesFilter.ts'
|
|
|
|
|
import { registerModifiedFilter } from './filters/ModifiedFilter.ts'
|
2025-07-04 06:14:30 -04:00
|
|
|
import { registerFilterToSearchToggle } from './filters/SearchFilter.ts'
|
2024-06-07 08:14:55 -04:00
|
|
|
import { registerTypeFilter } from './filters/TypeFilter.ts'
|
2024-01-20 19:29:24 -05:00
|
|
|
import { entry as newFolderEntry } from './newMenu/newFolder.ts'
|
|
|
|
|
import { registerTemplateEntries } from './newMenu/newFromTemplate.ts'
|
|
|
|
|
import { entry as newTemplatesFolder } from './newMenu/newTemplatesFolder.ts'
|
2023-11-08 08:52:50 -05:00
|
|
|
import { initLivePhotos } from './services/LivePhotos.ts'
|
2023-09-21 06:15:11 -04:00
|
|
|
import registerPreviewServiceWorker from './services/ServiceWorker.js'
|
2024-08-21 13:31:21 -04:00
|
|
|
import { registerFavoritesView } from './views/favorites.ts'
|
2025-06-24 09:03:30 -04:00
|
|
|
import { registerFilesView } from './views/files.ts'
|
2024-07-30 21:19:55 -04:00
|
|
|
import { registerFolderTreeView } from './views/folderTree.ts'
|
2025-07-03 11:04:38 -04:00
|
|
|
import { registerPersonalFilesView } from './views/personal-files.ts'
|
2023-09-21 06:15:11 -04:00
|
|
|
import registerRecentView from './views/recent.ts'
|
2025-06-24 09:03:30 -04:00
|
|
|
import { registerSearchView } from './views/search.ts'
|
|
|
|
|
|
2023-09-21 06:15:11 -04:00
|
|
|
// Register file actions
|
2025-01-10 05:56:17 -05:00
|
|
|
registerConvertActions()
|
2023-09-21 06:15:11 -04:00
|
|
|
registerFileAction(deleteAction)
|
|
|
|
|
registerFileAction(downloadAction)
|
|
|
|
|
registerFileAction(editLocallyAction)
|
|
|
|
|
registerFileAction(favoriteAction)
|
2023-08-24 06:16:53 -04:00
|
|
|
registerFileAction(moveOrCopyAction)
|
2023-09-21 06:15:11 -04:00
|
|
|
registerFileAction(openFolderAction)
|
|
|
|
|
registerFileAction(openInFilesAction)
|
|
|
|
|
registerFileAction(renameAction)
|
|
|
|
|
registerFileAction(sidebarAction)
|
|
|
|
|
registerFileAction(viewInFolderAction)
|
|
|
|
|
|
|
|
|
|
// Register new menu entry
|
|
|
|
|
addNewFileMenuEntry(newFolderEntry)
|
2024-01-20 19:29:24 -05:00
|
|
|
addNewFileMenuEntry(newTemplatesFolder)
|
|
|
|
|
registerTemplateEntries()
|
2023-09-21 06:15:11 -04:00
|
|
|
|
2024-09-04 12:42:04 -04:00
|
|
|
// Register files views when not on public share
|
|
|
|
|
if (isPublicShare() === false) {
|
|
|
|
|
registerFavoritesView()
|
|
|
|
|
registerFilesView()
|
|
|
|
|
registerPersonalFilesView()
|
2025-06-24 09:03:30 -04:00
|
|
|
registerRecentView()
|
|
|
|
|
registerSearchView()
|
2024-09-04 12:42:04 -04:00
|
|
|
registerFolderTreeView()
|
|
|
|
|
}
|
2023-09-21 06:15:11 -04:00
|
|
|
|
2024-06-07 08:14:55 -04:00
|
|
|
// Register file list filters
|
|
|
|
|
registerHiddenFilesFilter()
|
|
|
|
|
registerTypeFilter()
|
|
|
|
|
registerModifiedFilter()
|
2025-06-24 09:00:23 -04:00
|
|
|
registerFilenameFilter()
|
2025-07-04 06:14:30 -04:00
|
|
|
registerFilterToSearchToggle()
|
2024-06-07 08:14:55 -04:00
|
|
|
|
2023-09-21 06:15:11 -04:00
|
|
|
// Register preview service worker
|
|
|
|
|
registerPreviewServiceWorker()
|
2023-11-08 08:52:50 -05:00
|
|
|
|
|
|
|
|
registerDavProperty('nc:hidden', { nc: 'http://nextcloud.org/ns' })
|
2024-01-30 11:20:03 -05:00
|
|
|
registerDavProperty('nc:is-mount-root', { nc: 'http://nextcloud.org/ns' })
|
2024-08-29 08:27:59 -04:00
|
|
|
registerDavProperty('nc:metadata-blurhash', { nc: 'http://nextcloud.org/ns' })
|
2023-11-08 08:52:50 -05:00
|
|
|
|
|
|
|
|
initLivePhotos()
|