Merge pull request #50123 from nextcloud/feat/file-conversion-provider-front

This commit is contained in:
John Molakvoæ 2025-01-22 19:28:08 +01:00 committed by GitHub
commit 49cfd301f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
188 changed files with 1062 additions and 236 deletions

View file

@ -48,7 +48,7 @@ class ConversionApiController extends OCSController {
* @param string $targetMimeType The MIME type to which you want to convert the file
* @param string|null $destination The target path of the converted file. Written to a temporary file if left empty
*
* @return DataResponse<Http::STATUS_CREATED, array{path: string}, array{}>
* @return DataResponse<Http::STATUS_CREATED, array{path: string, fileId: int}, array{}>
*
* 201: File was converted and written to the destination or temporary file
*
@ -98,8 +98,12 @@ class ConversionApiController extends OCSController {
throw new OCSNotFoundException($this->l10n->t('Could not get relative path to converted file'));
}
$file = $userFolder->get($convertedFileRelativePath);
$fileId = $file->getId();
return new DataResponse([
'path' => $convertedFileRelativePath,
'fileId' => $fileId,
], Http::STATUS_CREATED);
}
}

View file

@ -2330,11 +2330,16 @@
"data": {
"type": "object",
"required": [
"path"
"path",
"fileId"
],
"properties": {
"path": {
"type": "string"
},
"fileId": {
"type": "integer",
"format": "int64"
}
}
}

View file

@ -0,0 +1,81 @@
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { Node, View } from '@nextcloud/files'
import { FileAction, registerFileAction } from '@nextcloud/files'
import { generateUrl } from '@nextcloud/router'
import { getCapabilities } from '@nextcloud/capabilities'
import { t } from '@nextcloud/l10n'
import AutoRenewSvg from '@mdi/svg/svg/autorenew.svg?raw'
import { convertFile, convertFiles, getParentFolder } from './convertUtils'
type ConversionsProvider = {
from: string,
to: string,
displayName: string,
}
export const ACTION_CONVERT = 'convert'
export const registerConvertActions = () => {
// Generate sub actions
const convertProviders = getCapabilities()?.files?.file_conversions as ConversionsProvider[] ?? []
const actions = convertProviders.map(({ to, from, displayName }) => {
return new FileAction({
id: `convert-${from}-${to}`,
displayName: () => t('files', 'Save as {displayName}', { displayName }),
iconSvgInline: () => generateIconSvg(to),
enabled: (nodes: Node[]) => {
// Check that all nodes have the same mime type
return nodes.every(node => from === node.mime)
},
async exec(node: Node, view: View, dir: string) {
// If we're here, we know that the node has a fileid
convertFile(node.fileid as number, to, getParentFolder(view, dir))
// Silently terminate, we'll handle the UI in the background
return null
},
async execBatch(nodes: Node[], view: View, dir: string) {
const fileIds = nodes.map(node => node.fileid).filter(Boolean) as number[]
convertFiles(fileIds, to, getParentFolder(view, dir))
// Silently terminate, we'll handle the UI in the background
return Array(nodes.length).fill(null)
},
parent: ACTION_CONVERT,
})
})
// Register main action
registerFileAction(new FileAction({
id: ACTION_CONVERT,
displayName: () => t('files', 'Save as …'),
iconSvgInline: () => AutoRenewSvg,
enabled: (nodes: Node[], view: View) => {
return actions.some(action => action.enabled!(nodes, view))
},
async exec() {
return null
},
order: 25,
}))
// Register sub actions
actions.forEach(registerFileAction)
}
export const generateIconSvg = (mime: string) => {
// Generate icon based on mime type
const url = generateUrl('/core/mimeicon?mime=' + encodeURIComponent(mime))
return `<svg width="32" height="32" viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg">
<image href="${url}" height="32" width="32" />
</svg>`
}

View file

@ -0,0 +1,147 @@
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { AxiosResponse } from '@nextcloud/axios'
import type { Folder, View } from '@nextcloud/files'
import { emit } from '@nextcloud/event-bus'
import { generateOcsUrl } from '@nextcloud/router'
import { showError, showLoading, showSuccess } from '@nextcloud/dialogs'
import { t } from '@nextcloud/l10n'
import axios from '@nextcloud/axios'
import PQueue from 'p-queue'
import logger from '../logger'
import { useFilesStore } from '../store/files'
import { getPinia } from '../store'
import { usePathsStore } from '../store/paths'
const queue = new PQueue({ concurrency: 5 })
const requestConversion = function(fileId: number, targetMimeType: string): Promise<AxiosResponse> {
return axios.post(generateOcsUrl('/apps/files/api/v1/convert'), {
fileId,
targetMimeType,
})
}
export const convertFiles = async function(fileIds: number[], targetMimeType: string, parentFolder: Folder | null) {
const conversions = fileIds.map(fileId => queue.add(() => requestConversion(fileId, targetMimeType)))
// Start conversion
const toast = showLoading(t('files', 'Converting files…'))
// Handle results
try {
const results = await Promise.allSettled(conversions)
const failed = results.filter(result => result.status === 'rejected')
if (failed.length > 0) {
const messages = failed.map(result => result.reason?.response?.data?.ocs?.meta?.message) as string[]
logger.error('Failed to convert files', { fileIds, targetMimeType, messages })
// If all failed files have the same error message, show it
if (new Set(messages).size === 1) {
showError(t('files', 'Failed to convert files: {message}', { message: messages[0] }))
return
}
if (failed.length === fileIds.length) {
showError(t('files', 'All files failed to be converted'))
return
}
// A single file failed
if (failed.length === 1) {
// If we have a message for the failed file, show it
if (messages[0]) {
showError(t('files', 'One file could not be converted: {message}', { message: messages[0] }))
return
}
// Otherwise, show a generic error
showError(t('files', 'One file could not be converted'))
return
}
// We already check above when all files failed
// if we're here, we have a mix of failed and successful files
showError(t('files', '{count} files could not be converted', { count: failed.length }))
showSuccess(t('files', '{count} files successfully converted', { count: fileIds.length - failed.length }))
return
}
// All files converted
showSuccess(t('files', 'Files successfully converted'))
// Trigger a reload of the file list
if (parentFolder) {
emit('files:node:updated', parentFolder)
}
// Switch to the new files
const firstSuccess = results[0] as PromiseFulfilledResult<AxiosResponse>
const newFileId = firstSuccess.value.data.ocs.data.fileId
window.OCP.Files.Router.goToRoute(null, { ...window.OCP.Files.Router.params, fileid: newFileId }, window.OCP.Files.Router.query)
} catch (error) {
// Should not happen as we use allSettled and handle errors above
showError(t('files', 'Failed to convert files'))
logger.error('Failed to convert files', { fileIds, targetMimeType, error })
} finally {
// Hide loading toast
toast.hideToast()
}
}
export const convertFile = async function(fileId: number, targetMimeType: string, parentFolder: Folder | null) {
const toast = showLoading(t('files', 'Converting file…'))
try {
const result = await queue.add(() => requestConversion(fileId, targetMimeType)) as AxiosResponse
showSuccess(t('files', 'File successfully converted'))
// Trigger a reload of the file list
if (parentFolder) {
emit('files:node:updated', parentFolder)
}
// Switch to the new file
const newFileId = result.data.ocs.data.fileId
window.OCP.Files.Router.goToRoute(null, { ...window.OCP.Files.Router.params, fileid: newFileId }, window.OCP.Files.Router.query)
} catch (error) {
// If the server returned an error message, show it
if (error.response?.data?.ocs?.meta?.message) {
showError(t('files', 'Failed to convert file: {message}', { message: error.response.data.ocs.meta.message }))
return
}
logger.error('Failed to convert file', { fileId, targetMimeType, error })
showError(t('files', 'Failed to convert file'))
} finally {
// Hide loading toast
toast.hideToast()
}
}
/**
* Get the parent folder of a path
*
* TODO: replace by the parent node straight away when we
* update the Files actions api accordingly.
*
* @param view The current view
* @param path The path to the file
* @returns The parent folder
*/
export const getParentFolder = function(view: View, path: string): Folder | null {
const filesStore = useFilesStore(getPinia())
const pathsStore = usePathsStore(getPinia())
const parentSource = pathsStore.getPath(view.id, path)
if (!parentSource) {
return null
}
const parentFolder = filesStore.getNode(parentSource) as Folder | undefined
return parentFolder ?? null
}

View file

@ -32,8 +32,10 @@ import registerPreviewServiceWorker from './services/ServiceWorker.js'
import { initLivePhotos } from './services/LivePhotos'
import { isPublicShare } from '@nextcloud/sharing/public'
import { registerConvertActions } from './actions/convertAction.ts'
// Register file actions
registerConvertActions()
registerFileAction(deleteAction)
registerFileAction(downloadAction)
registerFileAction(editLocallyAction)

View file

@ -54,7 +54,7 @@ export const useFilesStore = function(...args) {
actions: {
/**
* Get cached nodes within a given path
* Get cached child nodes within a given path
*
* @param service The service (files view)
* @param path The path relative within the service

View file

@ -78,12 +78,16 @@ class ConversionApiControllerTest extends TestCase {
$this->userFolder->method('getFirstNodeById')->with(42)->willReturn($this->file);
$this->userFolder->method('getRelativePath')->with($convertedFileAbsolutePath)->willReturn('/test.png');
$this->userFolder->method('get')->with('/test.png')->willReturn($this->file);
$this->file->method('getId')->willReturn(42);
$this->fileConversionManager->method('convert')->with($this->file, 'image/png', null)->willReturn($convertedFileAbsolutePath);
$actual = $this->conversionApiController->convert(42, 'image/png', null);
$expected = new DataResponse([
'path' => '/test.png',
'fileId' => 42,
], Http::STATUS_CREATED);
$this->assertEquals($expected, $actual);

View file

@ -14,6 +14,7 @@ use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\FileDisplayResponse;
use OCP\AppFramework\Http\RedirectResponse;
@ -183,4 +184,25 @@ class PreviewController extends Controller {
return new DataResponse([], Http::STATUS_BAD_REQUEST);
}
}
/**
* Get a preview by mime
*
* @param string $mime Mime type
* @return RedirectResponse<Http::STATUS_SEE_OTHER, array{}>
*
* 303: The mime icon url
*/
#[NoCSRFRequired]
#[PublicPage]
#[FrontpageRoute(verb: 'GET', url: '/core/mimeicon')]
#[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function getMimeIconUrl(string $mime = 'application/octet-stream') {
$url = $this->mimeIconProvider->getMimeIconUrl($mime);
if ($url === null) {
$url = $this->mimeIconProvider->getMimeIconUrl('application/octet-stream');
}
return new RedirectResponse($url);
}
}

View file

@ -52,7 +52,7 @@
*/.tooltip{position:absolute;display:block;font-family:var(--font-face);font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.6;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;overflow-wrap:anywhere;font-size:12px;opacity:0;z-index:100000;margin-top:-3px;padding:10px 0;filter:drop-shadow(0 1px 10px var(--color-box-shadow))}.tooltip.in,.tooltip.show,.tooltip.tooltip[aria-hidden=false]{visibility:visible;opacity:1;transition:opacity .15s}.tooltip.top .tooltip-arrow,.tooltip[x-placement^=top]{inset-inline-start:50%;margin-inline-start:-10px}.tooltip.bottom,.tooltip[x-placement^=bottom]{margin-top:3px;padding:10px 0}.tooltip.right,.tooltip[x-placement^=right]{margin-inline-start:3px;padding:0 10px}.tooltip.right .tooltip-arrow,.tooltip[x-placement^=right] .tooltip-arrow{top:50%;inset-inline-start:0;margin-top:-10px;border-width:10px 10px 10px 0;border-inline-end-color:var(--color-main-background)}.tooltip.left,.tooltip[x-placement^=left]{margin-inline-start:-3px;padding:0 5px}.tooltip.left .tooltip-arrow,.tooltip[x-placement^=left] .tooltip-arrow{top:50%;inset-inline-end:0;margin-top:-10px;border-width:10px 0 10px 10px;border-inline-start-color:var(--color-main-background)}.tooltip.top .tooltip-arrow,.tooltip.top .arrow,.tooltip.top-left .tooltip-arrow,.tooltip.top-left .arrow,.tooltip[x-placement^=top] .tooltip-arrow,.tooltip[x-placement^=top] .arrow,.tooltip.top-right .tooltip-arrow,.tooltip.top-right .arrow{bottom:0;border-width:10px 10px 0;border-top-color:var(--color-main-background)}.tooltip.top-left .tooltip-arrow{inset-inline-end:10px;margin-bottom:-10px}.tooltip.top-right .tooltip-arrow{inset-inline-start:10px;margin-bottom:-10px}.tooltip.bottom .tooltip-arrow,.tooltip.bottom .arrow,.tooltip[x-placement^=bottom] .tooltip-arrow,.tooltip[x-placement^=bottom] .arrow,.tooltip.bottom-left .tooltip-arrow,.tooltip.bottom-left .arrow,.tooltip.bottom-right .tooltip-arrow,.tooltip.bottom-right .arrow{top:0;border-width:0 10px 10px;border-bottom-color:var(--color-main-background)}.tooltip[x-placement^=bottom] .tooltip-arrow,.tooltip.bottom .tooltip-arrow{inset-inline-start:50%;margin-inline-start:-10px}.tooltip.bottom-left .tooltip-arrow{inset-inline-end:10px;margin-top:-10px}.tooltip.bottom-right .tooltip-arrow{inset-inline-start:10px;margin-top:-10px}.tooltip-inner{max-width:350px;padding:5px 8px;background-color:var(--color-main-background);color:var(--color-main-text);text-align:center;border-radius:var(--border-radius)}.tooltip-arrow,.tooltip .arrow{position:absolute;width:0;height:0;border-color:rgba(0,0,0,0);border-style:solid}/*!
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/.toastify.dialogs{min-width:200px;background:none;background-color:var(--color-main-background);color:var(--color-main-text);box-shadow:0 0 6px 0 var(--color-box-shadow);padding:0 12px;margin-top:45px;position:fixed;z-index:10100;border-radius:var(--border-radius);display:flex;align-items:center}.toastify.dialogs .toast-undo-container{display:flex;align-items:center}.toastify.dialogs .toast-undo-button,.toastify.dialogs .toast-close{position:static;overflow:hidden;box-sizing:border-box;min-width:44px;height:100%;padding:12px;white-space:nowrap;background-repeat:no-repeat;background-position:center;background-color:transparent;min-height:0}.toastify.dialogs .toast-undo-button.toast-close,.toastify.dialogs .toast-close.toast-close{text-indent:0;opacity:.4;border:none;min-height:44px;margin-left:10px;font-size:0}.toastify.dialogs .toast-undo-button.toast-close::before,.toastify.dialogs .toast-close.toast-close::before{background-image:url("data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20height='16'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3cpath%20d='M6.4%2019%205%2017.6l5.6-5.6L5%206.4%206.4%205l5.6%205.6L17.6%205%2019%206.4%2013.4%2012l5.6%205.6-1.4%201.4-5.6-5.6L6.4%2019Z'%20style='fill-rule:nonzero'%20transform='matrix(.85714%200%200%20.85714%20-2.286%20-2.286)'/%3e%3c/svg%3e");content:" ";filter:var(--background-invert-if-dark);display:inline-block;width:16px;height:16px}.toastify.dialogs .toast-undo-button.toast-undo-button,.toastify.dialogs .toast-close.toast-undo-button{margin:3px;height:calc(100% - 6px);margin-left:12px}.toastify.dialogs .toast-undo-button:hover,.toastify.dialogs .toast-undo-button:focus,.toastify.dialogs .toast-undo-button:active,.toastify.dialogs .toast-close:hover,.toastify.dialogs .toast-close:focus,.toastify.dialogs .toast-close:active{cursor:pointer;opacity:1}.toastify.dialogs.toastify-top{right:10px}.toastify.dialogs.toast-with-click{cursor:pointer}.toastify.dialogs.toast-error{border-left:3px solid var(--color-error)}.toastify.dialogs.toast-info{border-left:3px solid var(--color-primary)}.toastify.dialogs.toast-warning{border-left:3px solid var(--color-warning)}.toastify.dialogs.toast-success{border-left:3px solid var(--color-success)}.toastify.dialogs.toast-undo{border-left:3px solid var(--color-success)}.theme--dark .toastify.dialogs .toast-close.toast-close::before{background-image:url("data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20height='16'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3cpath%20d='M6.4%2019%205%2017.6l5.6-5.6L5%206.4%206.4%205l5.6%205.6L17.6%205%2019%206.4%2013.4%2012l5.6%205.6-1.4%201.4-5.6-5.6L6.4%2019Z'%20style='fill:%23fff;fill-rule:nonzero'%20transform='matrix(.85714%200%200%20.85714%20-2.286%20-2.286)'/%3e%3c/svg%3e")}.nc-generic-dialog .dialog__actions{justify-content:space-between;min-width:calc(100% - 12px)}/*!
*/.toastify.dialogs{min-width:200px;background:none;background-color:var(--color-main-background);color:var(--color-main-text);box-shadow:0 0 6px 0 var(--color-box-shadow);padding:0 12px;margin-top:45px;position:fixed;z-index:10100;border-radius:var(--border-radius);display:flex;align-items:center;min-height:50px}.toastify.dialogs .toast-loader-container,.toastify.dialogs .toast-undo-container{display:flex;align-items:center;width:100%}.toastify.dialogs .toast-undo-button,.toastify.dialogs .toast-close{position:static;overflow:hidden;box-sizing:border-box;min-width:44px;height:100%;padding:12px;white-space:nowrap;background-repeat:no-repeat;background-position:center;background-color:transparent;min-height:0}.toastify.dialogs .toast-undo-button.toast-close,.toastify.dialogs .toast-close.toast-close{text-indent:0;opacity:.4;border:none;min-height:44px;margin-left:10px;font-size:0}.toastify.dialogs .toast-undo-button.toast-close::before,.toastify.dialogs .toast-close.toast-close::before{background-image:url("data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20height='16'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3cpath%20d='M6.4%2019%205%2017.6l5.6-5.6L5%206.4%206.4%205l5.6%205.6L17.6%205%2019%206.4%2013.4%2012l5.6%205.6-1.4%201.4-5.6-5.6L6.4%2019Z'%20style='fill-rule:nonzero'%20transform='matrix(.85714%200%200%20.85714%20-2.286%20-2.286)'/%3e%3c/svg%3e");content:" ";filter:var(--background-invert-if-dark);display:inline-block;width:16px;height:16px}.toastify.dialogs .toast-undo-button.toast-undo-button,.toastify.dialogs .toast-close.toast-undo-button{margin:3px;height:calc(100% - 6px);margin-left:12px}.toastify.dialogs .toast-undo-button:hover,.toastify.dialogs .toast-undo-button:focus,.toastify.dialogs .toast-undo-button:active,.toastify.dialogs .toast-close:hover,.toastify.dialogs .toast-close:focus,.toastify.dialogs .toast-close:active{cursor:pointer;opacity:1}.toastify.dialogs.toastify-top{right:10px}.toastify.dialogs.toast-with-click{cursor:pointer}.toastify.dialogs.toast-error{border-left:3px solid var(--color-error)}.toastify.dialogs.toast-info{border-left:3px solid var(--color-primary)}.toastify.dialogs.toast-warning{border-left:3px solid var(--color-warning)}.toastify.dialogs.toast-success{border-left:3px solid var(--color-success)}.toastify.dialogs.toast-undo{border-left:3px solid var(--color-success)}.toastify.dialogs.toast-loading{border-left:3px solid var(--color-primary)}.toastify.dialogs.toast-loading .toast-loader{display:inline-block;width:20px;height:20px;animation:rotate var(--animation-duration, 0.8s) linear infinite;margin-left:auto}.theme--dark .toastify.dialogs .toast-close.toast-close::before{background-image:url("data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20height='16'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3cpath%20d='M6.4%2019%205%2017.6l5.6-5.6L5%206.4%206.4%205l5.6%205.6L17.6%205%2019%206.4%2013.4%2012l5.6%205.6-1.4%201.4-5.6-5.6L6.4%2019Z'%20style='fill:%23fff;fill-rule:nonzero'%20transform='matrix(.85714%200%200%20.85714%20-2.286%20-2.286)'/%3e%3c/svg%3e")}.nc-generic-dialog .dialog__actions{justify-content:space-between;min-width:calc(100% - 12px)}/*!
* SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/._file-picker__file-icon_19mjt_9{width:32px;height:32px;min-width:32px;min-height:32px;background-repeat:no-repeat;background-size:contain;display:flex;justify-content:center}/*!

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,473 @@
{
"openapi": "3.0.3",
"info": {
"title": "core-administration",
"version": "0.0.1",
"description": "Core functionality of Nextcloud",
"license": {
"name": "agpl"
}
},
"components": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
},
"bearer_auth": {
"type": "http",
"scheme": "bearer"
}
},
"schemas": {
"Capabilities": {
"type": "object",
"required": [
"core"
],
"properties": {
"core": {
"type": "object",
"required": [
"pollinterval",
"webdav-root",
"reference-api",
"reference-regex",
"mod-rewrite-working"
],
"properties": {
"pollinterval": {
"type": "integer",
"format": "int64"
},
"webdav-root": {
"type": "string"
},
"reference-api": {
"type": "boolean"
},
"reference-regex": {
"type": "string"
},
"mod-rewrite-working": {
"type": "boolean"
}
}
}
}
},
"OCSMeta": {
"type": "object",
"required": [
"status",
"statuscode"
],
"properties": {
"status": {
"type": "string"
},
"statuscode": {
"type": "integer"
},
"message": {
"type": "string"
},
"totalitems": {
"type": "string"
},
"itemsperpage": {
"type": "string"
}
}
},
"PublicCapabilities": {
"type": "object",
"required": [
"bruteforce"
],
"properties": {
"bruteforce": {
"type": "object",
"required": [
"delay",
"allow-listed"
],
"properties": {
"delay": {
"type": "integer",
"format": "int64"
},
"allow-listed": {
"type": "boolean"
}
}
}
}
}
}
},
"paths": {
"/ocs/v2.php/twofactor/state": {
"get": {
"operationId": "two_factor_api-state",
"summary": "Get two factor authentication provider states",
"description": "This endpoint requires admin access",
"tags": [
"two_factor_api"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "user",
"in": "query",
"description": "system user id",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "provider states",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"404": {
"description": "user not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"nullable": true
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/twofactor/enable": {
"post": {
"operationId": "two_factor_api-enable",
"summary": "Enable two factor authentication providers for specific user",
"description": "This endpoint requires admin access",
"tags": [
"two_factor_api"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"user"
],
"properties": {
"user": {
"type": "string",
"description": "system user identifier"
},
"providers": {
"type": "array",
"default": [],
"description": "collection of TFA provider ids",
"items": {
"type": "string"
}
}
}
}
}
}
},
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "provider states",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"404": {
"description": "user not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"nullable": true
}
}
}
}
}
}
}
}
}
}
},
"/ocs/v2.php/twofactor/disable": {
"post": {
"operationId": "two_factor_api-disable",
"summary": "Disable two factor authentication providers for specific user",
"description": "This endpoint requires admin access",
"tags": [
"two_factor_api"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"user"
],
"properties": {
"user": {
"type": "string",
"description": "system user identifier"
},
"providers": {
"type": "array",
"default": [],
"description": "collection of TFA provider ids",
"items": {
"type": "string"
}
}
}
}
}
}
},
"parameters": [
{
"name": "OCS-APIRequest",
"in": "header",
"description": "Required to be true for the API request to pass",
"required": true,
"schema": {
"type": "boolean",
"default": true
}
}
],
"responses": {
"200": {
"description": "provider states",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
}
}
}
}
}
},
"404": {
"description": "user not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ocs"
],
"properties": {
"ocs": {
"type": "object",
"required": [
"meta",
"data"
],
"properties": {
"meta": {
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"nullable": true
}
}
}
}
}
}
}
}
}
}
}
},
"tags": [
{
"name": "avatar",
"description": "Class AvatarController"
},
{
"name": "guest_avatar",
"description": "This controller handles guest avatar requests."
},
{
"name": "ocm",
"description": "Controller about the endpoint /ocm-provider/"
}
]
}

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
SPDX-License-Identifier: AGPL-3.0-or-later

View file

@ -8488,6 +8488,47 @@
}
}
},
"/index.php/core/mimeicon": {
"get": {
"operationId": "preview-get-mime-icon-url",
"summary": "Get a preview by mime",
"tags": [
"preview"
],
"security": [
{},
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "mime",
"in": "query",
"description": "Mime type",
"schema": {
"type": "string",
"default": "application/octet-stream"
}
}
],
"responses": {
"303": {
"description": "The mime icon url",
"headers": {
"Location": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/index.php/core/references/preview/{referenceId}": {
"get": {
"operationId": "reference-preview",

View file

@ -8488,6 +8488,47 @@
}
}
},
"/index.php/core/mimeicon": {
"get": {
"operationId": "preview-get-mime-icon-url",
"summary": "Get a preview by mime",
"tags": [
"preview"
],
"security": [
{},
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "mime",
"in": "query",
"description": "Mime type",
"schema": {
"type": "string",
"default": "application/octet-stream"
}
}
],
"responses": {
"303": {
"description": "The mime icon url",
"headers": {
"Location": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/index.php/core/references/preview/{referenceId}": {
"get": {
"operationId": "reference-preview",

2
dist/2441-2441.js vendored Normal file
View file

@ -0,0 +1,2 @@
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[2441],{82441:(e,c,l)=>{l.d(c,{FilePickerVue:()=>n});const n=(0,l(85471).$V)((()=>Promise.all([l.e(4208),l.e(7874)]).then(l.bind(l,50404))))}}]);
//# sourceMappingURL=2441-2441.js.map?v=fc741cf57e9647f370a3

View file

@ -6,7 +6,7 @@ SPDX-FileCopyrightText: @nextcloud/dialogs developers
This file is generated from multiple sources. Included packages:
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- vue
- version: 2.7.16

1
dist/2441-2441.js.map vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"2441-2441.js?v=fc741cf57e9647f370a3","mappings":"oIACA,MAAMA,GAAgB,E,SAAA,KAAqB,IAAM,0D","sources":["webpack:///nextcloud/node_modules/@nextcloud/dialogs/dist/chunks/index-Ly0obkwS.mjs"],"sourcesContent":["import { defineAsyncComponent } from \"vue\";\nconst FilePickerVue = defineAsyncComponent(() => import(\"./FilePicker-CSmrMOEO.mjs\"));\nexport {\n FilePickerVue\n};\n"],"names":["FilePickerVue"],"sourceRoot":""}

1
dist/2441-2441.js.map.license vendored Symbolic link
View file

@ -0,0 +1 @@
2441-2441.js.license

View file

@ -75,7 +75,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

View file

@ -75,7 +75,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

View file

@ -96,7 +96,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

View file

@ -71,7 +71,7 @@ This file is generated from multiple sources. Included packages:
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

2
dist/5706-5706.js vendored
View file

@ -1,2 +0,0 @@
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[5706],{75706:(e,c,l)=>{l.d(c,{FilePickerVue:()=>n});const n=(0,l(85471).$V)((()=>Promise.all([l.e(4208),l.e(6127)]).then(l.bind(l,31709))))}}]);
//# sourceMappingURL=5706-5706.js.map?v=3153330af47fc26a725a

View file

@ -1 +0,0 @@
{"version":3,"file":"5706-5706.js?v=3153330af47fc26a725a","mappings":"oIACA,MAAMA,GAAgB,E,SAAA,KAAqB,IAAM,0D","sources":["webpack:///nextcloud/node_modules/@nextcloud/dialogs/dist/chunks/index-D5FJasts.mjs"],"sourcesContent":["import { defineAsyncComponent } from \"vue\";\nconst FilePickerVue = defineAsyncComponent(() => import(\"./FilePicker-CvXU3iSt.mjs\"));\nexport {\n FilePickerVue\n};\n"],"names":["FilePickerVue"],"sourceRoot":""}

View file

@ -1 +0,0 @@
5706-5706.js.license

View file

@ -52,7 +52,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

2
dist/6127-6127.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
6127-6127.js.license

View file

@ -54,7 +54,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

View file

@ -52,7 +52,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

View file

@ -75,7 +75,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

2
dist/7874-7874.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -117,7 +117,7 @@ This file is generated from multiple sources. Included packages:
- version: 5.0.1
- license: MIT
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

1
dist/7874-7874.js.map vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/7874-7874.js.map.license vendored Symbolic link
View file

@ -0,0 +1 @@
7874-7874.js.license

View file

@ -75,7 +75,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

View file

@ -46,7 +46,7 @@ This file is generated from multiple sources. Included packages:
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

View file

@ -56,7 +56,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

View file

@ -75,7 +75,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/core-common.js vendored

File diff suppressed because one or more lines are too long

View file

@ -139,7 +139,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -47,7 +47,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

4
dist/core-login.js vendored

File diff suppressed because one or more lines are too long

View file

@ -59,7 +59,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

4
dist/core-main.js vendored

File diff suppressed because one or more lines are too long

View file

@ -72,7 +72,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -46,7 +46,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -90,7 +90,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -39,7 +39,7 @@ This file is generated from multiple sources. Included packages:
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -39,7 +39,7 @@ This file is generated from multiple sources. Included packages:
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -32,7 +32,7 @@ This file is generated from multiple sources. Included packages:
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

4
dist/files-init.js vendored

File diff suppressed because one or more lines are too long

View file

@ -61,7 +61,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

View file

@ -75,7 +75,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -82,7 +82,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
(()=>{"use strict";var e,r,t,i={97986:(e,r,t)=>{var i=t(61338),o=t(85168),n=t(63814),a=t(53334);const l=(0,t(35947).YK)().setApp("files").detectUser().build();document.addEventListener("DOMContentLoaded",(function(){const e=window.OCA;e.UnifiedSearch&&(l.info("Initializing unified search plugin: folder search from files app"),e.UnifiedSearch.registerFilterAction({id:"files",appId:"files",label:(0,a.Tl)("files","In folder"),icon:(0,n.d0)("files","app.svg"),callback:()=>{(0,o.a1)("Pick plain text files").addMimeTypeFilter("httpd/unix-directory").allowDirectories(!0).addButton({label:"Pick",callback:e=>{l.info("Folder picked",{folder:e[0]});const r=e[0];(0,i.Ic)("nextcloud:unified-search:add-filter",{id:"files",payload:r,filterUpdateText:(0,a.Tl)("files","Search in folder: {folder}",{folder:r.basename}),filterParams:{path:r.path}})}}).build().pick()}}))}))}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(t.exports,t,t.exports,n),t.loaded=!0,t.exports}n.m=i,e=[],n.O=(r,t,i,o)=>{if(!t){var a=1/0;for(s=0;s<e.length;s++){t=e[s][0],i=e[s][1],o=e[s][2];for(var l=!0,d=0;d<t.length;d++)(!1&o||a>=o)&&Object.keys(n.O).every((e=>n.O[e](t[d])))?t.splice(d--,1):(l=!1,o<a&&(a=o));if(l){e.splice(s--,1);var c=i();void 0!==c&&(r=c)}}return r}o=o||0;for(var s=e.length;s>0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[t,i,o]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((r,t)=>(n.f[t](e,r),r)),[])),n.u=e=>e+"-"+e+".js?v="+{5706:"3153330af47fc26a725a",5862:"7b9b02dc0a1b898066ef",6127:"b2ef6aaf7b65ad34ffa6"}[e],n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="nextcloud:",n.l=(e,i,o,a)=>{if(r[e])r[e].push(i);else{var l,d;if(void 0!==o)for(var c=document.getElementsByTagName("script"),s=0;s<c.length;s++){var f=c[s];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==t+o){l=f;break}}l||(d=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,n.nc&&l.setAttribute("nonce",n.nc),l.setAttribute("data-webpack",t+o),l.src=e),r[e]=[i];var u=(t,i)=>{l.onerror=l.onload=null,clearTimeout(p);var o=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(i))),t)return t(i)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=u.bind(null,l.onerror),l.onload=u.bind(null,l.onload),d&&document.head.appendChild(l)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=2277,(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var r=n.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var i=t.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=t[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{n.b=document.baseURI||self.location.href;var e={2277:0};n.f.j=(r,t)=>{var i=n.o(e,r)?e[r]:void 0;if(0!==i)if(i)t.push(i[2]);else{var o=new Promise(((t,o)=>i=e[r]=[t,o]));t.push(i[2]=o);var a=n.p+n.u(r),l=new Error;n.l(a,(t=>{if(n.o(e,r)&&(0!==(i=e[r])&&(e[r]=void 0),i)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",l.name="ChunkLoadError",l.type=o,l.request=a,i[1](l)}}),"chunk-"+r,r)}},n.O.j=r=>0===e[r];var r=(r,t)=>{var i,o,a=t[0],l=t[1],d=t[2],c=0;if(a.some((r=>0!==e[r]))){for(i in l)n.o(l,i)&&(n.m[i]=l[i]);if(d)var s=d(n)}for(r&&r(t);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(s)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),n.nc=void 0;var a=n.O(void 0,[4208],(()=>n(97986)));a=n.O(a)})();
//# sourceMappingURL=files-search.js.map?v=4e654abf9273ff318287
(()=>{"use strict";var e,r,t,i={97986:(e,r,t)=>{var i=t(61338),o=t(85168),n=t(63814),a=t(53334);const l=(0,t(35947).YK)().setApp("files").detectUser().build();document.addEventListener("DOMContentLoaded",(function(){const e=window.OCA;e.UnifiedSearch&&(l.info("Initializing unified search plugin: folder search from files app"),e.UnifiedSearch.registerFilterAction({id:"files",appId:"files",label:(0,a.Tl)("files","In folder"),icon:(0,n.d0)("files","app.svg"),callback:()=>{(0,o.a1)("Pick plain text files").addMimeTypeFilter("httpd/unix-directory").allowDirectories(!0).addButton({label:"Pick",callback:e=>{l.info("Folder picked",{folder:e[0]});const r=e[0];(0,i.Ic)("nextcloud:unified-search:add-filter",{id:"files",payload:r,filterUpdateText:(0,a.Tl)("files","Search in folder: {folder}",{folder:r.basename}),filterParams:{path:r.path}})}}).build().pick()}}))}))}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(t.exports,t,t.exports,n),t.loaded=!0,t.exports}n.m=i,e=[],n.O=(r,t,i,o)=>{if(!t){var a=1/0;for(s=0;s<e.length;s++){t=e[s][0],i=e[s][1],o=e[s][2];for(var l=!0,d=0;d<t.length;d++)(!1&o||a>=o)&&Object.keys(n.O).every((e=>n.O[e](t[d])))?t.splice(d--,1):(l=!1,o<a&&(a=o));if(l){e.splice(s--,1);var c=i();void 0!==c&&(r=c)}}return r}o=o||0;for(var s=e.length;s>0&&e[s-1][2]>o;s--)e[s]=e[s-1];e[s]=[t,i,o]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((r,t)=>(n.f[t](e,r),r)),[])),n.u=e=>e+"-"+e+".js?v="+{2441:"fc741cf57e9647f370a3",5862:"7b9b02dc0a1b898066ef",7874:"5d0f14697282cbdd7841"}[e],n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="nextcloud:",n.l=(e,i,o,a)=>{if(r[e])r[e].push(i);else{var l,d;if(void 0!==o)for(var c=document.getElementsByTagName("script"),s=0;s<c.length;s++){var f=c[s];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==t+o){l=f;break}}l||(d=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,n.nc&&l.setAttribute("nonce",n.nc),l.setAttribute("data-webpack",t+o),l.src=e),r[e]=[i];var u=(t,i)=>{l.onerror=l.onload=null,clearTimeout(p);var o=r[e];if(delete r[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(i))),t)return t(i)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=u.bind(null,l.onerror),l.onload=u.bind(null,l.onload),d&&document.head.appendChild(l)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=2277,(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var r=n.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var i=t.length-1;i>-1&&(!e||!/^http(s?):/.test(e));)e=t[i--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{n.b=document.baseURI||self.location.href;var e={2277:0};n.f.j=(r,t)=>{var i=n.o(e,r)?e[r]:void 0;if(0!==i)if(i)t.push(i[2]);else{var o=new Promise(((t,o)=>i=e[r]=[t,o]));t.push(i[2]=o);var a=n.p+n.u(r),l=new Error;n.l(a,(t=>{if(n.o(e,r)&&(0!==(i=e[r])&&(e[r]=void 0),i)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",l.name="ChunkLoadError",l.type=o,l.request=a,i[1](l)}}),"chunk-"+r,r)}},n.O.j=r=>0===e[r];var r=(r,t)=>{var i,o,a=t[0],l=t[1],d=t[2],c=0;if(a.some((r=>0!==e[r]))){for(i in l)n.o(l,i)&&(n.m[i]=l[i]);if(d)var s=d(n)}for(r&&r(t);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(s)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),n.nc=void 0;var a=n.O(void 0,[4208],(()=>n(97986)));a=n.O(a)})();
//# sourceMappingURL=files-search.js.map?v=cd85dc7237e0d2c6b90b

View file

@ -31,7 +31,7 @@ This file is generated from multiple sources. Included packages:
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -58,7 +58,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -94,7 +94,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -45,7 +45,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -40,7 +40,7 @@ This file is generated from multiple sources. Included packages:
- version: 0.4.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -45,7 +45,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.2.0
- license: GPL-3.0-or-later
- @nextcloud/dialogs
- version: 6.0.1
- version: 6.1.1
- license: AGPL-3.0-or-later
- semver
- version: 7.6.3

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more