Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions apps/files/src/services/Recent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { ContentsWithRoot, Node } from '@nextcloud/files'
import type { FileStat, ResponseDataDetailed, SearchResult } from 'webdav'
import type { ResponseDataDetailed, SearchResult } from 'webdav'

import { getCurrentUser } from '@nextcloud/auth'
import { Folder, Permission, davGetRecentSearch, davRootPath, davRemoteURL, davResultToNode } from '@nextcloud/files'
Expand All @@ -12,19 +12,10 @@ import { CancelablePromise } from 'cancelable-promise'
import { useUserConfigStore } from '../store/userconfig.ts'
import { getPinia } from '../store/index.ts'
import { client } from './WebdavClient.ts'
import { getBaseUrl } from '@nextcloud/router'

const lastTwoWeeksTimestamp = Math.round((Date.now() / 1000) - (60 * 60 * 24 * 14))
const recentLimit = loadState<number>('files', 'recent_limit', 100)

/**
* Helper to map a WebDAV result to a Nextcloud node
* The search endpoint already includes the dav remote URL so we must not include it in the source
*
* @param stat the WebDAV result
*/
const resultToNode = (stat: FileStat) => davResultToNode(stat, davRootPath, getBaseUrl())

/**
* Get recently changed nodes
*
Expand Down Expand Up @@ -54,7 +45,7 @@ export const getContents = (path = '/'): CancelablePromise<ContentsWithRoot> =>
}) as ResponseDataDetailed<SearchResult>

const contents = contentsResponse.data.results
.map(resultToNode)
.map((stat) => davResultToNode(stat))
.filter(filterHidden)

return {
Expand Down
5 changes: 2 additions & 3 deletions apps/files/src/services/WebDavSearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import type { INode } from '@nextcloud/files'
import type { ResponseDataDetailed, SearchResult } from 'webdav'

import { getCurrentUser } from '@nextcloud/auth'
import { defaultRootPath, getDavNameSpaces, getDavProperties, resultToNode } from '@nextcloud/files/dav'
import { getBaseUrl } from '@nextcloud/router'
import { getDavNameSpaces, getDavProperties, resultToNode } from '@nextcloud/files/dav'
import { client } from './WebdavClient.ts'
import escapeHTML from 'escape-html'
import logger from '../logger.ts'
Expand Down Expand Up @@ -80,5 +79,5 @@ export async function searchNodes(query: string, { dir, signal }: SearchNodesOpt
}

// otherwise return the result mapped to Nextcloud nodes
return data.results.map((result) => resultToNode(result, defaultRootPath, getBaseUrl()))
return data.results.map((result) => resultToNode(result))
}
5 changes: 4 additions & 1 deletion dist/2751-2751.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -70,6 +70,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.4.2
- license: AGPL-3.0-or-later
Expand Down
5 changes: 4 additions & 1 deletion dist/3462-3462.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -70,6 +70,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.4.2
- license: AGPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion dist/3973-3973.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down
5 changes: 4 additions & 1 deletion dist/4271-4271.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -59,6 +59,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.4.2
- license: AGPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion dist/5819-5819.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down
5 changes: 4 additions & 1 deletion dist/7383-7383.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -70,6 +70,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.4.2
- license: AGPL-3.0-or-later
Expand Down
5 changes: 4 additions & 1 deletion dist/7457-7457.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -69,6 +69,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 8.41.0
- license: AGPL-3.0-or-later
Expand Down
4 changes: 2 additions & 2 deletions dist/9539-9539.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/9539-9539.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down
2 changes: 1 addition & 1 deletion dist/9539-9539.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/9906-9906.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -91,6 +91,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.4.2
- license: AGPL-3.0-or-later
Expand Down
4 changes: 2 additions & 2 deletions dist/comments-init.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/comments-init.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -52,6 +52,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- base64-js
- version: 1.5.1
- license: MIT
Expand Down
2 changes: 1 addition & 1 deletion dist/comments-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-common.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down
2 changes: 1 addition & 1 deletion dist/core-common.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-login.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/core-login.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down Expand Up @@ -173,6 +173,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/initial-state
- version: 2.2.0
- license: GPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion dist/core-login.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/core-main.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/core-main.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down Expand Up @@ -187,6 +187,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/initial-state
- version: 2.2.0
- license: GPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion dist/core-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-init.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down
2 changes: 1 addition & 1 deletion dist/files-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down
2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-reference-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-reference-files.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down
2 changes: 1 addition & 1 deletion dist/files-reference-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files-sidebar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-sidebar.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down
2 changes: 1 addition & 1 deletion dist/files-sidebar.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_external-init.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/files_external-init.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down Expand Up @@ -154,6 +154,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 8.41.0
- license: AGPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion dist/files_external-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_reminders-init.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/files_reminders-init.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -122,6 +122,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/vue
- version: 8.41.0
- license: AGPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion dist/files_reminders-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-init-public.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/files_sharing-init-public.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -68,6 +68,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @vue/devtools-api
- version: 6.6.4
- license: MIT
Expand Down
2 changes: 1 addition & 1 deletion dist/files_sharing-init-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-init.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-init.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand Down
2 changes: 1 addition & 1 deletion dist/files_sharing-init.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_sharing-public-nickname-handler.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion dist/files_sharing-public-nickname-handler.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ This file is generated from multiple sources. Included packages:
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/files
- version: 3.12.2
- version: 3.13.0
- license: AGPL-3.0-or-later
- @nextcloud/initial-state
- version: 3.0.0
Expand All @@ -129,6 +129,9 @@ This file is generated from multiple sources. Included packages:
- @nextcloud/router
- version: 3.1.0
- license: GPL-3.0-or-later
- @nextcloud/sharing
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.4.2
- license: AGPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion dist/files_sharing-public-nickname-handler.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/files_trashbin-init.js

Large diffs are not rendered by default.

Loading
Loading