diff --git a/apps/settings/lib/Controller/ChangePasswordController.php b/apps/settings/lib/Controller/ChangePasswordController.php
index 41f2584721c..a25f0b0e59b 100644
--- a/apps/settings/lib/Controller/ChangePasswordController.php
+++ b/apps/settings/lib/Controller/ChangePasswordController.php
@@ -49,28 +49,16 @@ use OCP\IUserManager;
use OCP\IUserSession;
class ChangePasswordController extends Controller {
-
- /** @var string */
- private $userId;
-
- /** @var IUserManager */
- private $userManager;
-
- /** @var IL10N */
- private $l;
-
- /** @var GroupManager */
- private $groupManager;
-
- /** @var Session */
- private $userSession;
-
- /** @var IAppManager */
- private $appManager;
+ private ?string $userId;
+ private IUserManager $userManager;
+ private IL10N $l;
+ private GroupManager $groupManager;
+ private Session $userSession;
+ private IAppManager $appManager;
public function __construct(string $appName,
IRequest $request,
- string $userId,
+ ?string $userId,
IUserManager $userManager,
IUserSession $userSession,
IGroupManager $groupManager,
diff --git a/apps/settings/src/components/PasswordSection.vue b/apps/settings/src/components/PasswordSection.vue
new file mode 100644
index 00000000000..b68de0365e0
--- /dev/null
+++ b/apps/settings/src/components/PasswordSection.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/settings/src/main-personal-password.js b/apps/settings/src/main-personal-password.js
new file mode 100644
index 00000000000..cd27832a7df
--- /dev/null
+++ b/apps/settings/src/main-personal-password.js
@@ -0,0 +1,36 @@
+/**
+ * @copyright 2022 Carl Schwan
+ *
+ * @license AGPL-3.0-or-later
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+import Vue from 'vue'
+
+import PasswordSection from './components/PasswordSection.vue'
+import { translate as t, translatePlural as n } from '@nextcloud/l10n'
+
+// eslint-disable-next-line camelcase
+__webpack_nonce__ = btoa(OC.requestToken)
+
+Vue.prototype.t = t
+Vue.prototype.n = n
+
+export default new Vue({
+ el: '#security-password',
+ name: 'main-personal-password',
+ render: h => h(PasswordSection),
+})
diff --git a/apps/settings/templates/settings/personal/security/password.php b/apps/settings/templates/settings/personal/security/password.php
index f44d95c0997..bc363b15aa7 100644
--- a/apps/settings/templates/settings/personal/security/password.php
+++ b/apps/settings/templates/settings/personal/security/password.php
@@ -1,6 +1,7 @@
+ * @copyright Copyright (c) 2022 Carl Schwan
*
* @author Arthur Schiwon
*
@@ -21,46 +22,8 @@
*
*/
-script('settings', [
- 'settings',
- 'templates',
- 'vue-settings-personal-security',
-]);
-
if ($_['passwordChangeSupported']) {
- script('settings', 'security_password');
+ \OCP\Util::addScript('settings', 'vue-settings-personal-password');
}
-
?>
-
-