fix(layout): 停靠栏置顶、折叠按钮归位、顶部功能图标上移 v3.25.36

- 左右栏 top:0 贴顶(去掉上方缺口);标签条/画布状态行按 --iwb-dock-* 内缩,标题跟随缩进
- 左栏折叠图标移到头部最右;右栏保持在最右;折叠后边缘 14px 窄条 + 展开图标
- 画布状态行右侧功能图标(主题/设置/图库/更多)上移到标签条最右;保存按钮去掉
- 更新 shell-render / single-canvas / page-chrome / left-resource 断言与 boundary 快照
This commit is contained in:
qiqi committed 2026-11-19 22:46:20 +08:00
1 parent d42752c0f4
commit 9425c74b2f
15 files changed
+55 -15

No files matched your search

+17 -3
View File
@@ -75,11 +75,24 @@
})(),
),
el('span', { className: 'iwb-top-nav-spacer' }, null),
// v3.1.0:「我的画布」调色板图标已删(回首页走标签条房子图标,双入口冗余)
)
}
// 顶部功能图标组:已移到标签条最右(v3.25.36),保存按钮去掉(自动保存)
function IWBUICanvasTopActions (props) {
const I = props.I
const theme = props.theme
const toggleTheme = props.toggleTheme
const setSettingOpen = props.setSettingOpen
const drawerOpen = props.drawerOpen
const setDrawerOpen = props.setDrawerOpen
const setDrawerTab = props.setDrawerTab
const setWsMorePos = props.setWsMorePos
const setWsMoreOpen = props.setWsMoreOpen
return el('div', { className: 'iwb-tab-actions' },
el('button', { className: 'iwb-top-nav-icon', title: '切换主题样式', onClick: toggleTheme }, theme === 'dark' ? I('sun') : I('moon')),
el('button', { className: 'iwb-top-nav-icon', title: '服务与 Key 设置', onClick: () => setSettingOpen(true) }, I('settings')),
el('button', { className: 'iwb-top-nav-icon', title: '保存当前画布', onClick: () => { saveNow(); showToast('已保存当前画布') } }, I('save')),
el('button', { className: 'iwb-top-nav-icon' + (drawerOpen ? ' iwb-top-nav-icon-active' : ''), title: '资源中心(提示词库/节点组/图库)', onClick: () => { const nv = !drawerOpen; setDrawerOpen(nv); if (nv) setDrawerTab('prompts') } }, I('panel')),
el('button', { className: 'iwb-top-nav-icon' + (drawerOpen ? ' iwb-top-nav-icon-active' : ''), title: '图库(右侧栏)', onClick: () => { const nv = !drawerOpen; setDrawerOpen(nv); if (nv) setDrawerTab('history') } }, I('panel')),
el('button', { className: 'iwb-top-nav-icon', title: '更多操作', onClick: (e) => { const r = e.currentTarget.getBoundingClientRect(); setWsMorePos({ top: r.bottom + 6, left: Math.max(6, r.right - 210) }); setWsMoreOpen((v) => !v) } }, I('more')),
)
}
@@ -105,5 +118,6 @@
}
global.IWBUICanvasTopBar = IWBUICanvasTopBar
global.IWBUICanvasTopActions = IWBUICanvasTopActions
global.IWBUIProductNav = IWBUIProductNav
})(typeof window !== 'undefined' ? window : globalThis)
+2 -1
View File
@@ -301,7 +301,8 @@
onClick: function (e) { e.stopPropagation(); if (!dragRef.current) setSide(side, { active: id }) },
}, renderIcon((p && p.icon) || 'panel'))
})
return el('div', { className: 'iwb-dock-head' }, isLeft ? [toggleBtn].concat(icons) : icons.concat([toggleBtn]))
// 折叠图标统一放在面板头部最右(贴近画布/窗口边缘)
return el('div', { className: 'iwb-dock-head' }, icons.concat([toggleBtn]))
}
const renderBody = function (side) {
+3 -1
View File
@@ -70,7 +70,9 @@
// 画布标签组与「+ 新建」分隔(0 个标签时不加,避免与首页线叠成双线)
tabIds.length ? el('span', { key: '__sep-new__', className: 'iwb-tab-sep', 'aria-hidden': 'true' }, null) : null,
// + 新建
el('button', { className: 'iwb-tab iwb-tab-new', title: '新建画布', onClick: () => newWs() }, '+')
el('button', { className: 'iwb-tab iwb-tab-new', title: '新建画布', onClick: () => newWs() }, '+'),
el('span', { className: 'iwb-tab-spacer' }, null),
props.actions || null
)
}