feat(admin): 增加背景管理
- settings 新增 background.light / background.dark,留空使用内置图 - 后台首页管理新增「背景管理」,两栏 URL 输入与实时预览,可一键恢复内置图 - 前台按设置覆盖明暗背景图,仍保留 65vh 与交叉淡入 - 保存/撤销沿用现有设置乐观锁流程
This commit is contained in:
@@ -276,6 +276,7 @@ export default function AppNext() {
|
||||
show_service: true,
|
||||
show_nav: true,
|
||||
},
|
||||
background: { light: '', dark: '' },
|
||||
profile: {
|
||||
name: '本地管理员',
|
||||
role: '管理员',
|
||||
@@ -644,8 +645,24 @@ export default function AppNext() {
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="site-background site-background-light" aria-hidden="true" />
|
||||
<div className="site-background site-background-dark" aria-hidden="true" />
|
||||
<div
|
||||
className="site-background site-background-light"
|
||||
style={
|
||||
site.background.light.trim() === ''
|
||||
? undefined
|
||||
: { backgroundImage: `url(${JSON.stringify(site.background.light.trim())})` }
|
||||
}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div
|
||||
className="site-background site-background-dark"
|
||||
style={
|
||||
site.background.dark.trim() === ''
|
||||
? undefined
|
||||
: { backgroundImage: `url(${JSON.stringify(site.background.dark.trim())})` }
|
||||
}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
<Layout
|
||||
contained
|
||||
|
||||
Reference in New Issue
Block a user