feat: 新增欢迎页#23
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
新增首启欢迎引导:把用户协议拆成独立 Markdown 文件并在渲染端通过 marked 渲染;新增 6 个 onboarding 步骤组件 + 路由 /onboarding,主进程根据 system.onboardingCompleted 决定首次加载是否进入引导;同时把 Library 页的目录管理抽成 FolderManager 组件以复用,把语言列表抽到 @shared/types/settings 的 LOCALES。
Changes:
- 新增首启引导页与 6 个步骤组件,主窗口按
system.onboardingCompleted决定 hash - 抽离
FolderManager、LOCALES,并新增tsx scripts/gen-license.ts为 Windows NSIS 生成协议 - Settings schema 新增
system.onboardingCompleted,WindowControls 增加directQuit入口
Reviewed changes
Copilot reviewed 22 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| USER_AGREEMENT.md | 新增用户协议正文(v1.0),同时被 onboarding 与 NSIS 协议页复用 |
| scripts/gen-license.ts | Markdown→纯文本 + UTF-8 BOM + CRLF,供 NSIS 协议页使用 |
| package.json / pnpm-lock.yaml | 新增 marked@^18 依赖;build:win 前增加 license 生成 |
| electron-builder.config.ts | NSIS 配置指向 build/license.txt |
| electron.vite.config.ts | 新增 @root 别名以便 ?raw 引入 USER_AGREEMENT.md |
| electron/main/window/main.ts | 根据 system.onboardingCompleted 决定首次加载 hash |
| shared/types/settings.ts | 新增 LOCALES 常量与 system.onboardingCompleted 字段 |
| shared/defaults/settings.ts | 默认 onboardingCompleted: false |
| src/router/index.ts | 注册 /onboarding 路由 |
| src/pages/Onboarding.vue | 引导主容器:步骤切换、过渡、完成持久化 |
| src/components/onboarding/Step*.vue | 欢迎/协议/偏好/曲库/流媒体/快捷键 6 个步骤组件 |
| src/components/library/FolderManager.vue | 抽离的目录管理组件,复用于 Library 与 onboarding |
| src/pages/Library.vue | 切换为 FolderManager + 嵌套目录提示 |
| src/components/layout/WindowControls.vue | 新增 directQuit 用于 onboarding 直接退出 |
| src/i18n/locales/{zh-CN,en-US}.json | 新增 onboarding 与 nestedHint 文案;移除 language.zh/enUS |
| src/settings/categories/general.ts | 语言下拉改用 LOCALES |
| .gitignore / components.d.ts | 忽略 build/,自动注册新组件 |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| const { t } = useI18n(); | ||
| const emit = defineEmits<{ (e: "next"): void; (e: "back"): void }>(); | ||
|
|
||
| const agreementHtml = marked.parse(agreementRaw, { async: false }) as string; |
Comment on lines
+90
to
+96
| <component | ||
| :is="currentStep.component" | ||
| :key="currentStep.key" | ||
| :loading="completing" | ||
| @next="goNext" | ||
| @back="goBack" | ||
| /> |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.