aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sharebymail/lib
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-05-17 18:33:38 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-05-19 15:45:44 +0200
commitda49e3f3e07158e3aec22efec26ff758c0f04598 (patch)
treef35da39cf5c42eba34416180f2863a27bda0ed78 /apps/sharebymail/lib
parent18dd460720b762ff644f3292724c7aad2c9e551d (diff)
downloadnextcloud-server-da49e3f3e07158e3aec22efec26ff758c0f04598.tar.gz
nextcloud-server-da49e3f3e07158e3aec22efec26ff758c0f04598.zip
Port share by mail settings to vue
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/sharebymail/lib')
-rw-r--r--apps/sharebymail/lib/Settings/Admin.php21
1 files changed, 9 insertions, 12 deletions
diff --git a/apps/sharebymail/lib/Settings/Admin.php b/apps/sharebymail/lib/Settings/Admin.php
index f1733b73bc0..5f690f16f2b 100644
--- a/apps/sharebymail/lib/Settings/Admin.php
+++ b/apps/sharebymail/lib/Settings/Admin.php
@@ -24,32 +24,29 @@
namespace OCA\ShareByMail\Settings;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\AppFramework\Services\IInitialState;
use OCP\IL10N;
use OCP\Settings\IDelegatedSettings;
class Admin implements IDelegatedSettings {
+ private SettingsManager $settingsManager;
+ private IL10N $l;
+ private IInitialState $initialState;
- /** @var SettingsManager */
- private $settingsManager;
-
- /** @var IL10N */
- private $l;
-
- public function __construct(SettingsManager $settingsManager, IL10N $l) {
+ public function __construct(SettingsManager $settingsManager, IL10N $l, IInitialState $initialState) {
$this->settingsManager = $settingsManager;
$this->l = $l;
+ $this->initialState = $initialState;
}
/**
* @return TemplateResponse
*/
public function getForm() {
- $parameters = [
- 'sendPasswordMail' => $this->settingsManager->sendPasswordByMail(),
- 'replyToInitiator' => $this->settingsManager->replyToInitiator()
- ];
+ $this->initialState->provideInitialState('sendPasswordMail', $this->settingsManager->sendPasswordByMail());
+ $this->initialState->provideInitialState('replyToInitiator', $this->settingsManager->replyToInitiator());
- return new TemplateResponse('sharebymail', 'settings-admin', $parameters, '');
+ return new TemplateResponse('sharebymail', 'settings-admin', [], '');
}
/**