diff --git a/apps/files_sharing/lib/Config/ConfigLexicon.php b/apps/files_sharing/lib/Config/ConfigLexicon.php index c0f57a932bba3..efa3817a46943 100644 --- a/apps/files_sharing/lib/Config/ConfigLexicon.php +++ b/apps/files_sharing/lib/Config/ConfigLexicon.php @@ -26,6 +26,7 @@ class ConfigLexicon implements ILexicon { public const EXCLUDE_RESHARE_FROM_EDIT = 'shareapi_exclude_reshare_from_edit'; public const UPDATE_CUTOFF_TIME = 'update_cutoff_time'; public const USER_NEEDS_SHARE_REFRESH = 'user_needs_share_refresh'; + public const SHARING_DIALOG_ENABLED = 'sharing_dialog_enabled'; #[\Override] public function getStrictness(): Strictness { @@ -40,6 +41,10 @@ public function getAppConfigs(): array { new Entry(self::EXCLUDE_RESHARE_FROM_EDIT, ValueType::BOOL, false, 'Exclude reshare permission from "Allow editing" bundled permissions'), new Entry(self::UPDATE_CUTOFF_TIME, ValueType::FLOAT, 3.0, 'Maximum time in second during which we update the share data immediately before switching to only marking the user'), + + // Hidden killswitch: enables the new unified sharing dialog UI in the sidebar. + // Set to false to temporarily restore the legacy sharing inputs and menus. + new Entry(self::SHARING_DIALOG_ENABLED, ValueType::BOOL, true, 'Use the new unified sharing dialog in the files sidebar instead of the legacy inline UI', true), ]; } diff --git a/apps/files_sharing/lib/Listener/LoadSidebarListener.php b/apps/files_sharing/lib/Listener/LoadSidebarListener.php index e6a30a5688173..b6b0e25cef9b1 100644 --- a/apps/files_sharing/lib/Listener/LoadSidebarListener.php +++ b/apps/files_sharing/lib/Listener/LoadSidebarListener.php @@ -47,8 +47,11 @@ public function handle(Event $event): void { $showExternalSharing = $appConfig->getValueBool('files_sharing', 'outgoing_server2server_share_enabled', true) || $appConfig->getValueBool('core', 'shareapi_allow_links', true); + $sharingDialogEnabled = $appConfig->getValueBool('files_sharing', ConfigLexicon::SHARING_DIALOG_ENABLED, true); + $this->initialState->provideInitialState('showFederatedSharesAsInternal', $showFederatedAsInternal); $this->initialState->provideInitialState('showFederatedSharesToTrustedServersAsInternal', $showFederatedToTrustedAsInternal); $this->initialState->provideInitialState('showExternalSharing', $showExternalSharing); + $this->initialState->provideInitialState('sharingDialogEnabled', $sharingDialogEnabled); } } diff --git a/apps/files_sharing/src/components/SharingEntry.vue b/apps/files_sharing/src/components/SharingEntry.vue index 24b7b3f9da6e5..58572fa653bea 100644 --- a/apps/files_sharing/src/components/SharingEntry.vue +++ b/apps/files_sharing/src/components/SharingEntry.vue @@ -28,13 +28,14 @@ + +