This commit is contained in:
lincube
2026-03-04 15:22:52 +08:00
parent 2ba66893ac
commit f78a56cb2c
198 changed files with 461 additions and 461 deletions

View File

@@ -1,6 +1,6 @@
# LanMontainDesktop GitHub Actions CI/CD
# LanMountainDesktop GitHub Actions CI/CD
参考 ClassIsland 项目最佳实践,为 LanMontainDesktop 配置的 GitHub Actions 工作流。
参考 ClassIsland 项目最佳实践,为 LanMountainDesktop 配置的 GitHub Actions 工作流。
## 📋 工作流说明
@@ -98,11 +98,11 @@ git push origin v1.0.0
```bash
# 使用现有脚本
.\LanMontainDesktop\scripts\package.ps1 -RuntimeIdentifier win-x64
.\LanMountainDesktop\scripts\package.ps1 -RuntimeIdentifier win-x64
# 或用 dotnet 直接构建
dotnet build -c Release
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj `
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj `
-c Release -r win-x64 -o ./publish/win-x64 `
--self-contained -p:PublishSingleFile=true
```
@@ -118,7 +118,7 @@ chmod +x scripts/build.sh
# 或用 dotnet 直接构建
dotnet build -c Release
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj \
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj \
-c Release -r linux-x64 -o ./publish/linux-x64 \
--self-contained -p:PublishSingleFile=true
```

18
.github/CODEOWNERS vendored
View File

@@ -1,18 +1,18 @@
# CODEOWNERS for LanMontainDesktop
# CODEOWNERS for LanMountainDesktop
# Default owners for everything
* @
# Desktop UI & Components
/LanMontainDesktop/Views/ @
/LanMontainDesktop/ViewModels/ @
/LanMontainDesktop/ComponentSystem/ @
/LanMontainDesktop/Styles/ @
/LanMontainDesktop/Controls/ @
/LanMountainDesktop/Views/ @
/LanMountainDesktop/ViewModels/ @
/LanMountainDesktop/ComponentSystem/ @
/LanMountainDesktop/Styles/ @
/LanMountainDesktop/Controls/ @
# Backend Services
/LanMontainDesktop/Services/ @
/LanMontainDesktop.RecommendationBackend/ @
/LanMountainDesktop/Services/ @
/LanMountainDesktop.RecommendationBackend/ @
# Documentation
/docs/ @
@@ -21,4 +21,4 @@
# Build & CI/CD
/.github/ @
/scripts/ @
/LanMontainDesktop/LanMontainDesktop.csproj @
/LanMountainDesktop/LanMountainDesktop.csproj @

20
.github/FIX_REPORT.md vendored
View File

@@ -1,4 +1,4 @@
# 修复报告GitHub Actions CI/CD
# 修复报告GitHub Actions CI/CD
## ✅ 问题已解决
@@ -8,16 +8,16 @@ MSBUILD : error MSB1003: Specify a project or solution file.
The current working directory does not contain a project or solution file.
```
**原因**: 项目中缺少 `LanMontainDesktop.sln` 解决方案文件,但工作流尝试执行 `dotnet restore` 而没有指定项目。
**原因**: 项目中缺少 `LanMountainDesktop.sln` 解决方案文件,但工作流尝试执行 `dotnet restore` 而没有指定项目。
---
## 🔧 已采取的修复
### 1. 创建解决方案文件
✅ 创建了标准的 `LanMontainDesktop.sln` 文件,包含:
- `LanMontainDesktop/LanMontainDesktop.csproj`
- `LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj`
✅ 创建了标准的 `LanMountainDesktop.sln` 文件,包含:
- `LanMountainDesktop/LanMountainDesktop.csproj`
- `LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj`
### 2. 验证本地构建工作
✅ 本地测试通过:
@@ -39,9 +39,9 @@ The current working directory does not contain a project or solution file.
包含两个项目的标准 Visual Studio 解决方案格式:
```
LanMontainDesktop.sln
├── LanMontainDesktop (Desktop UI - Avalonia)
└── LanMontainDesktop.RecommendationBackend (Web API - ASP.NET Core)
LanMountainDesktop.sln
├── LanMountainDesktop (Desktop UI - Avalonia)
└── LanMountainDesktop.RecommendationBackend (Web API - ASP.NET Core)
```
---
@@ -52,7 +52,7 @@ LanMontainDesktop.sln
```bash
# 1. 添加新创建的解决方案文件
git add LanMontainDesktop.sln
git add LanMountainDesktop.sln
# 2. 提交
git commit -m "Add solution file for multi-project structure"
@@ -94,7 +94,7 @@ git push origin v1.0.1
| `.github/workflows/code-quality.yml` | 代码质量检查 | ✅ 可用 |
| `.github/workflows/release.yml` | 多平台发布 | ✅ 可用 |
| `.github/workflows/issue-management.yml` | Issue自动管理 | ✅ 可用 |
| `LanMontainDesktop.sln` | 解决方案文件 | ✅ 已修复 |
| `LanMountainDesktop.sln` | 解决方案文件 | ✅ 已修复 |
---

View File

@@ -1,10 +1,10 @@
# Multi-Platform Build Guide
# Multi-Platform Build Guide
This document explains how to build LanMontainDesktop for Windows, Linux, and macOS.
This document explains how to build LanMountainDesktop for Windows, Linux, and macOS.
## Overview
LanMontainDesktop supports self-contained builds for:
LanMountainDesktop supports self-contained builds for:
- **Windows**: x64 (64-bit) and x86 (32-bit)
- **Linux**: x64 only (AppImage/snap support planned)
- **macOS**: x64 (Intel) and arm64 (Apple Silicon M1/M2/M3)
@@ -67,19 +67,19 @@ brew install dotnet
**Windows (x64):**
```powershell
# Using the PowerShell script
.\LanMontainDesktop\scripts\package.ps1 `
.\LanMountainDesktop\scripts\package.ps1 `
-RuntimeIdentifier win-x64 `
-Version 1.0.0
# Or with dotnet directly
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj `
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj `
-c Release -r win-x64 -o ./publish/win-x64 `
--self-contained -p:PublishSingleFile=true
```
**Windows (x86):**
```powershell
.\LanMontainDesktop\scripts\package.ps1 `
.\LanMountainDesktop\scripts\package.ps1 `
-RuntimeIdentifier win-x86 `
-Version 1.0.0
```
@@ -119,8 +119,8 @@ After building, you'll have a self-contained directory with:
```
publish/[rid]/
├── LanMontainDesktop.exe (Windows)
├── LanMontainDesktop (Linux/macOS - executable)
├── LanMountainDesktop.exe (Windows)
├── LanMountainDesktop (Linux/macOS - executable)
├── libvlc/ (Windows/macOS only)
├── Localization/ (i18n files)
├── Extensions/ (Component extension manifests)
@@ -134,7 +134,7 @@ publish/[rid]/
# Create zip package
$rid = "win-x64"
$version = "1.0.0"
$dir = "LanMontainDesktop-$version-$rid"
$dir = "LanMountainDesktop-$version-$rid"
Copy-Item -Path "./publish/$rid" -Destination $dir -Recurse
Compress-Archive -Path $dir -DestinationPath "$dir.zip"
```
@@ -144,7 +144,7 @@ Compress-Archive -Path $dir -DestinationPath "$dir.zip"
# Create tar.gz package
rid=linux-x64
version=1.0.0
dir="LanMontainDesktop-$version-$rid"
dir="LanMountainDesktop-$version-$rid"
mkdir -p $dir
cp -r ./publish/$rid/* $dir/
tar -czf "$dir.tar.gz" $dir
@@ -218,16 +218,16 @@ tar -czf "$dir.tar.gz" $dir
```bash
# Clean and retry
dotnet clean LanMontainDesktop/LanMontainDesktop.csproj
dotnet clean LanMountainDesktop/LanMountainDesktop.csproj
dotnet restore
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj -c Release -r win-x64 --self-contained
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj -c Release -r win-x64 --self-contained
```
### Linux Build Fails
```bash
# Check dependencies are installed
ldd ./publish/linux-x64/LanMontainDesktop | grep "not found"
ldd ./publish/linux-x64/LanMountainDesktop | grep "not found"
# Install missing libraries
sudo apt-get install -y lib[missing-name]

14
.github/README.md vendored
View File

@@ -1,8 +1,8 @@
# LanMontainDesktop
# LanMountainDesktop
> 你的桌面,不止一面。
`LanMontainDesktop` 是一个基于 Avalonia 的桌面壳层项目,目标不是“做一个启动器”,而是把桌面变成可编排的信息与交互空间。
`LanMountainDesktop` 是一个基于 Avalonia 的桌面壳层项目,目标不是“做一个启动器”,而是把桌面变成可编排的信息与交互空间。
## 项目定位
- 以网格化布局组织桌面组件,支持多页桌面与组件自由摆放。
@@ -18,10 +18,10 @@
- 本地化:内置 `zh-CN``en-US` 资源。
## 工程结构
- `LanMontainDesktop/`桌面端主程序Avalonia
- `LanMontainDesktop.RecommendationBackend/`推荐内容后端服务ASP.NET Core Minimal API
- `LanMountainDesktop/`桌面端主程序Avalonia
- `LanMountainDesktop.RecommendationBackend/`推荐内容后端服务ASP.NET Core Minimal API
- `docs/`:视觉与圆角等规范文档。
- `LanMontainDesktop/ComponentSystem/`:组件定义、注册、放置规则与扩展入口。
- `LanMountainDesktop/ComponentSystem/`:组件定义、注册、放置规则与扩展入口。
## 技术栈
- .NET 10`net10.0`
@@ -33,11 +33,11 @@
## 扩展机制(摘要)
- 组件系统通过 `ComponentRegistry` 合并内置组件与扩展组件。
- 运行时会扫描 `Extensions/Components/*.json`(相对应用输出目录)加载第三方组件清单。
- 扩展契约与字段说明见组件系统文档:`LanMontainDesktop/ComponentSystem/README.md`
- 扩展契约与字段说明见组件系统文档:`LanMountainDesktop/ComponentSystem/README.md`
## 当前状态
- 项目包含桌面端与推荐后端两个子项目,并在同一 solution 中维护。
- 配置默认写入本地:`%LOCALAPPDATA%\LanMontainDesktop\settings.json`
- 配置默认写入本地:`%LOCALAPPDATA%\LanMountainDesktop\settings.json`
- 当前体验以 Windows 为主要目标平台。
## 运行说明

View File

@@ -1,4 +1,4 @@
# 版本号自动同步说明
# 版本号自动同步说明
## 📋 概述
@@ -48,15 +48,15 @@ sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" file.csproj
### 3. 构建和发布
更新后的版本号被用于:
- 程序集版本 (`AssemblyVersion`)
- 包文件名 (`LanMontainDesktop-1.0.1-win-x64.zip`)
- 包文件名 (`LanMountainDesktop-1.0.1-win-x64.zip`)
- 应用内显示 (About 页面)
- GitHub Release 标题
## 📍 涉及的文件
自动更新的文件:
1. `LanMontainDesktop/LanMontainDesktop.csproj`
2. `LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj`
1. `LanMountainDesktop/LanMountainDesktop.csproj`
2. `LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj`
## ✅ 使用流程

View File

@@ -1,8 +1,8 @@
# GitHub CI/CD Workflow Setup Guide
# GitHub CI/CD Workflow Setup Guide
## Overview
This document describes the CI/CD workflows configured for LanMontainDesktop. These workflows are designed to maintain code quality, automate testing, and streamline the release process.
This document describes the CI/CD workflows configured for LanMountainDesktop. These workflows are designed to maintain code quality, automate testing, and streamline the release process.
## Workflows
@@ -10,7 +10,7 @@ This document describes the CI/CD workflows configured for LanMontainDesktop. Th
**Trigger:** Every push/PR to main branches, or manual dispatch
**What it does:**
- Builds both LanMontainDesktop and RecommendationBackend in Debug and Release modes
- Builds both LanMountainDesktop and RecommendationBackend in Debug and Release modes
- Runs unit tests (if available)
- Uploads build artifacts for inspection
- Runs on Windows (windows-latest)
@@ -54,7 +54,7 @@ QODANA_ENDPOINT=https://qodana.cloud
| macOS | x64, arm64 (Apple Silicon) | .tar.gz | ✅ Full support |
**Build Scripts:**
- Windows: Uses PowerShell (`LanMontainDesktop\scripts\package.ps1`)
- Windows: Uses PowerShell (`LanMountainDesktop\scripts\package.ps1`)
- Linux/macOS: Uses Bash (`scripts/build.sh`)
**Usage:**
@@ -109,22 +109,22 @@ To align with CI workflows, set up your local environment:
dotnet restore
# Build (like CI does)
dotnet build LanMontainDesktop/LanMontainDesktop.csproj
dotnet build LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
dotnet build LanMountainDesktop/LanMountainDesktop.csproj
dotnet build LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
# Format code locally (required by CI)
dotnet format
# Run tests
dotnet test LanMontainDesktop/LanMontainDesktop.csproj
dotnet test LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
dotnet test LanMountainDesktop/LanMountainDesktop.csproj
dotnet test LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
# Alternative: Use local build scripts (Linux/macOS)
./scripts/build.sh --rid linux-x64 --version 1.0.0
./scripts/build.sh --rid osx-x64 --version 1.0.0
# Or on Windows with the PowerShell script
./LanMontainDesktop/scripts/package.ps1 -RuntimeIdentifier win-x64 -Version 1.0.0
./LanMountainDesktop/scripts/package.ps1 -RuntimeIdentifier win-x64 -Version 1.0.0
```
### Cross-Platform Build Scripts
@@ -150,10 +150,10 @@ chmod +x scripts/build.sh
**Windows:**
```powershell
# Using PowerShell script
.\LanMontainDesktop\scripts\package.ps1 -RuntimeIdentifier win-x64 -Version 1.0.0
.\LanMountainDesktop\scripts\package.ps1 -RuntimeIdentifier win-x64 -Version 1.0.0
# Or use dotnet directly
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj `
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj `
-c Release -r win-x64 -o ./publish/win-x64 `
-p:PublishSingleFile=true --self-contained
```
@@ -210,7 +210,7 @@ git push origin v1.0.0
### Status Badge
Add to your README.md:
```markdown
![Build Status](https://github.com/YOUR_ORG/LanMontainDesktop/workflows/Build%20&%20Test/badge.svg)
![Build Status](https://github.com/YOUR_ORG/LanMountainDesktop/workflows/Build%20&%20Test/badge.svg)
```
### Check Workflow Status

View File

@@ -1,4 +1,4 @@
name: Build
name: Build
on:
push:
@@ -7,7 +7,7 @@ on:
env:
DOTNET_VERSION: '10.0.x'
Solution_Name: LanMontainDesktop.sln
Solution_Name: LanMountainDesktop.sln
jobs:
build-windows:
@@ -41,8 +41,8 @@ jobs:
with:
name: build-windows-${{ matrix.configuration }}
path: |
LanMontainDesktop/bin/${{ matrix.configuration }}/
LanMontainDesktop.RecommendationBackend/bin/${{ matrix.configuration }}/
LanMountainDesktop/bin/${{ matrix.configuration }}/
LanMountainDesktop.RecommendationBackend/bin/${{ matrix.configuration }}/
retention-days: 7
build-linux:
@@ -80,8 +80,8 @@ jobs:
with:
name: build-linux
path: |
LanMontainDesktop/bin/Release/
LanMontainDesktop.RecommendationBackend/bin/Release/
LanMountainDesktop/bin/Release/
LanMountainDesktop.RecommendationBackend/bin/Release/
retention-days: 7
build-macos:
@@ -111,6 +111,6 @@ jobs:
with:
name: build-macos
path: |
LanMontainDesktop/bin/Release/
LanMontainDesktop.RecommendationBackend/bin/Release/
LanMountainDesktop/bin/Release/
LanMountainDesktop.RecommendationBackend/bin/Release/
retention-days: 7

View File

@@ -1,4 +1,4 @@
name: Quality Check
name: Quality Check
on:
pull_request:
@@ -8,7 +8,7 @@ on:
env:
DOTNET_VERSION: '10.0.x'
Solution_Name: LanMontainDesktop.sln
Solution_Name: LanMountainDesktop.sln
jobs:
analyze:

View File

@@ -1,4 +1,4 @@
name: Release
name: Release
on:
push:
@@ -18,7 +18,7 @@ on:
env:
DOTNET_VERSION: '10.0.x'
Solution_Name: LanMontainDesktop.sln
Solution_Name: LanMountainDesktop.sln
jobs:
prepare:
@@ -65,8 +65,8 @@ jobs:
run: |
$VERSION = "${{ needs.prepare.outputs.version }}"
$csprojFiles = @(
"LanMontainDesktop/LanMontainDesktop.csproj",
"LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj"
"LanMountainDesktop/LanMountainDesktop.csproj",
"LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj"
)
foreach ($csprojPath in $csprojFiles) {
@@ -85,7 +85,7 @@ jobs:
- name: Publish
run: |
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj `
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj `
-c Release `
-o ./publish/windows-${{ matrix.arch }} `
--self-contained `
@@ -99,7 +99,7 @@ jobs:
$version = "${{ needs.prepare.outputs.version }}"
$arch = "${{ matrix.arch }}"
$source = "publish/windows-$arch"
$package = "LanMontainDesktop-$version-win-$arch"
$package = "LanMountainDesktop-$version-win-$arch"
New-Item -ItemType Directory -Path "$package" -Force | Out-Null
Copy-Item -Path "$source/*" -Destination "$package" -Recurse -Force
@@ -112,7 +112,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: release-windows-${{ matrix.arch }}
path: LanMontainDesktop-*.zip
path: LanMountainDesktop-*.zip
retention-days: 30
build-linux:
@@ -145,11 +145,11 @@ jobs:
- name: Update version in .csproj
run: |
VERSION="${{ needs.prepare.outputs.version }}"
echo "Updating version in LanMontainDesktop.csproj to $VERSION"
sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMontainDesktop/LanMontainDesktop.csproj
echo "Updating version in LanMountainDesktop.csproj to $VERSION"
sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMountainDesktop/LanMountainDesktop.csproj
echo "Updating version in LanMontainDesktop.RecommendationBackend.csproj to $VERSION"
sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
echo "Updating version in LanMountainDesktop.RecommendationBackend.csproj to $VERSION"
sed -i "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
- name: Restore
run: dotnet restore ${{ env.Solution_Name }}
@@ -159,7 +159,7 @@ jobs:
- name: Publish
run: |
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj \
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj \
-c Release \
-o ./publish/linux-x64 \
--self-contained \
@@ -171,7 +171,7 @@ jobs:
run: |
version="${{ needs.prepare.outputs.version }}"
source="publish/linux-x64"
package_name="lanmontaindesktop"
package_name="LanMountainDesktop"
package_version="${version}"
arch="amd64"
@@ -195,7 +195,7 @@ jobs:
EOF
# Set proper permissions
chmod 755 "build-deb/usr/local/bin/LanMontainDesktop"
chmod 755 "build-deb/usr/local/bin/LanMountainDesktop"
# Create DEB file
dpkg-deb --build "build-deb" "${package_name}_${package_version}_${arch}.deb"
@@ -233,11 +233,11 @@ jobs:
- name: Update version in .csproj
run: |
VERSION="${{ needs.prepare.outputs.version }}"
echo "Updating version in LanMontainDesktop.csproj to $VERSION"
sed -i '' "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMontainDesktop/LanMontainDesktop.csproj
echo "Updating version in LanMountainDesktop.csproj to $VERSION"
sed -i '' "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMountainDesktop/LanMountainDesktop.csproj
echo "Updating version in LanMontainDesktop.RecommendationBackend.csproj to $VERSION"
sed -i '' "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
echo "Updating version in LanMountainDesktop.RecommendationBackend.csproj to $VERSION"
sed -i '' "s/<Version>.*<\/Version>/<Version>$VERSION<\/Version>/" LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
- name: Restore
run: dotnet restore ${{ env.Solution_Name }}
@@ -247,7 +247,7 @@ jobs:
- name: Publish
run: |
dotnet publish LanMontainDesktop/LanMontainDesktop.csproj \
dotnet publish LanMountainDesktop/LanMountainDesktop.csproj \
-c Release \
-o ./publish/macos-${{ matrix.arch }} \
--self-contained \
@@ -260,7 +260,7 @@ jobs:
version="${{ needs.prepare.outputs.version }}"
arch="${{ matrix.arch }}"
source="publish/macos-$arch"
app_name="LanMontainDesktop"
app_name="LanMountainDesktop"
package_name="${app_name}-${version}-macos-${arch}"
# Create app bundle structure
@@ -277,7 +277,7 @@ jobs:
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>LanMontainDesktop</string>
<string>LanMountainDesktop</string>
<key>CFBundleName</key>
<string>LanMountain Desktop</string>
<key>CFBundleVersion</key>

Binary file not shown.

View File

@@ -1,7 +1,7 @@
using System;
using System;
using System.Collections.Generic;
namespace LanMontainDesktop.RecommendationBackend.Models;
namespace LanMountainDesktop.RecommendationBackend.Models;
public sealed record DailyQuoteSnapshot(
string Provider,

View File

@@ -1,5 +1,5 @@
using System;
using LanMontainDesktop.RecommendationBackend.Services;
using System;
using LanMountainDesktop.RecommendationBackend.Services;
var builder = WebApplication.CreateBuilder(args);
@@ -13,7 +13,7 @@ var app = builder.Build();
app.MapGet("/health", () => Results.Ok(new
{
service = "LanMontainDesktop.RecommendationBackend",
service = "LanMountainDesktop.RecommendationBackend",
status = "ok",
timestamp = DateTimeOffset.UtcNow
}));

View File

@@ -1,4 +1,4 @@
# LanMontainDesktop Recommendation Backend
# LanMountainDesktop Recommendation Backend
信息推荐后端,提供统一抓取与聚合接口,当前覆盖:
- 每日一言
@@ -10,7 +10,7 @@
## 启动
```bash
dotnet run --project LanMontainDesktop.RecommendationBackend/LanMontainDesktop.RecommendationBackend.csproj
dotnet run --project LanMountainDesktop.RecommendationBackend/LanMountainDesktop.RecommendationBackend.csproj
```
默认监听地址以 `dotnet` 输出为准(通常是 `http://localhost:5xxx``https://localhost:7xxx`)。

View File

@@ -1,9 +1,9 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using LanMontainDesktop.RecommendationBackend.Models;
using LanMountainDesktop.RecommendationBackend.Models;
namespace LanMontainDesktop.RecommendationBackend.Services;
namespace LanMountainDesktop.RecommendationBackend.Services;
public sealed record DailyQuoteQuery(
string? Locale = null,

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@@ -8,9 +8,9 @@ using System.Text.Json;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using LanMontainDesktop.RecommendationBackend.Models;
using LanMountainDesktop.RecommendationBackend.Models;
namespace LanMontainDesktop.RecommendationBackend.Services;
namespace LanMountainDesktop.RecommendationBackend.Services;
public sealed record RecommendationApiOptions
{

View File

@@ -1,11 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanMontainDesktop", "LanMontainDesktop\LanMontainDesktop.csproj", "{00000001-0000-0000-0000-000000000001}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanMountainDesktop", "LanMountainDesktop\LanMountainDesktop.csproj", "{00000001-0000-0000-0000-000000000001}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanMontainDesktop.RecommendationBackend", "LanMontainDesktop.RecommendationBackend\LanMontainDesktop.RecommendationBackend.csproj", "{00000002-0000-0000-0000-000000000002}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LanMountainDesktop.RecommendationBackend", "LanMountainDesktop.RecommendationBackend\LanMountainDesktop.RecommendationBackend.csproj", "{00000002-0000-0000-0000-000000000002}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -1,4 +1,4 @@
name: Desktop CI
name: Desktop CI
on:
push:
@@ -20,7 +20,7 @@ concurrency:
env:
DOTNET_VERSION: "10.0.x"
PROJECT_PATH: "LanMontainDesktop.csproj"
PROJECT_PATH: "LanMountainDesktop.csproj"
jobs:
validate:
@@ -114,17 +114,17 @@ jobs:
- name: Windows
runner: windows-latest
rid: win-x64
artifact_name: LanMontainDesktop-Setup
artifact_name: LanMountainDesktop-Setup
artifact_path: artifacts/installer/*.exe
- name: Linux
runner: ubuntu-latest
rid: linux-x64
artifact_name: LanMontainDesktop-linux-x64
artifact_name: LanMountainDesktop-linux-x64
artifact_path: artifacts/packages/*linux-x64*.zip
- name: macOS
runner: macos-latest
rid: osx-x64
artifact_name: LanMontainDesktop-osx-x64
artifact_name: LanMountainDesktop-osx-x64
artifact_path: artifacts/packages/*osx-x64*.zip
permissions:
contents: read
@@ -176,7 +176,7 @@ jobs:
if: matrix.rid == 'win-x64'
uses: actions/upload-artifact@v4
with:
name: LanMontainDesktop-Publish-win-x64-${{ needs.resolve_version.outputs.value }}
name: LanMountainDesktop-Publish-win-x64-${{ needs.resolve_version.outputs.value }}
path: artifacts/publish/win-x64/**
if-no-files-found: error
@@ -193,19 +193,19 @@ jobs:
- name: Download Windows Installer Artifact
uses: actions/download-artifact@v4
with:
name: LanMontainDesktop-Setup-${{ needs.resolve_version.outputs.value }}
name: LanMountainDesktop-Setup-${{ needs.resolve_version.outputs.value }}
path: release-assets/windows
- name: Download Linux Package Artifact
uses: actions/download-artifact@v4
with:
name: LanMontainDesktop-linux-x64-${{ needs.resolve_version.outputs.value }}
name: LanMountainDesktop-linux-x64-${{ needs.resolve_version.outputs.value }}
path: release-assets/linux
- name: Download macOS Package Artifact
uses: actions/download-artifact@v4
with:
name: LanMontainDesktop-osx-x64-${{ needs.resolve_version.outputs.value }}
name: LanMountainDesktop-osx-x64-${{ needs.resolve_version.outputs.value }}
path: release-assets/macos
- name: Attach Artifacts

View File

@@ -1,14 +1,14 @@
<Application xmlns="https://github.com/avaloniaui"
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sty="using:FluentAvalonia.Styling"
xmlns:fi="using:FluentIcons.Avalonia"
x:Class="LanMontainDesktop.App"
xmlns:local="using:LanMontainDesktop"
x:Class="LanMountainDesktop.App"
xmlns:local="using:LanMountainDesktop"
RequestedThemeVariant="Default">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
<Application.Resources>
<FontFamily x:Key="AppFontFamily">avares://LanMontainDesktop/Assets/Fonts#MiSans</FontFamily>
<FontFamily x:Key="AppFontFamily">avares://LanMountainDesktop/Assets/Fonts#MiSans</FontFamily>
</Application.Resources>
<Application.DataTemplates>
@@ -17,8 +17,8 @@
<Application.Styles>
<sty:FluentAvaloniaTheme />
<StyleInclude Source="avares://LanMontainDesktop/Styles/GlassModule.axaml" />
<StyleInclude Source="avares://LanMontainDesktop/Styles/SettingsAnimations.axaml" />
<StyleInclude Source="avares://LanMountainDesktop/Styles/GlassModule.axaml" />
<StyleInclude Source="avares://LanMountainDesktop/Styles/SettingsAnimations.axaml" />
<Style Selector="Window">
<Setter Property="FontFamily" Value="{DynamicResource AppFontFamily}" />

View File

@@ -1,14 +1,14 @@
using Avalonia;
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Data.Core;
using Avalonia.Data.Core.Plugins;
using System.Linq;
using Avalonia.Markup.Xaml;
using LanMontainDesktop.ViewModels;
using LanMontainDesktop.Views;
using LanMountainDesktop.ViewModels;
using LanMountainDesktop.Views;
using AvaloniaWebView;
namespace LanMontainDesktop;
namespace LanMountainDesktop;
public partial class App : Application
{

View File

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 422 B

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 754 B

After

Width:  |  Height:  |  Size: 754 B

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 660 B

After

Width:  |  Height:  |  Size: 660 B

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 77 KiB

View File

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 260 B

View File

Before

Width:  |  Height:  |  Size: 477 B

After

Width:  |  Height:  |  Size: 477 B

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 152 B

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 683 B

After

Width:  |  Height:  |  Size: 683 B

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 169 KiB

View File

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 197 KiB

View File

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 244 KiB

View File

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View File

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 194 KiB

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

Before

Width:  |  Height:  |  Size: 172 KiB

After

Width:  |  Height:  |  Size: 172 KiB

View File

@@ -1,10 +1,10 @@
using System;
using System;
using System.Linq;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Threading;
namespace LanMontainDesktop.Behaviors;
namespace LanMountainDesktop.Behaviors;
public class PanelIntroAnimationBehavior
{

View File

@@ -1,11 +1,11 @@
using System;
using System;
using Avalonia;
using Avalonia.Animation.Easings;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Rendering.Composition;
namespace LanMontainDesktop.Behaviors;
namespace LanMountainDesktop.Behaviors;
public class PopupIntroAnimationBehavior
{

View File

@@ -1,4 +1,4 @@
namespace LanMontainDesktop.ComponentSystem;
namespace LanMountainDesktop.ComponentSystem;
public static class BuiltInComponentIds
{

View File

@@ -1,6 +1,6 @@
using System;
using System;
namespace LanMontainDesktop.ComponentSystem;
namespace LanMountainDesktop.ComponentSystem;
public static class ComponentPlacementRules
{

View File

@@ -1,9 +1,9 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using LanMontainDesktop.ComponentSystem.Extensions;
using LanMountainDesktop.ComponentSystem.Extensions;
namespace LanMontainDesktop.ComponentSystem;
namespace LanMountainDesktop.ComponentSystem;
public sealed class ComponentRegistry
{

View File

@@ -1,4 +1,4 @@
namespace LanMontainDesktop.ComponentSystem;
namespace LanMountainDesktop.ComponentSystem;
public sealed record DesktopComponentDefinition(
string Id,

View File

@@ -1,4 +1,4 @@
namespace LanMontainDesktop.ComponentSystem;
namespace LanMountainDesktop.ComponentSystem;
public enum DesktopComponentResizeMode
{

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic;
using System.Collections.Generic;
namespace LanMontainDesktop.ComponentSystem.Extensions;
namespace LanMountainDesktop.ComponentSystem.Extensions;
public interface IComponentExtensionProvider
{

View File

@@ -1,9 +1,9 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.Json;
namespace LanMontainDesktop.ComponentSystem.Extensions;
namespace LanMountainDesktop.ComponentSystem.Extensions;
public sealed class JsonComponentExtensionProvider : IComponentExtensionProvider
{

View File

@@ -1,5 +1,5 @@
{
"app.title": "LanMontainDesktop",
"app.title": "LanMountainDesktop",
"button.back_to_windows": "Back to Windows",
"tooltip.back_to_windows": "Back to Windows",
"tooltip.open_settings": "Settings",
@@ -184,7 +184,7 @@
"settings.about.version_format": "Version: {0}",
"settings.about.codename_format": "Code Name: {0}",
"settings.about.font_format": "Font: {0}",
"settings.footer": "LanMontainDesktop Settings",
"settings.footer": "LanMountainDesktop Settings",
"filepicker.title": "Select wallpaper",
"filepicker.image_files": "Image files",
"filepicker.video_files": "Video files",

View File

@@ -1,5 +1,5 @@
{
"app.title": "LanMontainDesktop",
"app.title": "LanMountainDesktop",
"button.back_to_windows": "回到Windows",
"tooltip.back_to_windows": "回到Windows",
"tooltip.open_settings": "设置",
@@ -184,7 +184,7 @@
"settings.about.version_format": "版本号: {0}",
"settings.about.codename_format": "版本代号: {0}",
"settings.about.font_format": "字体: {0}",
"settings.footer": "LanMontainDesktop 设置",
"settings.footer": "LanMountainDesktop 设置",
"filepicker.title": "选择壁纸",
"filepicker.image_files": "图片文件",
"filepicker.video_files": "视频文件",

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic;
using System.Collections.Generic;
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed class AppSettingsSnapshot
{

View File

@@ -1,7 +1,7 @@
using System;
using System;
using System.Collections.Generic;
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed record ClassIslandScheduleReadResult(
bool Success,

View File

@@ -1,4 +1,4 @@
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed class DesktopComponentPlacementSnapshot
{

View File

@@ -1,4 +1,4 @@
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed class ImportedClassScheduleSnapshot
{

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Avalonia.Media;
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed record MonetPalette(
IReadOnlyList<Color> RecommendedColors,

View File

@@ -1,6 +1,6 @@
using System;
using System;
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed record DailyArtworkSnapshot(
string Provider,

View File

@@ -1,4 +1,4 @@
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed class StartMenuAppEntry
{

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed class StartMenuFolderNode
{

View File

@@ -1,7 +1,7 @@
using System;
using System;
using System.Collections.Generic;
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public enum StudyAnalyticsRuntimeState
{

View File

@@ -1,4 +1,4 @@
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public enum TaskbarActionId
{

View File

@@ -1,4 +1,4 @@
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed record TaskbarActionItem(
TaskbarActionId Id,

View File

@@ -1,4 +1,4 @@
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public enum TaskbarContext
{

View File

@@ -1,7 +1,7 @@
using System;
using System;
using System.Collections.Generic;
namespace LanMontainDesktop.Models;
namespace LanMountainDesktop.Models;
public sealed record WeatherLocation(
string Name,

View File

@@ -1,4 +1,4 @@
# Desktop Packaging Guide
# Desktop Packaging Guide
## Prerequisites
- Install `.NET SDK 10`
@@ -23,7 +23,7 @@ pwsh ./scripts/package.ps1 -RuntimeIdentifier linux-x64 -Version 1.0.1
Output:
- Published files: `artifacts/publish/linux-x64`
- Zip package: `artifacts/packages/LanMontainDesktop-1.0.1-linux-x64.zip`
- Zip package: `artifacts/packages/LanMountainDesktop-1.0.1-linux-x64.zip`
### macOS package (`osx-x64`)
```powershell
@@ -32,7 +32,7 @@ pwsh ./scripts/package.ps1 -RuntimeIdentifier osx-x64 -Version 1.0.1
Output:
- Published files: `artifacts/publish/osx-x64`
- Zip package: `artifacts/packages/LanMontainDesktop-1.0.1-osx-x64.zip`
- Zip package: `artifacts/packages/LanMountainDesktop-1.0.1-osx-x64.zip`
## Optional script flags
```powershell

View File

@@ -1,8 +1,8 @@
using Avalonia;
using Avalonia;
using Avalonia.WebView.Desktop;
using System;
namespace LanMontainDesktop;
namespace LanMountainDesktop;
sealed class Program
{

View File

@@ -1,9 +1,9 @@
using System;
using System;
using System.IO;
using System.Text.Json;
using LanMontainDesktop.Models;
using LanMountainDesktop.Models;
namespace LanMontainDesktop.Services;
namespace LanMountainDesktop.Services;
public sealed class AppSettingsService
{
@@ -17,7 +17,7 @@ public sealed class AppSettingsService
public AppSettingsService()
{
var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
var settingsDirectory = Path.Combine(appData, "LanMontainDesktop");
var settingsDirectory = Path.Combine(appData, "LanMountainDesktop");
_settingsPath = Path.Combine(settingsDirectory, "settings.json");
}

Some files were not shown because too many files have changed in this diff Show More