eisland-dev-add-empty-state

Featured

为 eIsland 灵动岛添加一个新的空白状态机(IslandState)。当用户要求创建新状态、新页面、 新界面(如登录页、设置子页面、独立面板)时使用此 skill。即使用户只说"加个新状态"或 "创建一个 XX 页面",也应触发。此 skill 覆盖从类型注册、窗口尺寸、CSS 样式到鼠标交互 行为的全部 12 个修改点,确保状态机完整可用。

Web & Frontend 312 stars 16 forks Updated today GPL-3.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
83
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# eIsland: 添加空白状态机 为灵动岛添加一个新的空白 IslandState,使其具备正确的窗口大小、样式和交互行为。 ## 前置确认 在开始前,向用户确认以下信息: 1. **状态名称** — kebab-case 标识符(如 `musicProvidersLogin`、`settings wizard`) 2. **窗口大小** — 选择一种预设: - `maxExpand`(860x400)— 全展开大面板,适合设置、表单、内容页 - `expanded`(860x150)— 单击展开面板 - `hover`(500x60)— 悬停小面板 - `notification`(500x88)— 通知面板 - `lyrics`(500x42)— 歌词条 - 自定义尺寸 3. **鼠标移出后是否收回?** — **必须主动询问**: > "鼠标移出灵动岛后,是否自动收回至待机状态?(大多数独立页面如登录、注册、支付页面选择不收回)" - **不收回**(推荐用于独立页面)→ 需要额外修改 `AUTH_STATES`、`useIslandHoverInteraction.ts`、`useIslandSettingsSync.ts` - **收回** → 无需额外修改 4. **是否为认证/登录类页面?** — 如果是,需要导入 `auth.css` 并使用 `auth-state-content` 类名 ## 实现步骤 ### Step 1: 注册类型 **文件:** `src/renderer/store/types/index.ts` 1a. 在 `IslandState` 联合类型末尾添加新状态名: ```typescript export type IslandState = '...' | 'newStateName'; ``` 1b. 在 `IslandSlice` 接口中添加 setter 方法签名: ```typescript setNewStateName: () => void; ``` ### Step 2: 实现 setter **文件:** `src/renderer/store/slices/islandSlice.ts` 在已有的 setter 群(如 `setBindEmail` 之后)添加新 setter: ```typescript setNewStateName: () => set((prev) => { if (prev.uiStateLocked && prev.state !== 'newStateName') return prev; const standalone = isStandaloneRenderer(); if (!standalone) { window.api?.expandWindowSettings(); window.api?.disableMousePassthrough(); } const nextAuthReturnState = (/* 已��� auth 状态列表 */ || prev.state === 'newStateName') ? prev.authReturnState : (standalone ? 'maxExpand' : prev.state); return { state: 'newStateName'...

Details

Author
JNTMTMTM
Repository
JNTMTMTM/eIsland
Created
5 months ago
Last Updated
today
Language
TypeScript
License
GPL-3.0

Similar Skills

Semantically similar based on skill content — not just same category

Web & Frontend Featured

eisland-dev-add-empty-setting-subpage

Add a new empty subpage (tab) to an existing eIsland settings section with page navigation support. Use this skill whenever the user wants to add a new tab/page/subpage to any settings section in the eIsland project, including requests like "添加分页", "add a tab", "add subpage", "新建空白分页", "add empty page to settings", or when extending settings sections like AI, update, network, music, weather, mail, etc. with new page navigation. This skill handles the full workflow: type definitions, config constants, PageDots component, section modifications, SettingsTab state wiring, and i18n translations.

312 Updated today
JNTMTMTM
Web & Frontend Featured

eisland-dev-add-maxexpand-tab

为 eIsland 灵动岛的 MaxExpand(全展开)模式添加一个新的 Tab 页面。当用户要求创建新的 MaxExpand 页面、添加全展开界面组件(如计算器、时钟、天气面板、便签、日历等)时使用此 skill。 即使用户只说"新建一个 maxexpand 界面"、"加个全展开页面"、"在 maxexpand 里加个 XX", 也应触发。此 skill 覆盖从类型注册、设置配置、懒加载/即时加载渲染到 i18n 国际化的全部 8 个 修改点,确保新 Tab 完整可用且可在设置中拖拽排序与切换可见性。

312 Updated today
JNTMTMTM
Web & Frontend Featured

eisland-dev-add-guide-step

创建 eIsland 引导配置窗口的新步骤页面。当用户要求在引导界面(Guide)中新增配置步骤、引导页面、引导分页时使用此 skill。 触发关键词:guide 步骤、引导页面、引导分页、Guide step、新建引导页、添加引导配置。 适用于 src/renderer/components/components/ 目录下的 Guide 模块。

312 Updated today
JNTMTMTM