From 52f614887636d0426d0b3bf432eca34411a0cbc8 Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Tue, 18 Oct 2022 15:38:25 +0100 Subject: [PATCH] chore: add priorities to profile settings page (#3657) To give extensions more flexibility --- .../js/src/forum/components/SettingsPage.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/framework/core/js/src/forum/components/SettingsPage.tsx b/framework/core/js/src/forum/components/SettingsPage.tsx index 347e99a1e..b096efa99 100644 --- a/framework/core/js/src/forum/components/SettingsPage.tsx +++ b/framework/core/js/src/forum/components/SettingsPage.tsx @@ -40,14 +40,15 @@ export default class SettingsPage(); - ['account', 'notifications', 'privacy'].forEach((section) => { + ['account', 'notifications', 'privacy'].forEach((section, index) => { const sectionItems = `${section}Items` as 'accountItems' | 'notificationsItems' | 'privacyItems'; items.add( section,
{this[sectionItems]().toArray()} -
+ , + 100 - index * 10 ); }); @@ -64,14 +65,16 @@ export default class SettingsPage app.modal.show(ChangePasswordModal)}> {app.translator.trans('core.forum.settings.change_password_button')} - + , + 100 ); items.add( 'changeEmail', + , + 90 ); return items; @@ -83,7 +86,7 @@ export default class SettingsPage(); - items.add('notificationGrid', ); + items.add('notificationGrid', , 100); return items; } @@ -109,7 +112,8 @@ export default class SettingsPage {app.translator.trans('core.forum.settings.privacy_disclose_online_label')} - + , + 100 ); return items;