fix(admin): stop cropping the layout preview images in image_select

AksImageSelectField pinned every preview to a 60x60 box with
object-fit:cover, but these are wide layout strips: header layouts are
597x57 (10.47:1), the footer template is 800x190 (4.21:1) and the slide
align set is 200x101. A 10:1 strip inside a square crop keeps ~6% of its
width, so the layout it is supposed to illustrate is unrecognisable.

Constrain the width instead and let the height follow, which is what the
reference theme's CSF image_select does (max-width:100%; height:auto).
Each field now declares the width that suits its images, and an option
may still override it: header 200, footer 240, slide align 160, mobile
header 120.

Only presentation changed. No image files and no stored values moved,
so existing settings are unaffected.
This commit is contained in:
kate522 committed 2026-11-01 12:18:14 +08:00
1 parent 4740078135
commit df12f51199
4 files changed
+32 -16

No files matched your search

+5 -5
View File
@@ -1,5 +1,5 @@
{
"generated_at": "2026-11-01T03:45:46+00:00",
"generated_at": "2026-11-01T04:11:06+00:00",
"errors": [],
"warnings": [
"customPage tools-update section 'tools/update' not in PHP schema (ok if pure operational page)",
@@ -258,7 +258,7 @@
"entry": true,
"missing_chunks": [],
"chunks": [
"SchemaPage.BM05qq7c.js",
"SchemaPage.YNr16Fc9.js",
"vendor-vue.CibbKclz.js",
"FaIcon.DB-L86Cm.js",
"useCollapsibleItems.B7EjDmsr.js",
@@ -276,8 +276,8 @@
"FloatingButtonsSettings.DYWR59AW.js",
"PageHeader.UHsfBDVL.js",
"FooterTabbarSettings.D8ujMgd9.js",
"PostPageSettings.Bhei4Dk4.js",
"CommentSettings.Ct-HES9S.js",
"PostPageSettings.D8BXJ07f.js",
"CommentSettings.1Il-GVqw.js",
"PermissionsCapabilities.DXXFzINq.js",
"CmsCredits.DESOnIkP.js",
"ThemeInfoPage.D5AogccB.js",
@@ -287,7 +287,7 @@
"UsersLevel.B-jXEukF.js",
"UsersBadge.DVCEC3QE.js",
"UsersWechatTemplate.DHoNsqm_.js",
"UsersTicket.DcwmQE5D.js",
"UsersTicket.D5BTFq6U.js",
"ToolsImportExport.C-XhCKwl.js",
"ToolsHealth.DNZ1YaWo.js",
"ToolsUpdate.38p6GYou.js"