From 3b43c52314c3aa888320befe351db0d8d391c417 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 19 Mar 2026 11:45:04 -0400 Subject: [PATCH 01/11] refactor(settings): improve frame template readability/separation Signed-off-by: Josh --- apps/settings/templates/settings/frame.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/apps/settings/templates/settings/frame.php b/apps/settings/templates/settings/frame.php index 4ad142f3c5872..678aa1839f97c 100644 --- a/apps/settings/templates/settings/frame.php +++ b/apps/settings/templates/settings/frame.php @@ -1,13 +1,26 @@
-
data-active-section-id="" data-active-section-type="" > +
>
From 7d67a50b8f8620a94873f75e5dd93df069201723 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 19 Mar 2026 11:53:00 -0400 Subject: [PATCH 02/11] refactor(settings): simplify forms loop in additional template Signed-off-by: Josh --- apps/settings/templates/settings/additional.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/apps/settings/templates/settings/additional.php b/apps/settings/templates/settings/additional.php index 9e0b61ef65aad..ef4e9f69ee28d 100644 --- a/apps/settings/templates/settings/additional.php +++ b/apps/settings/templates/settings/additional.php @@ -9,8 +9,14 @@ ?> - -
- + + +
+ From 1f4937fb222cdfd52963b5e7b3a30c06cb36c5c9 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 19 Mar 2026 11:57:28 -0400 Subject: [PATCH 03/11] refactor(settings): improve readability of admin overview template Signed-off-by: Josh --- apps/settings/templates/settings/admin/overview.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/settings/templates/settings/admin/overview.php b/apps/settings/templates/settings/admin/overview.php index 342a7421ada00..0eaabfa16bc33 100644 --- a/apps/settings/templates/settings/admin/overview.php +++ b/apps/settings/templates/settings/admin/overview.php @@ -8,12 +8,21 @@ /** @var array $_ */ /** @var \OCP\Defaults $theme */ +$baseUrl = $theme->getBaseUrl(); +$versionLabel = $_['version'] ?? ''; ?>
-

t('Version'));?>

-

Nextcloud Hub 26 Winter ()

+

t('Version')); ?>

+

+ + + Nextcloud Hub 26 Winter + + () + +

From 42ca91cc73043fa9cadce43bfed7e4c1bb5e166c Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 19 Mar 2026 12:04:10 -0400 Subject: [PATCH 04/11] refactor(settings): simplify two-factor personal security template Signed-off-by: Josh --- .../settings/personal/security/twofactor.php | 60 +++++++++++-------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/apps/settings/templates/settings/personal/security/twofactor.php b/apps/settings/templates/settings/personal/security/twofactor.php index 986c28a95e615..0faa9b6d68cfa 100644 --- a/apps/settings/templates/settings/personal/security/twofactor.php +++ b/apps/settings/templates/settings/personal/security/twofactor.php @@ -5,38 +5,46 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +$providerData = $_['twoFactorProviderData'] ?? []; +$providers = $providerData['providers'] ?? []; ?>
-

t('Two-Factor Authentication'));?>

- -

t('Use a second factor besides your password to increase security for your account.'));?>

-

t('If you use third party applications to connect to Nextcloud, please make sure to create and configure an app password for each before enabling second factor authentication.'));?>

+

t('Two-Factor Authentication')); ?>

+ + +

+ t('Use a second factor besides your password to increase security for your account.')); ?> +

+

+ t('If you use third party applications to connect to Nextcloud, please make sure to create and configure an app password for each before enabling second factor authentication.')); ?> +

+
    - -
  • + getDarkIcon(); - //fallback icon if the 2factor provider doesn't provide an icon. - } else { - $icon = image_path('core', 'actions/password.svg'); - } - /** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */ - $settings = $data['settings']; - ?> -

    - - getDisplayName()) ?> -

    - getBody()->fetchPage()) ?> -
  • - + + // Handle 2FA provider icons and theme. + $icon = $provider instanceof \OCP\Authentication\TwoFactorAuth\IProvidesIcons + ? $provider->getDarkIcon() + : image_path('core', 'actions/password.svg'); // Fallback icon if 2FA provider doesn't provide one. + + /** @var \OCP\Authentication\TwoFactorAuth\IPersonalProviderSettings $settings */ + $settings = $data['settings']; + ?> +
  • +

    + + getDisplayName()); ?> +

    + getBody()->fetchPage()); ?> +
  • +
From ff3b72fb38dbf0913b5e3e788566274dd95987a6 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 19 Mar 2026 12:21:27 -0400 Subject: [PATCH 05/11] refactor(settings): replace social placeholder template with data-driven loop Signed-off-by: Josh --- .../settings/personal/development.notice.php | 122 +++++++++--------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/apps/settings/templates/settings/personal/development.notice.php b/apps/settings/templates/settings/personal/development.notice.php index c581962a79508..d3f2bf73f810d 100644 --- a/apps/settings/templates/settings/personal/development.notice.php +++ b/apps/settings/templates/settings/personal/development.notice.php @@ -3,76 +3,76 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + +$reasonsPdfLink = $_['reasons-use-nextcloud-pdf-link'] ?? ''; + +$aboutPlaceholders = [ + '{communityopen}', + '{githubopen}', + '{licenseopen}', + '{linkclose}', +]; +$aboutReplacements = [ + '', + '', + '', + '', +]; +$aboutText = $l->t( + 'Developed by the {communityopen}Nextcloud community{linkclose}, the {githubopen}source code{linkclose} is licensed under the {licenseopen}AGPL{linkclose}.' +); + +$socialLinks = [ + [ + 'href' => 'https://www.facebook.com/Nextclouders/', + 'icon' => image_path('core', 'facebook-light.svg'), + 'label' => $l->t('Like our Facebook page'), + ], + [ + 'href' => 'https://bsky.app/profile/nextcloud.bsky.social', + 'icon' => image_path('core', 'bluesky-light.svg'), + 'label' => $l->t('Follow us on Bluesky'), + ], + [ + 'href' => 'https://mastodon.xyz/@nextcloud', + 'icon' => image_path('core', 'mastodon-light.svg'), + 'label' => $l->t('Follow us on Mastodon'), + ], + [ + 'href' => 'https://nextcloud.com/blog/', + 'icon' => image_path('core', 'rss.svg'), + 'label' => $l->t('Check out our blog'), + ], + [ + 'href' => 'https://newsletter.nextcloud.com/?p=subscribe&id=1', + 'icon' => image_path('core', 'mail.svg'), + 'label' => $l->t('Subscribe to our newsletter'), + ], +]; ?> +

- + - t('Reasons to use Nextcloud in your organization'));?> + t('Reasons to use Nextcloud in your organization')); ?>

+

- ', - '', - '', - '', - ], - $l->t('Developed by the {communityopen}Nextcloud community{linkclose}, the {githubopen}source code{linkclose} is licensed under the {licenseopen}AGPL{linkclose}.') - )); ?> +

From 92d05b72e4d9d08b9960e9db8c92d8f758abf866 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 19 Mar 2026 12:38:08 -0400 Subject: [PATCH 06/11] refactor(settings): render personal info setting boxes from ordered config Signed-off-by: Josh --- .../settings/personal/personal.info.php | 111 ++++++++---------- 1 file changed, 51 insertions(+), 60 deletions(-) diff --git a/apps/settings/templates/settings/personal/personal.info.php b/apps/settings/templates/settings/personal/personal.info.php index 9dc789245be29..a647b7f4cf099 100644 --- a/apps/settings/templates/settings/personal/personal.info.php +++ b/apps/settings/templates/settings/personal/personal.info.php @@ -9,8 +9,39 @@ /** @var array $_ */ \OCP\Util::addScript('settings', 'vue-settings-personal-info'); + +$isFairUseOfFreePushService = (bool) ($_['isFairUseOfFreePushService'] ?? true); +$profileEnabledGlobally = (bool) ($_['profileEnabledGlobally'] ?? false); + +$settingSections = [ + ['id' => 'vue-displayname-section'], + ['id' => 'vue-pronouns-section'], + ['id' => 'vue-email-section'], + ['id' => 'vue-phone-section'], + ['id' => 'vue-location-section'], + ['id' => 'vue-birthday-section'], + ['id' => 'vue-language-section', 'boxClass' => 'personal-settings-setting-box personal-settings-language-box'], + ['id' => 'vue-locale-section', 'boxClass' => 'personal-settings-setting-box personal-settings-locale-box'], + ['id' => 'vue-fdow-section'], + ['id' => 'vue-timezone-section'], + ['id' => 'vue-website-section'], + ['id' => 'vue-twitter-section'], + ['id' => 'vue-bluesky-section'], + ['id' => 'vue-fediverse-section'], + ['id' => 'vue-organisation-section', 'profileOnly' => true], + ['id' => 'vue-role-section', 'profileOnly' => true], + ['id' => 'vue-headline-section', 'profileOnly' => true], + ['id' => 'vue-biography-section', 'profileOnly' => true], +]; + +$renderSettingBox = static function (string $sectionId, string $boxClass = 'personal-settings-setting-box'): void { ?> +
+
+
+ - + +
t('This community release of Nextcloud is unsupported and instant notifications are unavailable.')); ?> @@ -20,8 +51,10 @@

t('Personal info')); ?>

+
- + +
@@ -33,67 +66,25 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
- - + + + + +
- + +
From cd5b49f96e77b9a846b36c3941ea3c9963d653b4 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 19 Mar 2026 12:47:43 -0400 Subject: [PATCH 07/11] refactor(settings): render personal info sections from ordered config array Signed-off-by: Josh --- apps/settings/templates/help.php | 165 ++++++++++++++++++------------- 1 file changed, 98 insertions(+), 67 deletions(-) diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php index 17356e6ccdf8a..b8de77420d745 100644 --- a/apps/settings/templates/help.php +++ b/apps/settings/templates/help.php @@ -3,57 +3,101 @@ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + \OCP\Util::addStyle('settings', 'help'); + +$knowledgebaseEmbedded = ($_['knowledgebaseEmbedded'] ?? false) === true; +$mode = $_['mode'] ?? ''; +$isAdmin = (bool) ($_['admin'] ?? false); + +$url = $_['url'] ?? ''; +$urlUserDocs = $_['urlUserDocs'] ?? ''; +$urlAdminDocs = $_['urlAdminDocs'] ?? ''; +$legalNoticeUrl = $_['legalNoticeUrl'] ?? ''; +$privacyUrl = $_['privacyUrl'] ?? ''; + +$resources = [ + [ + 'label' => $l->t('Account documentation'), + 'standaloneLabel' => $l->t('Account documentation'), + 'href' => $urlUserDocs, + 'show' => true, + 'embeddedIcon' => 'icon-user', + 'embeddedMode' => 'user', + 'external' => false, + ], + [ + 'label' => $l->t('Administration documentation'), + 'standaloneLabel' => $l->t('Administration documentation'), + 'href' => $urlAdminDocs, + 'show' => $isAdmin, + 'embeddedIcon' => 'icon-user-admin', + 'embeddedMode' => 'admin', + 'external' => false, + ], + [ + 'label' => $l->t('Documentation'), + 'standaloneLabel' => $l->t('General documentation'), + 'href' => 'https://docs.nextcloud.com', + 'show' => true, + 'embeddedIcon' => 'icon-category-office', + 'external' => true, + ], + [ + 'label' => $l->t('Forum'), + 'standaloneLabel' => $l->t('Forum'), + 'href' => 'https://help.nextcloud.com', + 'show' => true, + 'embeddedIcon' => 'icon-comment', + 'external' => true, + ], + [ + 'label' => $l->t('Legal notice'), + 'standaloneLabel' => $l->t('Legal notice'), + 'href' => $legalNoticeUrl, + 'show' => !empty($legalNoticeUrl), + 'external' => true, + ], + [ + 'label' => $l->t('Privacy policy'), + 'standaloneLabel' => $l->t('Privacy policy'), + 'href' => $privacyUrl, + 'show' => !empty($privacyUrl), + 'external' => true, + ], +]; ?> - + +
- +
From f77c13aeeab232a49e749e0cc5a403fe8c4ac84c Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 19 Mar 2026 12:55:49 -0400 Subject: [PATCH 08/11] chore(settings): remove escape on social link - handled by p() now Signed-off-by: Josh --- .../settings/templates/settings/personal/development.notice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings/templates/settings/personal/development.notice.php b/apps/settings/templates/settings/personal/development.notice.php index d3f2bf73f810d..f2b6383112497 100644 --- a/apps/settings/templates/settings/personal/development.notice.php +++ b/apps/settings/templates/settings/personal/development.notice.php @@ -44,7 +44,7 @@ 'label' => $l->t('Check out our blog'), ], [ - 'href' => 'https://newsletter.nextcloud.com/?p=subscribe&id=1', + 'href' => 'https://newsletter.nextcloud.com/?p=subscribe&id=1', 'icon' => image_path('core', 'mail.svg'), 'label' => $l->t('Subscribe to our newsletter'), ], From d3f370cd8acb8ed5150eb15937317473350fe9b0 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 20 Mar 2026 10:10:16 -0400 Subject: [PATCH 09/11] chore(settings): fixup personal.info.php template Signed-off-by: Josh --- apps/settings/templates/settings/personal/personal.info.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/settings/templates/settings/personal/personal.info.php b/apps/settings/templates/settings/personal/personal.info.php index a647b7f4cf099..4b39d6ace1cbf 100644 --- a/apps/settings/templates/settings/personal/personal.info.php +++ b/apps/settings/templates/settings/personal/personal.info.php @@ -10,8 +10,8 @@ \OCP\Util::addScript('settings', 'vue-settings-personal-info'); -$isFairUseOfFreePushService = (bool) ($_['isFairUseOfFreePushService'] ?? true); -$profileEnabledGlobally = (bool) ($_['profileEnabledGlobally'] ?? false); +$isFairUseOfFreePushService = (bool)($_['isFairUseOfFreePushService'] ?? true); +$profileEnabledGlobally = (bool)($_['profileEnabledGlobally'] ?? false); $settingSections = [ ['id' => 'vue-displayname-section'], @@ -69,7 +69,7 @@ Date: Fri, 20 Mar 2026 10:13:47 -0400 Subject: [PATCH 10/11] chore(settings): fixup help.php template Signed-off-by: Josh --- apps/settings/templates/help.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/settings/templates/help.php b/apps/settings/templates/help.php index b8de77420d745..4c9d80016bf3c 100644 --- a/apps/settings/templates/help.php +++ b/apps/settings/templates/help.php @@ -8,7 +8,7 @@ $knowledgebaseEmbedded = ($_['knowledgebaseEmbedded'] ?? false) === true; $mode = $_['mode'] ?? ''; -$isAdmin = (bool) ($_['admin'] ?? false); +$isAdmin = (bool)($_['admin'] ?? false); $url = $_['url'] ?? ''; $urlUserDocs = $_['urlUserDocs'] ?? ''; @@ -79,7 +79,7 @@ $isCurrent = isset($resource['embeddedMode']) && $resource['embeddedMode'] === $mode; $linkClass = 'help-list__link ' . $resource['embeddedIcon'] . ($isCurrent ? ' active' : ''); - $isExternal = (bool) ($resource['external'] ?? false); + $isExternal = $resource['external'] ?? false; ?>