Community plugin

ADkun / dsh-maximize

DSH插件:会话页右上角「全屏」按钮,点击隐藏顶部标题栏(对话/轨迹 tabs)、底部输入框、左侧边栏;右侧边栏保持可打开,按钮落在整页最右上。再点或按 ESC 恢复。毛玻璃图标按钮,中英文文案。

  • JavaScript
  • License not detected
  • 0 stars
  • Nov 14, 2026

About this plugin

Written by the registry from verified metadata, not from the README.

dsh-maximize is a DSH plugin published from the ADkun/dsh-maximize repository.

  • Listing statusManifest verified
  • Manifest checkedNov 17, 2026
  • Packagedsh-maximize
  • Package version1.1.0
  • Source commit1c1dce5
  • Repository createdOct 16, 2026

Capabilities and topics

fullscreenglassmorphismmaximizesession-page
From the repository README

README

Everything below this line is the repository's own document, cached here. This site did not write or review it.

dsh-maximize

DSH 插件:会话页右侧边缘的「全屏」悬浮按钮。

平时贴着页面最右侧收成一条细线,不遮挡任何原有按钮;鼠标移到细线上(或用键盘聚焦到它)时,按钮从右边缘滑出,点击进入/退出全屏,鼠标移开自动收回收成细线。全屏时隐藏顶部标题栏、底部输入框,并折叠左侧边栏(退出时还原);右侧边栏不动。

按钮采用毛玻璃风(半透明深底 + 模糊背景 + 细边框),左圆角、右边贴齐页面边缘,仅保留全屏/退出图标,悬停显示「全屏 / 退出全屏」提示。中英文文案自动跟随 DSH 语言。

形态与交互

  • 静止:贴右边缘的一条 5×60 细线,垂直居中;只占 6px 宽,几乎不可见,也不拦截页面其它点击。
  • 滑出:鼠标移到细线 / 键盘 Tab 聚焦时,按钮由右边缘滑出并淡入(左圆角、右边贴齐,无缝隙,避免悬停抖动)。
  • 收纳:鼠标移开、焦点移走后自动缩回细线。
  • 不遮挡:垂直居中定位在右边缘中段,避开右侧边栏顶部工具栏(分栏 / 全屏 / 收起右侧边栏),也避开右边缘的拖拽手柄。

功能

项说明
全屏开关悬停右边缘细线滑出按钮,点击进入/退出全屏
自动收纳平时收成细线;鼠标移开 / 失焦后收回
隐藏顶栏隐藏 header[data-window-drag](含对话/轨迹 tabs)
隐藏输入框隐藏 [data-composer-seat] 与轨迹页的 [data-conversation-composer-overlay]
折叠左栏走 ctx.layout.toggleSidebar(),退出时还原进入前状态(原本已折叠则不误展开)
右栏不动右侧边栏开着时按钮仍贴整页最右缘、垂直居中,不压顶部工具栏
ESC 退出按 ESC 或再次点击按钮恢复原样
状态持久同一页切换会话(overlay 槽重挂载)保持全屏态

安装

本地安装(推荐用于自建 DSH 环境):

# 克隆仓库
git clone https://github.com/ADkun/dsh-maximize.git
cd dsh-maximize

# 在 DSH profile 目录下以 bundle 形式安装(以 web profile 为例)
dsh plugin add ./dsh-maximize
# 或通过插件管理器加载 bundle

安装后刷新页面一次,客户端模块才会注册到 shell.overlay 插槽并显示按钮。

文件结构

dsh-maximize/
├── client.js        # 客户端半边:React 组件注入 shell.overlay 插槽
├── index.js         # 宿主半边:空实现(纯客户端插件)
├── cordis.patch.yml # Loader patch:注册 bundle id/name
├── package.json     # 包元数据,声明 dsh.client 平台 web
└── README.md

开发注意

client.js 运行在 DSH ModuleLoader 工厂垫片中,不能使用顶层 import ... from 'react'(裸说明符在工厂作用域外无法解析)。必须用工厂模式获取 React:

window.__ModuleLoader__.load({
  id: 'dsh-maximize',
  factory(require) {
    const React = require('react');
    const { useState, useEffect, useRef, useCallback } = React;
    const h = React.createElement;
    // ...
  },
});

悬停/收纳纯用 CSS 实现(.mz-dock:hover、:focus-within 配合 pointer-events 与 transform),无需 JS 监听鼠标移动。

文案通过 ctx.locale.register('dsh-maximize', 'zh', {...}) / bind('dsh-maximize') 注册,遵循 DSH 本地化规范。

License

MIT

Badge

Listed here? Link back with this badge — paste the snippet into your repository README.

Listed on DSH Plugin badge
[![Listed on DSH Plugin](https://dsh-plugin.com/badges/listed.svg)](https://dsh-plugin.com/plugins/ADkun/dsh-maximize)