From 4d2556d4cf014edfc5c609dfff5c52e963979b93 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 28 Aug 2024 13:15:56 +0200 Subject: refactor(IMenuAction): Make public menu actions use the new Vue UI This removes custom rendering code an replaces it with the declarative menu actions. Also adjust the template to allow the Vue UI to mount. Custom entries still are possible. Signed-off-by: Ferdinand Thiessen --- apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'apps/files_sharing/lib') diff --git a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php index 56f7a7fb434..8792c385a18 100644 --- a/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php +++ b/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php @@ -240,10 +240,8 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider if ($isNoneFileDropFolder && !$share->getHideDownload()) { Util::addScript('files_sharing', 'public_note'); - $downloadWhite = new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download-white', $shareTmpl['downloadURL'], 0); - $downloadAllWhite = new SimpleMenuAction('download', $this->l10n->t('Download all files'), 'icon-download-white', $shareTmpl['downloadURL'], 0); - $download = new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']); - $downloadAll = new SimpleMenuAction('download', $this->l10n->t('Download all files'), 'icon-download', $shareTmpl['downloadURL'], 10, $shareTmpl['fileSize']); + $download = new SimpleMenuAction('download', $this->l10n->t('Download'), 'icon-download', $shareTmpl['downloadURL'], 0, $shareTmpl['fileSize']); + $downloadAll = new SimpleMenuAction('download', $this->l10n->t('Download all files'), 'icon-download', $shareTmpl['downloadURL'], 0, $shareTmpl['fileSize']); $directLink = new LinkMenuAction($this->l10n->t('Direct link'), 'icon-public', $shareTmpl['previewURL']); // TRANSLATORS The placeholder refers to the software product name as in 'Add to your Nextcloud' $externalShare = new ExternalShareMenuAction($this->l10n->t('Add to your %s', [$this->defaults->getProductName()]), 'icon-external', $shareTmpl['owner'], $shareTmpl['shareOwner'], $shareTmpl['filename']); @@ -251,10 +249,8 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider $responseComposer = []; if ($shareIsFolder) { - $responseComposer[] = $downloadAllWhite; $responseComposer[] = $downloadAll; } else { - $responseComposer[] = $downloadWhite; $responseComposer[] = $download; } $responseComposer[] = $directLink; -- cgit v1.2.3