Kaynağa Gözat

Account profile switcher: the "create profile" block gets a description and icon

API clients render a block's title, description and icon in the block
header (NEO does). Give the sys_add_profile block on
account-profile-switcher defaults, all editable in Studio:

- title: "Create your profile" (was "Create a profile...")
- description (new _sys_page_block_desc_account_profile_create):
  "Your account doesn’t have a profile yet. Choose a profile type to
  get started."
- icon: user-plus

The block moves into its own INSERT with description/icon columns
(the shared INSERT has neither); order and placement are unchanged.
system.sql loads cleanly into MariaDB 11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Andrey Yasko 2 hafta önce
ebeveyn
işleme
fb3bd36735

+ 5 - 2
install/sql/system.sql

@@ -6373,8 +6373,6 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `
 
 ('sys_account_settings_delete', 1, 'system', '', '_sys_page_block_title_account_settings_delete', 11, 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:28:"account_settings_del_account";s:6:"params";a:0:{}s:5:"class";s:19:"TemplServiceAccount";}', 0, 1, 1, 1),
 
-('sys_account_profile_switcher', 1, 'system', '', '_sys_page_block_title_account_profile_create', 11, 0, 0, 2147483647, 'menu', 'sys_add_profile', 0, 1, 1, 1),
-
 ('sys_account_profile_switcher', 1, 'system', '', '_sys_page_block_title_account_profile_switcher', 11, 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:28:"account_profile_switcher_all";s:6:"params";a:0:{}s:5:"class";s:20:"TemplServiceProfiles";}', 0, 1, 1, 2),
 
 ('sys_profile_settings_cfilter', 1, 'system', '', '_sys_page_block_title_profile_settings_cfilter', 11, 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:24:"profile_settings_cfilter";s:6:"params";a:0:{}s:5:"class";s:20:"TemplServiceProfiles";}', 0, 1, 1, 2),
@@ -6406,6 +6404,11 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `
 
 ('sys_ntfs_context_invitations', 1, 'system', '', '_sys_page_block_title_ntfs_context_invitations', 11, 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:18:"browse_invitations";s:6:"params";a:2:{i:0;s:19:"{logged_profile_id}";i:1;a:1:{s:13:"empty_message";b:1;}}s:5:"class";s:20:"TemplServiceProfiles";}', 0, 1, 1, 1);
 
+-- The "create profile" block describes itself: title, description and icon are shown by
+-- API clients (NEO) in the block header and can be changed in Studio.
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `description`, `icon`, `designbox_id`, `tabs`, `async`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('sys_account_profile_switcher', 1, 'system', '', '_sys_page_block_title_account_profile_create', '_sys_page_block_desc_account_profile_create', 'user-plus', 11, 0, 0, 2147483647, 'menu', 'sys_add_profile', 0, 1, 1, 1);
+
 -- studio dashboard blocks
 INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `icon`, `designbox_id`, `class`, `tabs`, `async`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
 ('sys_std_dashboard', 1, 'system', '', '_sys_page_block_title_std_dash_version', 'package', 11, 'bx-dbd-block-medium', 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:17:"get_block_version";s:6:"params";a:0:{}s:5:"class";s:20:"TemplStudioDashboard";}', 0, 0, 1, 1),

+ 2 - 1
modules/boonex/english/data/langs/system/en.xml

@@ -3857,7 +3857,7 @@
     <string name="_sys_page_content_ph_text_units_list"><![CDATA[With text units list placeholder]]></string>
     <string name="_sys_page_content_ph_text_units_gallery"><![CDATA[With text units gallery placeholder]]></string>
     <string name="_sys_page_block_title_about"><![CDATA[About]]></string>
-    <string name="_sys_page_block_title_account_profile_create"><![CDATA[Create a profile...]]></string>
+    <string name="_sys_page_block_title_account_profile_create"><![CDATA[Create your profile]]></string>
     <string name="_sys_page_block_title_account_profile_switcher"><![CDATA[Use site as ...]]></string>
     <string name="_sys_page_block_title_account_settings_delete"><![CDATA[Delete Account]]></string>
     <string name="_sys_page_block_title_account_settings_email"><![CDATA[Email Settings]]></string>
@@ -3907,6 +3907,7 @@
     <string name="_sys_page_block_title_sys_search_ai"><![CDATA[AI Search]]></string>
     <string name="_sys_page_block_title_search_ai"><![CDATA[Search]]></string>
     <string name="_sys_page_block_title_membership_stats"><![CDATA[Membership Limits]]></string>
+    <string name="_sys_page_block_desc_account_profile_create"><![CDATA[Your account doesn’t have a profile yet. Choose a profile type to get started.]]></string>
     <string name="_sys_page_block_system_title_login"><![CDATA[Log in with Sign up link]]></string>
     <string name="_sys_page_block_system_title_login_step2"><![CDATA[Log in - step2]]></string>
     <string name="_sys_page_block_system_title_login_step3"><![CDATA[Log in - step3]]></string>

+ 2 - 1
modules/boonex/russian/data/langs/system/ru.xml

@@ -3814,7 +3814,7 @@
     <string name="_sys_page_content_ph_text_units_list"><![CDATA[С заполнителем в виде списка текстовых блоков]]></string>
     <string name="_sys_page_content_ph_text_units_gallery"><![CDATA[С заполнителем в виде галереи текстовых блоков]]></string>
 	<string name="_sys_page_block_title_about"><![CDATA[Об...]]></string>
-	<string name="_sys_page_block_title_account_profile_create"><![CDATA[Создать профиль...]]></string>
+	<string name="_sys_page_block_title_account_profile_create"><![CDATA[Создайте профиль]]></string>
 	<string name="_sys_page_block_title_account_profile_switcher"><![CDATA[Использовать сайт как ...]]></string>
 	<string name="_sys_page_block_title_account_settings_delete"><![CDATA[Удалить аккаунт]]></string>
 	<string name="_sys_page_block_title_account_settings_email"><![CDATA[Настройки email-а]]></string>
@@ -3864,6 +3864,7 @@
         <string name="_sys_page_block_title_sys_search_ai"><![CDATA[AI поиск]]></string>
         <string name="_sys_page_block_title_search_ai"><![CDATA[Поиск]]></string>
         <string name="_sys_page_block_title_membership_stats"><![CDATA[Лимиты членства]]></string>
+	<string name="_sys_page_block_desc_account_profile_create"><![CDATA[У вашей учётной записи ещё нет профиля. Выберите тип профиля, чтобы начать.]]></string>
 	<string name="_sys_page_block_system_title_login"><![CDATA[Вход с линкой регистрации]]></string>
 	<string name="_sys_page_block_system_title_login_step2"><![CDATA[Вход - шаг 2]]></string>
 	<string name="_sys_page_block_system_title_login_step3"><![CDATA[Вход - шаг 3]]></string>