diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-08-28 13:15:56 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-09-03 16:07:49 +0200 |
commit | 4d2556d4cf014edfc5c609dfff5c52e963979b93 (patch) | |
tree | 7a4f3e16a6bacdd863ba40f76a8884206064a0e9 /apps/files_sharing/lib | |
parent | 7b6c78c81d4bd5e280f370b95ca2746cd8693882 (diff) | |
download | nextcloud-server-4d2556d4cf014edfc5c609dfff5c52e963979b93.tar.gz nextcloud-server-4d2556d4cf014edfc5c609dfff5c52e963979b93.zip |
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 <opensource@fthiessen.de>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php | 8 |
1 files changed, 2 insertions, 6 deletions
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; |