feat(nav): finish remaining parity gaps (image_select, AJAX search, senior UI)

- Layout image_select previews (zibll PNGs under assets/images/header-layout)
- Localize aksrtAdminData.themeUri for admin SPA asset URLs
- Layout-2 inline search AJAX suggestions via aksrt_search_suggestions
- Appearance→Menus visual senior submenu editor (cards/columns)
- Acceptance checklist + automated source contract report
This commit is contained in:
2026-07-22 12:04:44 +08:00
parent e3848ddf8c
commit 2a11a889c3
20 changed files with 522 additions and 19 deletions
@@ -3,6 +3,14 @@
* Each key corresponds to a sub-page under the "页面&显示" section.
*/
/** Theme asset base for layout previews (admin SPA). */
function themeAsset(path) {
const base = (typeof window !== 'undefined' && window.aksrtAdminData && window.aksrtAdminData.themeUri)
? String(window.aksrtAdminData.themeUri).replace(/\/$/, '')
: ''
return base ? `${base}/${path.replace(/^\//, '')}` : path
}
/** Homepage sort options — keep in sync with AKSRT_Settings_Home_Cms::homepage_allowed_sorts() */
const sortOptions = [
{ label: '最近更新', value: 'modified' },
@@ -79,23 +87,23 @@ export const pageDisplaySchemas = {
{
key: 'header_layout',
label: '电脑端布局',
type: 'radio',
default: '2',
type: 'image_select',
default: '1',
options: [
{ label: '布局 1(经典)', value: '1' },
{ label: '布局 2(内联搜索)', value: '2' },
{ label: '布局 3(紧凑)', value: '3' },
{ label: '布局 1(经典)', value: '1', image: themeAsset('assets/images/header-layout/header_layout_1.png') },
{ label: '布局 2(内联搜索)', value: '2', image: themeAsset('assets/images/header-layout/header_layout_2.png') },
{ label: '布局 3(紧凑)', value: '3', image: themeAsset('assets/images/header-layout/header_layout_3.png') },
],
help: '不同布局切换导航 DOM 结构',
help: '不同布局切换导航 DOM 结构(与 zibll image_select 一致)',
},
{
key: 'mobile_header_layout',
label: '移动端布局',
type: 'radio',
type: 'image_select',
default: 'center',
options: [
{ label: '居中(含搜索按钮)', value: 'center' },
{ label: '靠左', value: 'left' },
{ label: '居中(含搜索按钮)', value: 'center', image: themeAsset('assets/images/header-layout/mobile_header_layout_center.png') },
{ label: '靠左', value: 'left', image: themeAsset('assets/images/header-layout/mobile_header_layout_left.png') },
],
},
{