From 6e6c66047d608c0fcfd7bab4db57802a199340fc Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 3 Apr 2026 21:12:35 +0200 Subject: [PATCH] refactor(files): modernize transfer ownership settings - related to https://github.com/nextcloud/server/issues/57008 Modernize the personal files settings for ownership transfer. - Use the new `NcForm*` components. - Use `NcSettingsSection` as root component - Migrate to Typescript - Migrate to script-setup Signed-off-by: Ferdinand Thiessen --- .../files/src/components/PersonalSettings.vue | 24 +- .../components/TransferOwnershipDialogue.vue | 392 ++++++++---------- apps/files_sharing/lib/Capabilities.php | 2 + apps/files_sharing/openapi.json | 5 + build/eslint-baseline-legacy.json | 5 - openapi.json | 5 + 6 files changed, 202 insertions(+), 231 deletions(-) diff --git a/apps/files/src/components/PersonalSettings.vue b/apps/files/src/components/PersonalSettings.vue index b076b0c1e3d..0a504368635 100644 --- a/apps/files/src/components/PersonalSettings.vue +++ b/apps/files/src/components/PersonalSettings.vue @@ -3,20 +3,14 @@ - SPDX-License-Identifier: AGPL-3.0-or-later --> - - - + + diff --git a/apps/files/src/components/TransferOwnershipDialogue.vue b/apps/files/src/components/TransferOwnershipDialogue.vue index a49884f4105..c8aa55224db 100644 --- a/apps/files/src/components/TransferOwnershipDialogue.vue +++ b/apps/files/src/components/TransferOwnershipDialogue.vue @@ -3,245 +3,215 @@ - SPDX-License-Identifier: AGPL-3.0-or-later --> - + - diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php index 7b911cb74dd..ca298204307 100644 --- a/apps/files_sharing/lib/Capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php @@ -90,6 +90,7 @@ class Capabilities implements ICapability { * }, * }, * sharee: array{ + * minSearchStringLength: int, * query_lookup_default: bool, * always_show_unique: bool, * }, @@ -185,6 +186,7 @@ class Capabilities implements ICapability { // Sharee searches $res['sharee'] = [ + 'minSearchStringLength' => $this->config->getSystemValueInt('sharing.minSearchStringLength', 0), 'query_lookup_default' => $this->config->getSystemValueBool('gs.enabled', false), 'always_show_unique' => $this->config->getAppValue('files_sharing', 'always_show_unique', 'yes') === 'yes', ]; diff --git a/apps/files_sharing/openapi.json b/apps/files_sharing/openapi.json index 8a9a919f676..ba15f60870e 100644 --- a/apps/files_sharing/openapi.json +++ b/apps/files_sharing/openapi.json @@ -234,10 +234,15 @@ "sharee": { "type": "object", "required": [ + "minSearchStringLength", "query_lookup_default", "always_show_unique" ], "properties": { + "minSearchStringLength": { + "type": "integer", + "format": "int64" + }, "query_lookup_default": { "type": "boolean" }, diff --git a/build/eslint-baseline-legacy.json b/build/eslint-baseline-legacy.json index 5fa65fac19f..c70ba64a09d 100644 --- a/build/eslint-baseline-legacy.json +++ b/build/eslint-baseline-legacy.json @@ -4,11 +4,6 @@ "count": 1 } }, - "apps/files/src/components/TransferOwnershipDialogue.vue": { - "@nextcloud/no-deprecated-library-props": { - "count": 1 - } - }, "apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue": { "vue/no-mutating-props": { "count": 2 diff --git a/openapi.json b/openapi.json index 364b31bc753..5c713538a32 100644 --- a/openapi.json +++ b/openapi.json @@ -2389,10 +2389,15 @@ "sharee": { "type": "object", "required": [ + "minSearchStringLength", "query_lookup_default", "always_show_unique" ], "properties": { + "minSearchStringLength": { + "type": "integer", + "format": "int64" + }, "query_lookup_default": { "type": "boolean" },