DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

xiaaoyun /

xiaaoyun/dsh-aionui-grid-fix

Verified

Layout patch for the third-party AionUi right-panel plugin: pins its columns to the first grid row and copies a diagnostic when the fix stops holding.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@4833716b

dsh-aionui-grid-fix · 右侧面板网格修复

给 DSH Web 界面打一条布局补丁:让「预览 / 文件」那两列回到窗口网格的第一行,侧栏、聊天区、详情列就都能顶到窗口底边。

左侧栏会多一行「网格修复」(排在「QQ 机器人」前面),点开是一页说明 + 实时读数:窗口网格行数、侧栏高度、窗口内容高。网格是两行 = 修复生效;冒出第三行就说明上游改了网格约定。

为什么需要它

DSH 的主框架是个两行网格:

grid-template-rows: minmax(0, 1fr) auto;   /* 第一行:三列主区;第二行:shell.bottom */
grid-template-columns: 侧栏px 聊天区 详情px;

@neystan/dsh-client-ui-aionui-panel 会把两个 div 追加进这个网格,并把列改成 5 条(侧栏、聊天、详情、预览、文件),但它只声明了列、没给行号:

frame.appendChild(previewCol)   // [data-aionui-preview-col]
frame.appendChild(explorerCol)  // [data-aionui-explorer-col]
frame.style.gridTemplateColumns = '侧栏 1fr 详情 预览 文件'

CSS Grid 的自动排位是 sparse 的,按 DOM 顺序向前推进、不回头补空位。shell.bottom 要横跨整行,被挤到第二行后,排位指针就停在第二行末尾;轮到预览、文件两列时,它们只能新开一个隐式的第三行。这个第三行按内容撑出 140px,第一行就被削掉 140px:侧栏只到 900px 而不是 1040px,底部空出一条白带。

修复

一条规则,把两列钉回第一行:

[data-aionui-explorer-col],
[data-aionui-preview-col] { grid-row: 1 }

行号确定后它们不再走自动排位,直接落在第一行第 4、5 列(列位置仍由自动排位选),隐式第三行消失。

安装

dsh plugin --profile desktop add -w link:/path/to/dsh-aionui-grid-fix

或手动在 profile 的 package.json 里加:

"dependencies": { "dsh-aionui-grid-fix": "link:C:/path/to/dsh-aionui-grid-fix" }

并把 dsh-aionui-grid-fix 加进 dsh.profile.bundles,然后 pnpm install。

装完重启 DSH(Host 侧插件行在启动时加载)。

结构

dsh-aionui-grid-fix/
├─ package.json          dsh.bundle.patch + dsh.client
├─ cordis.patch.yml      插入一条 Host 行
├─ index.js              Host 半(空,只为让包能作为插件行安装)
├─ client.js             浏览器半:注入那条 CSS
└─ README.md

兼容性

针对 DSH 0.2.2-rc.1 的 dsh-client-ui-layout(grid-template-rows: minmax(0, 1fr) auto + shell.bottom 行)与 @neystan/dsh-client-ui-aionui-panel 0.1.16。两者任一改了自己的网格约定,这条规则就可以撤掉。

许可

MIT。

诊断(0.2.0 新增)

面板右上角多了两颗按钮:

  • 重新检测:重新量一次窗口网格(原有)。
  • 复制诊断:把当前读数、视口尺寸、DPR、UA、时间和「修复是否还生效」拼成一段文本,直接贴进 issue 就行。

另外,一旦量到隐式第三行(说明右侧面板插件改了网格约定、这条规则配不上了),面板顶部会出现一条红色告警条,不用自己盯着行数判断。

text dsh-aionui-grid-fix diagnostics when: 2026-11-15T… fix: holding grid-template-rows: 900px 0px row tracks: 2 sidebar height: 1040px frame height: 1040px viewport: 1920x1080 @1.25x ua: …

—/ 5

No ratings yet

Verified DSH bundle

Commit 4833716b89f1

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout