2026-04-08 23:32:39 +08:00
|
|
|
# 阑山桌面LanMountainDesktop
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
> 你的桌面,不止一面
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
[](https://dotnet.microsoft.com/)
|
|
|
|
|
[](https://avaloniaui.net/)
|
|
|
|
|
[](LICENSE)
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
> [!IMPORTANT]
|
|
|
|
|
> **温馨提示**:本项目有部分成分由**氛围编程 (Vibe Coding)** 方式编写。
|
|
|
|
|
>
|
|
|
|
|
> 如果您对此类项目有固有的排斥感,请无视此项目,谢谢。
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
## 简介
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
**阑山桌面**是一个跨平台桌面环境增强工具,面向需要高频查看信息、追求桌面效率与个性化体验的用户。
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
基于 Avalonia UI 和 .NET 10 构建,支持 Windows、Linux、macOS 三大平台。
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|

|
|
|
|
|

|
|
|
|
|

|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
## 核心特性
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
### 📊 信息聚合
|
|
|
|
|
- 课程表、日历、天气、新闻、热搜
|
|
|
|
|
- 所有信息一目了然,无需频繁切换窗口
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
### 🎯 效率工具
|
|
|
|
|
- 自习环境监测、计时器、知识卡片
|
|
|
|
|
- 最近文档、浏览器快捷入口
|
|
|
|
|
- 常用工具组件一键触达
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
### 🎨 个性化桌面
|
|
|
|
|
- 自由布局,随心所欲摆放组件
|
|
|
|
|
- 多页桌面,工作学习场景分离
|
|
|
|
|
- 主题切换、玻璃效果、圆角风格
|
2026-03-21 13:08:20 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
### 🔌 插件生态
|
|
|
|
|
- 通过 `.laapp` 插件扩展功能
|
|
|
|
|
- 官方 Plugin SDK 支持自定义组件
|
|
|
|
|
- 设置页、组件、集成功能一站式接入
|
2026-03-21 13:08:20 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
## 为谁而设计
|
2026-03-21 13:08:20 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
| 用户类型 | 典型场景 |
|
|
|
|
|
|---------|---------|
|
|
|
|
|
| 🎓 学生用户 | 课程表、自习监测、计时、天气和日常信息聚合 |
|
|
|
|
|
| 💼 办公用户 | 日历、资讯、最近文档、常用工具入口 |
|
|
|
|
|
| 🎨 效率爱好者 | 自由布局、主题切换、插件扩展 |
|
|
|
|
|
| 🇨🇳 中文用户 | 本地化界面、农历和节假日等本地语境支持 |
|
2026-03-10 12:14:49 +08:00
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
## 快速开始
|
|
|
|
|
|
|
|
|
|
### 环境要求
|
|
|
|
|
- .NET SDK 10
|
|
|
|
|
|
|
|
|
|
### 构建与运行
|
|
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
**开发模式 (推荐):**
|
2026-03-24 09:33:56 +08:00
|
|
|
```bash
|
|
|
|
|
# 还原依赖
|
|
|
|
|
dotnet restore
|
|
|
|
|
|
|
|
|
|
# 构建项目
|
|
|
|
|
dotnet build LanMountainDesktop.slnx -c Debug
|
|
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
# 直接运行主程序 (跳过 Launcher,快速开发)
|
2026-03-24 09:33:56 +08:00
|
|
|
dotnet run --project LanMountainDesktop/LanMountainDesktop.csproj
|
|
|
|
|
```
|
|
|
|
|
|
2026-04-21 20:59:52 +08:00
|
|
|
**生产模式 (完整流程):**
|
|
|
|
|
```bash
|
|
|
|
|
# 通过 Launcher 启动 (包含 OOBE、Splash、版本管理)
|
|
|
|
|
dotnet run --project LanMountainDesktop.Launcher/LanMountainDesktop.Launcher.csproj -- launch
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
详细说明请参考 [开发文档](docs/DEVELOPMENT.md)。
|
|
|
|
|
|
2026-03-24 09:33:56 +08:00
|
|
|
### 运行测试
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
dotnet test LanMountainDesktop.slnx -c Debug
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 插件开发
|
|
|
|
|
|
|
|
|
|
阑山桌面支持通过 Plugin SDK 开发自定义插件:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# 安装插件模板
|
|
|
|
|
dotnet new install LanMountainDesktop.PluginTemplate
|
|
|
|
|
|
|
|
|
|
# 创建新插件
|
|
|
|
|
dotnet new lmd-plugin -n MyPlugin
|
|
|
|
|
```
|
|
|
|
|
|
Avalonia12 (#7)
* ava12升级
* Enable centralized package versioning
Add <Project> and <PropertyGroup> with <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> to Directory.Packages.props to enable centralized package version management across the repository. This allows package versions to be controlled from this single file instead of individual project files.
* Migrate codebase to Avalonia 12 APIs
Apply Avalonia 12 migration changes: replace SystemDecorations with WindowDecorations and remove ExtendClientAreaChromeHints/ExtendClientAreaTitleBarHeightHint usages; update BindingPlugins removal logic (no-op); switch clipboard usage to ClipboardExtensions.SetTextAsync; update Bitmap.CopyPixels calls to the new signature. Replace TextBox.Watermark with PlaceholderText, convert NumberBox styles to FANumberBox and adjust templates, change Checked/Unchecked handlers to IsCheckedChanged, and adapt FluentIcons usages (SymbolIconSource -> FASymbol/FAFont/FluentIcon equivalents). Fix MainWindow partial classes to inherit Window and correct missing variables/fields/usings. Add migration docs/specs/tasks under .trae and include a small TestFluentIcons project for icon testing.
* Migrate to Avalonia 12 and Plugin SDK v5
Upgrade project to the Avalonia 12 baseline and Plugin SDK v5: centralize Avalonia packages, remove legacy WebView.Avalonia usage (use NativeWebView/WebView2 EnvironmentRequested), and update Fluent/Material icon/package usages. Bump multiple package/project versions to 5.0.0 and Avalonia 12.0.1, update plugin template and README/docs to SDK v5, and add PLUGIN_SDK_V5_MIGRATION.md.
Also fix runtime/behavior bugs: make DataLocationResolver use a fixed bootstrap launcher data path and avoid recursive ResolveDataRoot; add legacy-state handling and extraction in OobeStateService; and update component settings tests to reflect migrated storage (DB/backup) and reset cache for test reloads. Various csproj, tests, and docs updated to reflect the migration and ensure build/test compatibility.
* Update icon glyphs and symbol mappings
Replace and refine icon sources across settings pages and controls: many FAFontIconSource glyphs were updated to specific Seagull Fluent Icons codepoints, some FASymbolIconSource usages were replaced with FAFontIconSource, and a number of symbol-to-Symbol enum mappings were adjusted (e.g. "Bell" -> AlertOn, "Shield" -> ShieldLock). Also clarified a comment in SettingsWindow and fixed a trailing newline in StudySettingsPage. Changes standardize icon visuals and bridge FluentIcons glyphs into FluentAvalonia icon sources.
* fix.修复合并产生的问题。
2026-04-29 12:14:29 +08:00
|
|
|
- **Plugin SDK**: `LanMountainDesktop.PluginSdk` (API 5.0.0)
|
2026-03-24 09:33:56 +08:00
|
|
|
- **共享契约**: `LanMountainDesktop.Shared.Contracts`
|
Avalonia12 (#7)
* ava12升级
* Enable centralized package versioning
Add <Project> and <PropertyGroup> with <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> to Directory.Packages.props to enable centralized package version management across the repository. This allows package versions to be controlled from this single file instead of individual project files.
* Migrate codebase to Avalonia 12 APIs
Apply Avalonia 12 migration changes: replace SystemDecorations with WindowDecorations and remove ExtendClientAreaChromeHints/ExtendClientAreaTitleBarHeightHint usages; update BindingPlugins removal logic (no-op); switch clipboard usage to ClipboardExtensions.SetTextAsync; update Bitmap.CopyPixels calls to the new signature. Replace TextBox.Watermark with PlaceholderText, convert NumberBox styles to FANumberBox and adjust templates, change Checked/Unchecked handlers to IsCheckedChanged, and adapt FluentIcons usages (SymbolIconSource -> FASymbol/FAFont/FluentIcon equivalents). Fix MainWindow partial classes to inherit Window and correct missing variables/fields/usings. Add migration docs/specs/tasks under .trae and include a small TestFluentIcons project for icon testing.
* Migrate to Avalonia 12 and Plugin SDK v5
Upgrade project to the Avalonia 12 baseline and Plugin SDK v5: centralize Avalonia packages, remove legacy WebView.Avalonia usage (use NativeWebView/WebView2 EnvironmentRequested), and update Fluent/Material icon/package usages. Bump multiple package/project versions to 5.0.0 and Avalonia 12.0.1, update plugin template and README/docs to SDK v5, and add PLUGIN_SDK_V5_MIGRATION.md.
Also fix runtime/behavior bugs: make DataLocationResolver use a fixed bootstrap launcher data path and avoid recursive ResolveDataRoot; add legacy-state handling and extraction in OobeStateService; and update component settings tests to reflect migrated storage (DB/backup) and reset cache for test reloads. Various csproj, tests, and docs updated to reflect the migration and ensure build/test compatibility.
* Update icon glyphs and symbol mappings
Replace and refine icon sources across settings pages and controls: many FAFontIconSource glyphs were updated to specific Seagull Fluent Icons codepoints, some FASymbolIconSource usages were replaced with FAFontIconSource, and a number of symbol-to-Symbol enum mappings were adjusted (e.g. "Bell" -> AlertOn, "Shield" -> ShieldLock). Also clarified a comment in SettingsWindow and fixed a trailing newline in StudySettingsPage. Changes standardize icon visuals and bridge FluentIcons glyphs into FluentAvalonia icon sources.
* fix.修复合并产生的问题。
2026-04-29 12:14:29 +08:00
|
|
|
- **迁移指南**: [PLUGIN_SDK_V5_MIGRATION.md](docs/PLUGIN_SDK_V5_MIGRATION.md)
|
2026-03-24 09:33:56 +08:00
|
|
|
|
|
|
|
|
## 项目结构
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
LanMountainDesktop/
|
|
|
|
|
├── LanMountainDesktop/ # 桌面宿主应用
|
2026-04-21 20:59:52 +08:00
|
|
|
├── LanMountainDesktop.Launcher/ # 启动器 (OOBE、Splash、版本管理、更新)
|
2026-03-24 09:33:56 +08:00
|
|
|
├── LanMountainDesktop.PluginSdk/ # 官方插件 SDK
|
|
|
|
|
├── LanMountainDesktop.Shared.Contracts/ # 宿主与插件共享契约
|
|
|
|
|
├── LanMountainDesktop.Appearance/ # 主题与外观基础设施
|
|
|
|
|
├── LanMountainDesktop.Settings.Core/# 设置持久化基础设施
|
|
|
|
|
└── LanMountainDesktop.Tests/ # 测试项目
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 生态边界
|
|
|
|
|
|
|
|
|
|
| 项目 | 职责 |
|
|
|
|
|
|-----|------|
|
|
|
|
|
| **本仓库** | 桌面宿主、插件运行时、Plugin SDK、共享契约 |
|
|
|
|
|
| [LanAirApp](https://github.com/yourorg/LanAirApp) | 插件市场元数据、开发者生态材料 |
|
|
|
|
|
| [LanMountainDesktop.SamplePlugin](https://github.com/yourorg/LanMountainDesktop.SamplePlugin) | 官方示例插件 |
|
|
|
|
|
|
|
|
|
|
## 文档索引
|
|
|
|
|
|
|
|
|
|
- [产品定位](docs/PRODUCT.md) - 产品愿景与目标用户
|
|
|
|
|
- [架构说明](docs/ARCHITECTURE.md) - 仓库结构与运行时主线
|
|
|
|
|
- [开发指南](docs/DEVELOPMENT.md) - 构建、测试、调试
|
|
|
|
|
- [视觉规范](docs/VISUAL_SPEC.md) - 主题、颜色、玻璃层级
|
|
|
|
|
- [圆角规范](docs/CORNER_RADIUS_SPEC.md) - 圆角层级与动态规则
|
|
|
|
|
- [贡献指南](docs/CONTRIBUTING.md) - PR、spec、文档协作规则
|
|
|
|
|
|
|
|
|
|
## 技术栈
|
|
|
|
|
|
|
|
|
|
- **UI 框架**: [Avalonia UI](https://avaloniaui.net/)
|
|
|
|
|
- **开发平台**: [.NET 10](https://dotnet.microsoft.com/)
|
|
|
|
|
- **支持平台**: Windows 10+, Linux, macOS
|
|
|
|
|
|
|
|
|
|
## 许可证
|
|
|
|
|
|
|
|
|
|
[MIT](LICENSE)
|
2026-03-10 12:14:49 +08:00
|
|
|
|
|
|
|
|
|