From 758f6772c643fe532918ca2a1dde08c8dbaff4bc Mon Sep 17 00:00:00 2001 From: ShaoHua <345265198@qqcom> Date: Mon, 6 Apr 2026 22:06:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=9B=B4=E6=8D=A2=E8=BD=AF=E4=BB=B6=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E4=B8=BAAGPL=202.=E5=88=87=E6=8D=A2=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=B8=BAHua.Todo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 8 +- .vscode/launch.json | 4 +- .vscode/tasks.json | 6 +- Hua.Todo.slnx | 18 + LICENSE | 664 ++++++++++++++++++ LICENSE.zh-CN | 229 ++++++ README.md | 34 +- TodoList.slnx | 13 - docs/Android_NotFound_排查计划.md | 20 +- docs/产品需求文档-1.1.0.md | 4 +- docs/产品需求文档.md | 4 +- docs/代码规范文档.md | 6 +- docs/实现对比文档.md | 10 +- docs/技术设计文档.md | 34 +- publish.ps1 | 6 +- restart-web.ps1 | 14 +- .../Data/TodoDbContext.cs | 4 +- .../DynamicApi/DynamicApiExtensions.cs | 2 +- .../DynamicApi/DynamicApiMiddleware.cs | 4 +- .../DynamicApi/HttpAttributes.cs | 2 +- .../DynamicApi/ParameterBindingAttributes.cs | 2 +- .../DynamicApi/RemoteServiceAttribute.cs | 2 +- .../Hua.Todo.Application.csproj} | 2 +- .../Interfaces/IDynamicApiService.cs | 5 + .../Interfaces/ITaskService.cs | 4 +- .../20260313044926_InitialCreate.Designer.cs | 6 +- .../20260313044926_InitialCreate.cs | 2 +- ...20260313092658_AddParentTaskId.Designer.cs | 12 +- .../20260313092658_AddParentTaskId.cs | 2 +- .../Migrations/TodoDbContextModelSnapshot.cs | 12 +- .../Models/TaskModels.cs | 4 +- .../Properties/launchSettings.json | 2 +- .../Repositories/TaskRepository.cs | 8 +- .../ServiceCollectionExtensions.cs | 16 +- .../Services/TaskService.cs | 10 +- .../Entities/TaskEntity.cs | 4 +- .../Entities/TaskPriority.cs | 2 +- .../Hua.Todo.Core.csproj} | 0 .../Interfaces/ITaskRepository.cs | 4 +- .../Hua.Todo.Host.csproj} | 2 +- .../Program.cs | 12 +- .../Properties/launchSettings.json | 0 .../appsettings.Development.json | 0 .../appsettings.json | 0 src/{TodoList.Maui => Hua.Todo.Maui}/App.xaml | 4 +- .../App.xaml.cs | 14 +- .../AppShell.xaml | 8 +- .../AppShell.xaml.cs | 2 +- .../Converters/PriorityToColorConverter.cs | 2 +- .../Hua.Todo.Maui.csproj} | 58 +- .../Hua.Todo.Maui.csproj.DotSettings} | 0 .../MauiProgram.cs | 42 +- .../Models/AppSettings.cs | 2 +- .../Models/HotKeyConfig.cs | 2 +- .../Models/QuickEntryData.cs | 2 +- .../Models/TodoItem.cs | 4 +- .../Android/AndroidAssetFileProvider.cs | 2 +- .../Platforms/Android/AndroidManifest.xml | 0 .../Platforms/Android/MainActivity.cs | 2 +- .../Platforms/Android/MainApplication.cs | 2 +- .../Android/MobileEmbeddedWebServerService.cs | 8 +- .../Android/Resources/drawable/appicon.xml | 0 .../Resources/drawable/appicon_round.xml | 0 .../Android/Resources/values/colors.xml | 0 .../Resources/xml/network_security_config.xml | 0 .../Platforms/MacCatalyst}/AppDelegate.cs | 2 +- .../Platforms/MacCatalyst/Entitlements.plist | 0 .../Platforms/MacCatalyst/Info.plist | 0 .../Platforms/MacCatalyst/Program.cs | 2 +- .../Platforms/Windows/App.xaml | 4 +- .../Platforms/Windows/App.xaml.cs | 2 +- .../Platforms/Windows/Package.appxmanifest | 0 .../Windows/WindowsKeyboardHandler.cs | 2 +- .../Platforms/Windows/WindowsWindowService.cs | 2 +- .../Platforms/Windows/app.manifest | 2 +- .../Platforms/iOS}/AppDelegate.cs | 2 +- .../Platforms/iOS/Info.plist | 0 .../Platforms/iOS/Program.cs | 2 +- .../iOS/Resources/PrivacyInfo.xcprivacy | 0 .../README.md | 18 +- .../Resources/AppIcon/appicon.svg | 0 .../Resources/AppIcon/appiconfg.svg | 0 .../Resources/Fonts/OpenSans-Regular.ttf | Bin .../Resources/Fonts/OpenSans-Semibold.ttf | Bin .../Resources/Images/app_titlebar_icon.svg | 0 .../Resources/Images/dotnet_bot.png | Bin .../Resources/Images/titlebar_icon.png | Bin .../Resources/Raw/AboutAssets.txt | 0 .../Resources/Splash/splash.svg | 0 .../Resources/Styles/Colors.xaml | 0 .../Resources/Styles/Styles.xaml | 0 .../Services/AppMetadata.cs | 2 +- .../Services/EmbeddedWebServerService.cs | 14 +- .../Services/GlobalHotKeyServiceFactory.cs | 4 +- .../Services/HotKeySettingsService.cs | 4 +- .../Services/IEmbeddedWebServerService.cs | 2 +- .../Services/IGlobalHotKeyService.cs | 2 +- .../Services/ISystemTrayService.cs | 2 +- .../Services/NoopEmbeddedWebServerService.cs | 2 +- .../Platforms/MacGlobalHotKeyService.cs | 2 +- .../Platforms/MobileGlobalHotKeyService.cs | 4 +- .../Platforms/WindowsGlobalHotKeyService.cs | 2 +- .../Platforms/WindowsSystemTrayService.cs | 4 +- .../Views/MainPage.xaml | 2 +- .../Views/MainPage.xaml.cs | 6 +- .../appsettings.json | 0 src/{TodoList.Maui => Hua.Todo.Maui}/icon.ico | Bin src/{TodoList.Maui => Hua.Todo.Maui}/icon.jpg | Bin .../setup.iss | 6 +- src/{TodoList.Web => Hua.Todo.Web}/.gitignore | 0 .../.vite/deps/_metadata.json | 0 .../.vite/deps/axios.js | 0 .../.vite/deps/axios.js.map | 0 .../.vite/deps/package.json | 0 .../.vite/deps/vue.js | 0 .../.vite/deps/vue.js.map | 0 .../.vscode/extensions.json | 0 src/{TodoList.Web => Hua.Todo.Web}/README.md | 0 src/{TodoList.Web => Hua.Todo.Web}/index.html | 2 +- .../package-lock.json | 4 +- .../package.json | 3 +- .../public/favicon.svg | 0 .../public/icons.svg | 0 .../src/App.vue | 0 .../src/api/client.ts | 0 .../src/api/tasks.ts | 0 .../src/assets/hero.png | Bin .../src/assets/vite.svg | 0 .../src/assets/vue.svg | 0 .../src/components/HelloWorld.vue | 0 .../src/components/HotKeySettingsDialog.vue | 0 .../src/components/TaskEditDialog.vue | 0 .../src/components/TaskItem.vue | 0 .../src/components/TaskList.vue | 0 .../src/main.ts | 0 .../src/services/localStorageService.ts | 4 +- .../src/services/taskNormalizer.ts | 0 .../src/style.css | 0 .../src/types/task.ts | 0 .../tsconfig.app.json | 0 .../tsconfig.json | 0 .../tsconfig.node.json | 0 .../vite.config.ts | 0 .../Interfaces/IDynamicApiService.cs | 5 - start-forend.ps1 | 16 +- start-maui.ps1 | 20 +- 项目结构说明.md | 344 --------- 147 files changed, 1203 insertions(+), 644 deletions(-) create mode 100644 Hua.Todo.slnx create mode 100644 LICENSE create mode 100644 LICENSE.zh-CN delete mode 100644 TodoList.slnx rename src/{TodoList.Application => Hua.Todo.Application}/Data/TodoDbContext.cs (94%) rename src/{TodoList.Application => Hua.Todo.Application}/DynamicApi/DynamicApiExtensions.cs (84%) rename src/{TodoList.Application => Hua.Todo.Application}/DynamicApi/DynamicApiMiddleware.cs (99%) rename src/{TodoList.Application => Hua.Todo.Application}/DynamicApi/HttpAttributes.cs (96%) rename src/{TodoList.Application => Hua.Todo.Application}/DynamicApi/ParameterBindingAttributes.cs (84%) rename src/{TodoList.Application => Hua.Todo.Application}/DynamicApi/RemoteServiceAttribute.cs (86%) rename src/{TodoList.Application/TodoList.Application.csproj => Hua.Todo.Application/Hua.Todo.Application.csproj} (91%) create mode 100644 src/Hua.Todo.Application/Interfaces/IDynamicApiService.cs rename src/{TodoList.Application => Hua.Todo.Application}/Interfaces/ITaskService.cs (86%) rename src/{TodoList.Application => Hua.Todo.Application}/Migrations/20260313044926_InitialCreate.Designer.cs (93%) rename src/{TodoList.Application => Hua.Todo.Application}/Migrations/20260313044926_InitialCreate.cs (97%) rename src/{TodoList.Application => Hua.Todo.Application}/Migrations/20260313092658_AddParentTaskId.Designer.cs (88%) rename src/{TodoList.Application => Hua.Todo.Application}/Migrations/20260313092658_AddParentTaskId.cs (97%) rename src/{TodoList.Application => Hua.Todo.Application}/Migrations/TodoDbContextModelSnapshot.cs (87%) rename src/{TodoList.Application => Hua.Todo.Application}/Models/TaskModels.cs (94%) rename src/{TodoList.Application => Hua.Todo.Application}/Properties/launchSettings.json (89%) rename src/{TodoList.Application => Hua.Todo.Application}/Repositories/TaskRepository.cs (93%) rename src/{TodoList.Application => Hua.Todo.Application}/ServiceCollectionExtensions.cs (63%) rename src/{TodoList.Application => Hua.Todo.Application}/Services/TaskService.cs (95%) rename src/{TodoList.Core => Hua.Todo.Core}/Entities/TaskEntity.cs (93%) rename src/{TodoList.Core => Hua.Todo.Core}/Entities/TaskPriority.cs (91%) rename src/{TodoList.Core/TodoList.Core.csproj => Hua.Todo.Core/Hua.Todo.Core.csproj} (100%) rename src/{TodoList.Core => Hua.Todo.Core}/Interfaces/ITaskRepository.cs (96%) rename src/{TodoList.Host/TodoList.Host.csproj => Hua.Todo.Host/Hua.Todo.Host.csproj} (90%) rename src/{TodoList.Host => Hua.Todo.Host}/Program.cs (71%) rename src/{TodoList.Host => Hua.Todo.Host}/Properties/launchSettings.json (100%) rename src/{TodoList.Host => Hua.Todo.Host}/appsettings.Development.json (100%) rename src/{TodoList.Host => Hua.Todo.Host}/appsettings.json (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/App.xaml (85%) rename src/{TodoList.Maui => Hua.Todo.Maui}/App.xaml.cs (96%) rename src/{TodoList.Maui => Hua.Todo.Maui}/AppShell.xaml (59%) rename src/{TodoList.Maui => Hua.Todo.Maui}/AppShell.xaml.cs (76%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Converters/PriorityToColorConverter.cs (95%) rename src/{TodoList.Maui/TodoList.Maui.csproj => Hua.Todo.Maui/Hua.Todo.Maui.csproj} (74%) rename src/{TodoList.Maui/TodoList.Maui.csproj.DotSettings => Hua.Todo.Maui/Hua.Todo.Maui.csproj.DotSettings} (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/MauiProgram.cs (78%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Models/AppSettings.cs (97%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Models/HotKeyConfig.cs (98%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Models/QuickEntryData.cs (93%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Models/TodoItem.cs (88%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Android/AndroidAssetFileProvider.cs (98%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Android/AndroidManifest.xml (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Android/MainActivity.cs (96%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Android/MainApplication.cs (92%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Android/MobileEmbeddedWebServerService.cs (99%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Android/Resources/drawable/appicon.xml (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Android/Resources/drawable/appicon_round.xml (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Android/Resources/values/colors.xml (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Android/Resources/xml/network_security_config.xml (100%) rename src/{TodoList.Maui/Platforms/iOS => Hua.Todo.Maui/Platforms/MacCatalyst}/AppDelegate.cs (87%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/MacCatalyst/Entitlements.plist (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/MacCatalyst/Info.plist (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/MacCatalyst/Program.cs (92%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Windows/App.xaml (73%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Windows/App.xaml.cs (95%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Windows/Package.appxmanifest (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Windows/WindowsKeyboardHandler.cs (98%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Windows/WindowsWindowService.cs (97%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/Windows/app.manifest (92%) rename src/{TodoList.Maui/Platforms/MacCatalyst => Hua.Todo.Maui/Platforms/iOS}/AppDelegate.cs (87%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/iOS/Info.plist (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/iOS/Program.cs (92%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Platforms/iOS/Resources/PrivacyInfo.xcprivacy (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/README.md (89%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/AppIcon/appicon.svg (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/AppIcon/appiconfg.svg (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/Fonts/OpenSans-Regular.ttf (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/Fonts/OpenSans-Semibold.ttf (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/Images/app_titlebar_icon.svg (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/Images/dotnet_bot.png (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/Images/titlebar_icon.png (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/Raw/AboutAssets.txt (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/Splash/splash.svg (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/Styles/Colors.xaml (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Resources/Styles/Styles.xaml (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/AppMetadata.cs (97%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/EmbeddedWebServerService.cs (92%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/GlobalHotKeyServiceFactory.cs (95%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/HotKeySettingsService.cs (96%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/IEmbeddedWebServerService.cs (81%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/IGlobalHotKeyService.cs (96%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/ISystemTrayService.cs (94%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/NoopEmbeddedWebServerService.cs (88%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/Platforms/MacGlobalHotKeyService.cs (99%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/Platforms/MobileGlobalHotKeyService.cs (97%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/Platforms/WindowsGlobalHotKeyService.cs (99%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Services/Platforms/WindowsSystemTrayService.cs (97%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Views/MainPage.xaml (81%) rename src/{TodoList.Maui => Hua.Todo.Maui}/Views/MainPage.xaml.cs (97%) rename src/{TodoList.Maui => Hua.Todo.Maui}/appsettings.json (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/icon.ico (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/icon.jpg (100%) rename src/{TodoList.Maui => Hua.Todo.Maui}/setup.iss (94%) rename src/{TodoList.Web => Hua.Todo.Web}/.gitignore (100%) rename src/{TodoList.Web => Hua.Todo.Web}/.vite/deps/_metadata.json (100%) rename src/{TodoList.Web => Hua.Todo.Web}/.vite/deps/axios.js (100%) rename src/{TodoList.Web => Hua.Todo.Web}/.vite/deps/axios.js.map (100%) rename src/{TodoList.Web => Hua.Todo.Web}/.vite/deps/package.json (100%) rename src/{TodoList.Web => Hua.Todo.Web}/.vite/deps/vue.js (100%) rename src/{TodoList.Web => Hua.Todo.Web}/.vite/deps/vue.js.map (100%) rename src/{TodoList.Web => Hua.Todo.Web}/.vscode/extensions.json (100%) rename src/{TodoList.Web => Hua.Todo.Web}/README.md (100%) rename src/{TodoList.Web => Hua.Todo.Web}/index.html (91%) rename src/{TodoList.Web => Hua.Todo.Web}/package-lock.json (99%) rename src/{TodoList.Web => Hua.Todo.Web}/package.json (90%) rename src/{TodoList.Web => Hua.Todo.Web}/public/favicon.svg (100%) rename src/{TodoList.Web => Hua.Todo.Web}/public/icons.svg (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/App.vue (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/api/client.ts (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/api/tasks.ts (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/assets/hero.png (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/assets/vite.svg (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/assets/vue.svg (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/components/HelloWorld.vue (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/components/HotKeySettingsDialog.vue (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/components/TaskEditDialog.vue (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/components/TaskItem.vue (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/components/TaskList.vue (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/main.ts (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/services/localStorageService.ts (95%) rename src/{TodoList.Web => Hua.Todo.Web}/src/services/taskNormalizer.ts (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/style.css (100%) rename src/{TodoList.Web => Hua.Todo.Web}/src/types/task.ts (100%) rename src/{TodoList.Web => Hua.Todo.Web}/tsconfig.app.json (100%) rename src/{TodoList.Web => Hua.Todo.Web}/tsconfig.json (100%) rename src/{TodoList.Web => Hua.Todo.Web}/tsconfig.node.json (100%) rename src/{TodoList.Web => Hua.Todo.Web}/vite.config.ts (100%) delete mode 100644 src/TodoList.Application/Interfaces/IDynamicApiService.cs delete mode 100644 项目结构说明.md diff --git a/.gitignore b/.gitignore index 321a810..12d6f65 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,7 @@ bld/ .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ -src/TodoList.Maui/wwwroot/ +src/Hua.Todo.Maui/wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ @@ -363,6 +363,6 @@ MigrationBackup/ # Fody - auto-generated XML schema FodyWeavers.xsd /Setup/Output -/TodoList/Output -/src/TodoList.Maui/Output -/src/TodoList.Host/todolist.db +/Hua.Todo/Output +/src/Hua.Todo.Maui/Output +/src/Hua.Todo.Host/Hua.Todo.db diff --git a/.vscode/launch.json b/.vscode/launch.json index 0532146..37b8cdd 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,9 +10,9 @@ "request": "launch", "preLaunchTask": "build", // 如果已更改目标框架,请确保更新程序路径。 - "program": "${workspaceFolder}/src/TodoList.Host/bin/Debug/net10.0/TodoList.Host.dll", + "program": "${workspaceFolder}/src/Hua.Todo.Host/bin/Debug/net10.0/Hua.Todo.Host.dll", "args": [], - "cwd": "${workspaceFolder}/src/TodoList.Host", + "cwd": "${workspaceFolder}/src/Hua.Todo.Host", "stopAtEntry": false, // 启用在启动 ASP.NET Core 时启动 Web 浏览器。有关详细信息: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser "serverReadyAction": { diff --git a/.vscode/tasks.json b/.vscode/tasks.json index bcea2f5..d4c67b0 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -7,7 +7,7 @@ "type": "process", "args": [ "build", - "${workspaceFolder}/src/TodoList.Host/TodoList.Host.csproj", + "${workspaceFolder}/src/Hua.Todo.Host/Hua.Todo.Host.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary;ForceNoAlign" ], @@ -19,7 +19,7 @@ "type": "process", "args": [ "publish", - "${workspaceFolder}/src/TodoList.Host/TodoList.Host.csproj", + "${workspaceFolder}/src/Hua.Todo.Host/Hua.Todo.Host.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary;ForceNoAlign" ], @@ -33,7 +33,7 @@ "watch", "run", "--project", - "${workspaceFolder}/src/TodoList.Host/TodoList.Host.csproj" + "${workspaceFolder}/src/Hua.Todo.Host/Hua.Todo.Host.csproj" ], "problemMatcher": "$msCompile" } diff --git a/Hua.Todo.slnx b/Hua.Todo.slnx new file mode 100644 index 0000000..688360a --- /dev/null +++ b/Hua.Todo.slnx @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5134384 --- /dev/null +++ b/LICENSE @@ -0,0 +1,664 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under + section 7. This requirement modifies the requirement in + section 4 to "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have received it separately. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has + interactive interfaces that do not display Appropriate Legal + Notices, your work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +Machine-Readable Corresponding Source under the terms of this +License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that + product model, to give anyone who possesses the object code + either (1) a copy of the Corresponding Source for all the + software in the product that is covered by this License, on a + durable physical medium customarily used for software + interchange, for a price no more than your reasonable cost of + physically performing this conveying of source, or (2) access to + copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in + accord with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to + the Corresponding Source in the same way through the same place + at no further charge. You need not require recipients to copy + the Corresponding Source along with the object code. If the + place to copy the object code is a network server, the + Corresponding Source may be on a different server (operated by + you or a third party) that supports equivalent copying + facilities, provided you maintain clear directions next to the + object code saying where the Corresponding Source is located. + Regardless of what server hosts the Corresponding Source, you + remain obligated to ensure that it is available for as long as + needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, +family, or household purposes, or (2) anything designed or sold for +incorporation into a dwelling. In determining whether a product is a +consumer product, doubtful cases shall be resolved in favor of +coverage. For a particular product received by a particular user, +"normally used" refers to a typical or common use of that class of +product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected +to use, the product. A product is a consumer product regardless of +whether the product has substantial commercial, industrial or +non-consumer uses, unless such uses represent the only significant +mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to +install and execute modified versions of a covered work in that User +Product from a modified version of its Corresponding Source. The +information must suffice to ensure that the continued functioning of +the modified object code is in no case prevented or interfered with +solely because modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a surcharge for exercising rights granted under this +License, and you may not impose any litigation (including a +cross-claim or counterclaim in a lawsuit) alleging that any patent +claim is infringed by making, using, selling, offering for sale, or +importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor +version, but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make +payment to the third party based on the extent of your activity of +conveying the work, and under which the third party grants, to any of +the parties who would receive the covered work from you, a +discriminatory patent license (a) in connection with copies of the +covered work conveyed by you (or copies made from those copies), or +(b) primarily for and in connection with specific products or +compilations that contain the covered work, unless you entered into +that arrangement, or that patent license was granted, prior to 28 +March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your +version supports such interaction) an opportunity to receive the +Corresponding Source of your version by providing access to the +Corresponding Source from a network server at no charge, through some +standard or customary means of facilitating copying of software. This +Corresponding Source shall include the Corresponding Source for any +work covered by version 3 of the GNU General Public License that is +incorporated pursuant to the following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Affero General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero +General Public License "or any later version" applies to it, you have +the option of following the terms and conditions either of that +numbered version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number +of the GNU Affero General Public License, you may choose any version +ever published by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that +proxy's public statement of acceptance of a version permanently +authorizes you to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE +OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU +ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR +CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT +NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR +LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM +TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + + Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/LICENSE.zh-CN b/LICENSE.zh-CN new file mode 100644 index 0000000..fd840cb --- /dev/null +++ b/LICENSE.zh-CN @@ -0,0 +1,229 @@ + GNU AFFERO 通用公共许可证 + 第 3 版,2007 年 11 月 19 日 + + 版权所有 © 2007 自由软件基金会公司 + 每个人都被允许复制和分发本许可证文件的逐字副本,但不允许进行更改。 + + 序言 + + GNU Affero 通用公共许可证是一个自由的、允许复制的软件和其他类型作品的许可,在网络服务器软件的情况下,它是专门为确保与社区合作而设计。 + + 大多数软件和其他实用作品的许可都是为了剥夺您分享和改变作品的自由。相比之下,我们的通用公共许可证的目的是保证您分享和改变一个程序的所有版本的自由——确保它对所有用户都是自由软件。 + + 当我们谈论自由软件时,我们指的是自由,而不是价格。我们的通用公共许可证的设计是为了确保您有分发自由软件副本的自由(如果您愿意,还可以收费),您可以收到源代码,或者如果您想得到它,您可以改变软件或在新的自由程序中使用它的片段,而且您知道您可以做这些事情。 + + 使用我们通用公共许可证的开发者通过两个步骤保护您的权利:(1) 主张软件的版权,(2) 向您提供本许可证,允许您合法地复制、分发和/或修改该软件。 + + 捍卫所有用户自由的一个次要好处是,如果程序的替代版本得到广泛使用,就可以供其他开发者使用。许多自由软件的开发者对由此产生的合作感到振奋和鼓舞。然而,在网络服务器上使用的软件,这种结果可能无法实现。GNU 通用公共许可证允许制作一个修改过的版本,让公众在服务器上访问它,而不需要向公众发布其源代码。 + + GNU Affero 通用公共许可证是专门设计来确保在这种情况下,修改后的源代码可以被社区使用。它要求网络服务器的运营商向该服务器的用户提供运行在那里的修改版本的源代码。因此,在一个可公开访问的服务器上公开使用一个修改过的版本,使公众能够获得修改过的版本的源代码。 + + 一个较早的许可证,称为 Affero 通用公共许可证,由 Affero 发布,旨在实现类似目标。这是一个不同的许可证,不是 Affero GPL 的一个版本,但 Affero 已经发布了 Affero GPL 的一个新版本,允许在这个许可证下重新许可。 + + 关于复制、分发和修改的确切条款和条件如下。 + + 条款与条件 + + 0. 定义. + + “本许可证”是指 GNU Affero 通用公共许可证的第 3 版。 + + “版权”也指适用于其他类型作品的类似版权的法律,如半导体掩模。 + + “本程序”是指在本许可证下许可的任何有版权的作品。每个被许可人都被称呼为“您”。“被许可人”和“接受者”可以是个人或组织。 + + “修改”作品是指以需要版权许可的方式复制或改编该作品的全部或部分内容,而不是制作一个完全的副本。由此产生的作品被称为早期作品的“修改版”或“基于”早期作品的作品。 + + 一个“涵盖的作品”是指未经修改的程序或基于该程序的作品。 + + “传播”作品是指在未经许可的情况下,对作品做任何事情,使您在适用的版权法下承担直接或间接的侵权责任,但在计算机上执行或修改私人副本除外。传播包括复制、分发(无论是否修改)、向公众提供,在一些国家还包括其他活动。 + + “传达”作品是指使其他各方能够制作或接受副本的任何一种传播。仅仅是通过计算机网络与用户互动,而没有转让副本,并不是传达。 + + 交互式用户界面显示“适当的法律声明”的程度是,它包括一个方便和显眼的功能,(1) 显示适当的版权声明,(2) 告诉用户该作品没有保证(除了提供保证的范围),被许可人可以根据本许可传达该作品,以及如何查看本许可证的副本。如果界面呈现的是一个用户命令或选项的列表,如菜单,列表中的显著项符合这一标准。 + + 1. 源代码. + + 作品的“源代码”是指对作品进行修改的首选形式。“目标代码”是指作品的任何非源代码形式。 + + “标准接口”是指由公认的标准机构定义的官方标准,或者在为特定编程语言指定的接口的情况下,在该语言的开发者中广泛使用的接口。 + + 可执行作品的“系统库”包括除作品整体以外的任何内容:(a) 包含在主要组件包装的正常形式中,但不属于该主要组件的一部分,且 (b) 仅用于使作品能够与该主要组件一起使用,或用于实现公众可获得源代码形式的标准接口。在本文中,“主要组件”是指运行可执行作品的特定操作系统(如果有的话)的主要基本组件(内核、窗口系统等),或用于产生该作品的编译器,或用于运行它的目标代码解释器。 + + 目标代码形式作品的“对应源代码”是指生成、安装和(对于可执行作品)运行目标代码以及修改作品所需的全部源代码,包括控制这些活动的脚本。但是,它不包括作品的系统库,或在执行这些活动时未经修改使用的通用工具或普遍可获得的自由程序,但它们不属于作品的一部分。例如,对应源代码包括与作品源文件相关的接口定义文件,以及作品被专门设计为需要的共享库和动态链接子程序的源代码,例如通过这些子程序与作品其他部分之间的密切数据通信或控制流。 + + 对应源代码不需要包括用户可以从对应源代码的其他部分自动重新生成的任何内容。 + + 源代码形式作品的对应源代码就是该作品本身。 + + 2. 基本许可. + + 本许可证下授予的所有权利都是在程序的版权期限内授予的,并且在满足规定条件的情况下是不可撤销的。本许可证明确肯定了您运行未经修改程序的无限许可。运行涵盖作品的输出只有在输出内容构成涵盖作品的情况下才受本许可证约束。本许可证承认您的合理使用权或其他同等权利,正如版权法所规定的。 + + 只要您的许可证仍然有效,您可以制作、运行和传播您不传达的涵盖作品,且无需遵守任何条件。您可以为了让他人专门为您进行修改,或为您提供运行这些作品的设施,而向他人传达涵盖作品,前提是您在传达所有您不控制版权的材料时遵守本许可证的条款。为您制作或运行涵盖作品的人必须完全代表您,在您的指示和控制下进行,其条款必须禁止他们在与您的关系之外制作您的版权材料的任何副本。 + + 在任何其他情况下的传达只有在下述条件下才被允许。不允许转许可;第 10 条使其变得没有必要。 + + 3. 保护用户的合法权利免受反绕过法的侵害. + + 根据任何履行 1996 年 12 月 20 日通过的 WIPO 版权条约第 11 条规定的义务的适用法律,或禁止或限制绕过此类措施的类似法律,任何涵盖作品都不应被视为有效技术措施的一部分。 + + 当您传达涵盖作品时,您放弃任何禁止绕过技术措施的法律权利,其程度是此类绕过是通过行使本许可证下关于涵盖作品的权利而实现的,并且您放弃任何限制作品运行或修改的意图,作为针对作品用户执行您或第三方禁止绕过技术措施的合法权利的手段。 + + 4. 传达逐字副本. + + 您可以按收到的程序源代码原样,通过任何媒介传达逐字副本,前提是您在每个副本上显著且适当地发布适当的版权声明;完整保留所有声明本许可证及根据第 7 条增加的任何非许可条款适用于该代码的通知;完整保留所有关于没有任何保证的通知;并随程序向所有接受者提供本许可证的副本。 + + 您可以对传达的每个副本收取任何价格或不收取费用,并且您可以收取费用提供支持或保证保护。 + + 5. 传达修改后的源代码版本. + + 您可以根据第 4 条的条款传达基于程序的作品,或从程序产生该作品的修改,以源代码的形式,前提是您还满足以下所有条件: + + a) 作品必须带有显著的通知,说明您修改了它,并给出相关日期。 + b) 作品必须带有显著的通知,说明它是根据本许可证和根据第 7 条增加的任何条件发布的。这一要求修改了第 4 条中“完整保留所有通知”的要求。 + c) 您必须根据本许可证向任何拥有副本的人许可整个作品。因此,本许可证将连同任何适用的第 7 条附加条款一起适用于整个作品及其所有部分,无论它们是如何包装的。本许可证不准许以任何其他方式许可作品,但如果您单独收到了此类准许,它并不使该准许无效。 + d) 如果作品有交互式用户界面,每个界面都必须显示适当的法律声明;但是,如果程序有交互式界面但不显示适当的法律声明,您的作品则不需要使它们显示。 + + 将涵盖作品与其他单独且独立的作品(其性质不是涵盖作品的扩展,也不是与其组合形成更大的程序)在一个存储或分发介质卷中汇编,如果汇编及其产生的版权不被用于限制汇编用户的访问或合法权利,超出单个作品所允许的范围,则被称为“聚合体”。在聚合体中包含涵盖作品不会导致本许可证适用于聚合体的其他部分。 + + 6. 传达非源代码形式. + + 您可以根据第 4 条和第 5 条的条款,以目标代码形式传达涵盖作品,前提是您还根据本许可证的条款,通过以下方式之一传达机器可读的对应源代码: + + a) 在物理产品(包括物理分发介质)中或体现其中传达目标代码,随附固定在通常用于软件交换的耐用物理介质上的对应源代码。 + b) 在物理产品(包括物理分发介质)中或体现其中传达目标代码,随附一份书面报价,有效期至少三年,并且在您为该产品型号提供备件或客户支持期间一直有效,向任何拥有目标代码的人提供 (1) 产品中受本许可证约束的所有软件的对应源代码副本,固定在通常用于软件交换的耐用物理介质上,价格不超过您物理执行此传达源代码的合理成本,或 (2) 从网络服务器免费下载对应源代码的访问权限。 + c) 随附提供对应源代码的书面报价副本,传达目标代码的单个副本。这种替代方案只在偶尔且非商业的情况下被允许,并且只有在您根据第 6b 小节收到带有此类报价的目标代码时才被允许。 + d) 通过从指定地点提供访问权限(免费或收费)传达目标代码,并以同样的方式通过同一地点提供对对应源代码的等效访问,不收取额外费用。您不需要要求接受者随目标代码一起复制对应源代码。如果复制目标代码的地点是网络服务器,对应源代码可以在不同的服务器上(由您或第三方运营),该服务器支持等效的复制设施,前提是您在目标代码旁边保留明确的指示,说明对应源代码的位置。无论哪个服务器托管对应源代码,您仍有义务确保它在满足这些要求所需的时间内是可用的。 + e) 使用对等传输传达目标代码,前提是您告知其他对等方,根据第 6d 小节,该作品的目标代码和对应源代码正免费向公众提供。 + + 目标代码的独立部分,其源代码作为系统库被排除在对应源代码之外,不需要在传达目标代码作品时包括在内。 + + “用户产品”是指 (1)“消费品”,指通常用于个人、家庭或家务目的的任何有形个人财产,或 (2) 任何设计或销售用于安装在住宅中的东西。在确定产品是否为消费品时,疑点应倾向于涵盖。对于特定用户收到的特定产品,“通常使用”是指该类产品的典型或常见用法,无论特定用户的身份或特定用户实际使用、预期或被预期使用产品的方式。产品是消费品,无论产品是否有实质性的商业、工业或非消费用途,除非此类用途代表了产品的唯一显著使用模式。 + + 用户产品的“安装信息”是指从对应源代码的修改版在用户产品中安装和执行涵盖作品的修改版所需的任何方法、程序、授权密钥或其他信息。信息必须足以确保修改后的目标代码的持续运行在任何情况下都不会仅仅因为进行了修改而被阻止或干扰。 + + 如果您根据本条在用户产品中、随附用户产品或专门用于用户产品传达目标代码作品,且传达作为永久或固定期限(无论交易如何描述)将用户产品的占有和使用权转让给接受者的交易的一部分发生,根据本条传达的对应源代码必须随附安装信息。但如果您或任何第三方都不保留在用户产品上安装修改后的目标代码的能力(例如,作品已安装在 ROM 中),则此要求不适用。 + + 提供安装信息的要求不包括继续为由接受者修改或安装的作品,或为其被修改或安装的用户产品提供支持服务、保证或更新的要求。当修改本身实质性地且不利地影响网络的运行或违反跨网络通信的规则和协议时,可以拒绝访问网络。 + + 根据本条传达的对应源代码和提供的安装信息必须采用公开记录的格式(且具有公众可获得源代码形式的实现),并且必须不需要特殊的密码或密钥进行解包、读取或复制。 + + 7. 附加条款. + + “附加许可”是通过对本许可证的一个或多个条件进行例外处理来补充其条款。适用于整个程序的附加许可应被视为包含在本许可证中,只要它们在适用法律下是有效的。如果附加许可仅适用于程序的一部分,该部分可以在这些许可下单独使用,但整个程序仍然受本许可证约束,而不考虑附加许可。 + + 当您传达涵盖作品的副本时,您可以选择从该副本或其中的任何部分删除任何附加许可。(在您修改作品时,附加许可可以被编写为在某些情况下要求删除它们。)您可以为您拥有或可以提供适当版权许可的材料放置附加许可,并将其添加到涵盖作品中。 + + 尽管有本许可证的任何其他规定,对于您添加到涵盖作品中的材料,您可以(如果得到该材料版权持有者的授权)用以下条款补充本许可证的条款: + + a) 以不同于本许可证第 15 条和第 16 条条款的方式放弃保证或限制责任;或者 + b) 要求在该材料中或在包含该材料的作品显示的适当法律声明中保留指定的合理法律声明或作者署名;或者 + c) 禁止歪曲该材料的来源,或要求修改后的版本以合理的方式标记为不同于原始版本;或者 + d) 限制出于宣传目的使用该材料的许可人或作者的名字;或者 + e) 拒绝根据商标法授予使用某些商号、商标或服务标志的权利;或者 + f) 要求该材料的传达者(或其修改版)向该材料的许可人和作者提供赔偿,如果传达者对接受者承担了合同责任,而这些合同责任直接强加给了这些许可人和作者。 + + 所有其他非许可性的附加条款都被视为第 10 条意义上的“进一步限制”。如果您收到的程序或其任何部分包含一份声明其受本许可证约束的通知,以及一个属于进一步限制的条款,您可以删除该条款。如果一份许可证文件包含进一步限制,但允许在本许可证下重新许可或传达,您可以添加受该许可证文件条款约束的涵盖作品材料,前提是进一步限制在重新许可或传达后不再存续。 + + 如果您根据本条向涵盖作品添加条款,您必须在相关的源文件中放置适用于这些文件的附加条款的声明,或指示在哪里可以找到适用条款的通知。 + + 附加条款,无论是许可性的还是非许可性的,都可以以单独编写的许可证的形式陈述,或陈述为例外;上述要求在任何一种情况下都适用。 + + 8. 终止. + + 除非本许可证明确规定,否则您不得传播或修改涵盖作品。任何以其他方式传播或修改作品的尝试都是无效的,并将自动终止您在本许可证下的权利(包括根据第 11 条第三段授予的任何专利许可)。 + + 但是,如果您停止所有违反本许可证的行为,那么您从特定版权持有者处获得的许可证将恢复:(a) 临时恢复,除非且直到版权持有者明确且最终终止您的许可证,以及 (b) 永久恢复,如果版权持有者在停止后 60 天内未能通过某种合理方式通知您违反行为。 + + 此外,如果版权持有者通过某种合理方式通知您违反行为,且这是您第一次收到该版权持有者关于违反本许可证(针对任何作品)的通知,并且您在收到通知后 30 天内纠正了违反行为,则您从该特定版权持有者处获得的许可证将永久恢复。 + + 根据本条终止您的权利并不会终止根据本许可证从您那里获得副本或权利的各方的许可证。如果您的权利已被终止且未永久恢复,您就不符合根据第 10 条获得相同材料新许可证的资格。 + + 9. 拥有副本不需要接受. + + 您不需要为了接收或运行程序的副本而接受本许可证。仅作为使用对等传输接收副本的结果而发生的涵盖作品的附属传播同样不需要接受。但是,除本许可证外,没有任何内容准许您传播或修改任何涵盖作品。如果您不接受本许可证,这些行为就侵犯了版权。因此,通过修改或传播涵盖作品,您表示您接受本许可证以这样做。 + + 10. 下游接受者的自动许可. + + 每次您传达涵盖作品时,接受者会自动从原始许可人处获得根据本许可证运行、修改和传播该作品的许可。您不负责强制第三方遵守本许可证。 + + “实体交易”是指转移组织控制权、或其几乎所有资产、或细分组织、或合并组织的交易。如果涵盖作品的传播是由实体交易产生的,那么该交易中收到作品副本的每一方也会收到该方的利益前任在上一段下拥有或可以给予的关于该作品的任何许可,以及从利益前任那里获得作品对应源代码的权利(如果前任拥有它或可以通过合理的努力获得它)。 + + 您不得对本许可证授予或确认的权利的行使施加任何进一步的限制。例如,您不得为行使本许可证授予的权利收取附加费,也不得发起任何诉讼(包括在诉讼中提出交叉索赔或反诉),指控程序的任何部分侵犯了任何专利权利。 + + 11. 专利. + + “贡献者”是指授权在本许可证下使用程序或程序所基于的作品的版权持有者。如此许可的作品被称为该贡献者的“贡献者版本”。 + + 贡献者的“基本专利权利”是指贡献者拥有或控制的所有专利权利,无论是已经获得的还是以后获得的,如果以本许可证允许的某种方式制作、使用或销售其贡献者版本,就会被侵犯,但不包括仅由于对贡献者版本的进一步修改而会被侵犯的权利。在本定义中,“控制”包括以符合本许可证要求的方式授予专利转许可的权利。 + + 每个贡献者授予您非独占的、全球性的、免版税的专利许可,在贡献者的基本专利权利下,制作、使用、销售、要约销售、进口以及以其他方式运行、修改和传播其贡献者版本的内容。 + + 在以下三段中,“专利许可”是指任何明示的协议或承诺,无论名称如何,不执行专利(如行使专利的明示许可或不就专利侵权提起诉讼的承诺)。向一方“授予”此类专利许可意味着达成此类协议或承诺,不对该方执行专利。 + + 如果您传达涵盖作品,明知依赖于一份专利许可,而该作品的对应源代码无法通过公开可用的网络服务器或其他易于访问的方式供任何人根据本许可证的条款免费复制,那么您必须:(1) 使对应源代码可以这样获得,或 (2) 安排剥夺您自己从该特定作品的专利许可中获得的利益,或 (3) 以符合本许可证要求的方式,安排将专利许可延伸到下游接受者。“明知依赖”意味着您实际知悉,如果不是因为有专利许可,您在某个国家传达涵盖作品,或您的接受者在某个国家使用涵盖作品,就会侵犯该国家的一项或多项您有理由相信是有效的可识别专利。 + + 如果根据单一交易或安排,或与之相关,您传达或通过促成传达来传播涵盖作品,并向接收涵盖作品的某些方授予专利许可,授权他们使用、传播、修改或传达涵盖作品的特定副本,那么您授予的专利许可将自动延伸到涵盖作品的所有接受者及基于它的作品。 + + 如果专利许可的覆盖范围不包括本许可证专门授予的一项或多项权利、禁止行使这些权利、或以不行使这些权利为条件,则该专利许可被视为“歧视性”的。如果您与从事软件分发业务的第三方达成安排,根据该安排,您根据传达作品的活动程度向第三方支付费用,且第三方根据该安排向从您处获得涵盖作品的任何方授予歧视性的专利许可,则您不得传达涵盖作品:(a) 与您传达的涵盖作品副本(或从这些副本制作的副本)相关,或 (b) 主要针对包含涵盖作品的特定产品或汇编,除非您在 2007 年 3 月 28 日之前进入该安排或该专利许可已被授予。 + + 本许可证中的任何内容都不应被解释为排除或限制根据适用专利法可能为您提供的任何默示许可或其他侵权抗辩。 + + 12. 不得损害他人的自由. + + 如果强加给您的条件(无论是通过法院命令、协议还是其他方式)与本许可证的条件相抵触,它们并不能免除您遵守本许可证的条件。如果您无法在传达涵盖作品的同时满足本许可证下的义务和任何其他相关义务,那么您根本不得传达它。例如,如果您同意要求您从传达程序的人那里收取版税的条款,那么您能够同时满足这些条款和本许可证的唯一方法就是完全不传达程序。 + + 13. 远程网络交互;与 GNU 通用公共许可证一起使用. + + 尽管本许可证有任何其他规定,如果您修改程序,您的修改版必须显著地向所有通过计算机网络与其远程交互的用户(如果您的版本支持此类交互)提供一个机会,通过某种标准的或惯常的方便复制软件的方式,从网络服务器免费获得您版本的对应源代码。该对应源代码应包括根据下一段包含的受 GNU 通用公共许可证第 3 版约束的任何作品的对应源代码。 + + 尽管本许可证有任何其他规定,您有权将任何涵盖作品与根据 GNU 通用公共许可证第 3 版许可的作品链接或组合成单一的组合作品,并传达产生的作品。本许可证的条款将继续适用于涵盖作品的部分,但与其组合的作品将继续受 GNU 通用公共许可证第 3 版的约束。 + + 14. 本许可证的修订版. + + 自由软件基金会可能会不时发布 GNU Affero 通用公共许可证的修订版和/或新版本。此类新版本在精神上将与当前版本相似,但在处理新问题或关注点时可能在细节上有所不同。 + + 每个版本都有一个区分版本号。如果程序指定某个特定版本号的 GNU Affero 通用公共许可证“或任何更高版本”适用于它,您可以选择遵守该版本号或自由软件基金会发布的任何更高版本的条款和条件。如果程序没有指定 GNU Affero 通用公共许可证的版本号,您可以选择自由软件基金会曾发布的任何版本。 + + 如果程序指定代理人可以决定将来可以使用哪个版本的 GNU Affero 通用公共许可证,则该代理人公开声明接受某个版本,即永久授权您为该程序选择该版本。 + + 以后的许可证版本可能会给您额外的或不同的许可。但是,由于您选择遵循以后的版本,不会对任何作者或版权持有者施加额外的义务。 + + 15. 免责声明. + + 在适用法律允许的范围内,对本程序不提供任何保证。除非另有书面说明,版权持有者和/或其他方“按原样”提供本程序,不提供任何形式的保证,无论是明示的还是暗示的,包括但不限于对适销性和特定用途适用性的暗示保证。关于程序的质量和性能的全部风险均由您承担。如果程序被证明有缺陷,您承担所有必要的维修、修复或纠正费用。 + + 16. 责任限制. + + 除非适用法律要求或书面同意,否则任何版权持有者或任何其他根据上述许可修改和/或传达程序的方,都不对您的损害负责,包括因使用或无法使用程序而产生的任何一般的、特殊的、偶然的或间接的损害(包括但不限于数据丢失或数据变得不准确,或由您或第三方遭受的损失,或程序无法与任何其他程序一起运行),即使该持有者或其他方已被告知此类损害的可能性。 + + 17. 第 15 条和第 16 条的解释. + + 如果上述免责声明和责任限制无法根据其条款产生当地法律效力,审查法院应适用最接近于绝对放弃与程序相关的所有民事责任的当地法律,除非收费随附程序的副本提供保证或承担责任。 + + 条款与条件结束 + + 如何将这些条款应用于您的新程序 + + 如果您开发了一个新程序,并且您希望它能给公众带来最大的用处,实现这一点的最好方法是使其成为自由软件,每个人都可以在这些条款下重新分发和更改它。 + + 为此,请在程序中附上以下通知。最安全的方法是将它们附在每个源文件的开头,以最有效地陈述保证的排除;每个文件至少应该有“版权”行和指向完整通知位置的指针。 + + <给出程序名称及其用途的简要说明的一行内容。> + 版权所有 (C) <年份> <作者姓名> + + 本程序是自由软件:您可以根据自由软件基金会发布的 GNU Affero 通用公共许可证的条款(许可证的第 3 版,或(由您选择)任何更高版本)重新分发和/或修改它。 + + 发布本程序的目的是希望它有用,但不提供任何保证;甚至没有适销性或特定用途适用性的暗示保证。有关详细信息,请参阅 GNU Affero 通用公共许可证。 + + 您应该已经随本程序收到了一份 GNU Affero 通用公共许可证的副本。如果没有,请参阅 。 + + 还请添加如何通过电子邮件和信函与您联系的信息。 + + 如果您的软件可以通过计算机网络与用户进行远程交互,您还应该确保它为用户提供了一种获取其源代码的方法。例如,如果您的程序是一个 Web 应用程序,其界面可以显示一个指向代码存档的“源代码”链接。提供源代码的方法有很多,不同的程序会有不同的解决方案;具体要求见第 13 条。 + + 如果有必要,您还应该让您的雇主(如果您是程序员)或学校(如果有的话)为程序签署一份“版权免责声明”。有关这方面的更多信息,以及如何应用和遵循 GNU AGPL,请参阅 。 + +--- +*注:这是 GNU Affero 通用公共许可证 (AGPL) 的非官方中文翻译。它不是由自由软件基金会发布的,也不具有法律效力。只有英文原文才具有法律效力。* diff --git a/README.md b/README.md index 22738db..0b5f681 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# TodoList 跨平台待办事项管理应用 +# Hua.Todo 跨平台代办管理应用 -一个基于 MAUI + WebView 架构开发的跨平台待办事项管理应用,支持 Windows、macOS、Android、iOS 和 Linux(预览)平台。通过 HTTP API 实现前后端通信,提供轻量、高效的任务管理体验。 +一个基于 MAUI + WebView 架构开发的跨平台代办管理应用,支持 Windows、macOS、Android、iOS 和 Linux(预览)平台。通过 HTTP API 实现前后端通信,提供轻量、高效的任务管理体验。 ## 🚀 功能特点 @@ -54,12 +54,12 @@ #### 1. 克隆或下载项目 ```bash git clone <仓库地址> -cd TodoList +cd Hua.Todo ``` #### 2. 启动后端 API ```bash -cd src/TodoList.Api +cd src/Hua.Todo.Api dotnet restore dotnet ef database update dotnet run @@ -68,7 +68,7 @@ API 将在 `http://localhost:5173` 启动 #### 3. 启动前端 Web ```bash -cd src/TodoList.Web +cd src/Hua.Todo.Web npm install npm run dev ``` @@ -84,21 +84,21 @@ npm run dev ### 项目结构 ``` -TodoList/ +Hua.Todo/ ├── docs/ # 文档目录 │ ├── 产品需求文档.md │ ├── 产品需求文档-1.1.0.md │ ├── 技术设计文档.md │ └── 代码规范文档.md ├── src/ # 源代码目录 -│ ├── TodoList.Core/ # 核心业务逻辑层 +│ ├── Hua.Todo.Core/ # 核心业务逻辑层 │ │ ├── Entities/ # 实体类 │ │ │ ├── Task.cs │ │ │ └── TaskPriority.cs │ │ └── Interfaces/ # 接口定义 │ │ ├── ITaskRepository.cs │ │ └── ITaskService.cs -│ ├── TodoList.Api/ # 后端 API 项目 +│ ├── Hua.Todo.Api/ # 后端 API 项目 │ │ ├── Controllers/ # API 控制器 │ │ │ └── TasksController.cs │ │ ├── Services/ # 业务服务 @@ -111,8 +111,8 @@ TodoList/ │ │ ├── Models/ # 数据模型 │ │ │ └── TaskModels.cs │ │ ├── Program.cs # API 入口 -│ │ └── TodoList.Api.csproj # API 项目文件 -│ ├── TodoList.Web/ # 前端 Web 项目 (Vue.js) +│ │ └── Hua.Todo.Api.csproj # API 项目文件 +│ ├── Hua.Todo.Web/ # 前端 Web 项目 (Vue.js) │ │ ├── public/ # 静态资源 │ │ ├── src/ │ │ │ ├── api/ # API 调用 @@ -128,7 +128,7 @@ TodoList/ │ │ ├── package.json # 依赖配置 │ │ ├── vite.config.ts # Vite 配置 │ │ └── tsconfig.json # TypeScript 配置 -│ └── TodoList.slnx # 解决方案文件 +│ └── Hua.Todo.slnx # 解决方案文件 ├── .gitignore # Git 忽略文件 └── README.md # 项目说明文档 ``` @@ -143,13 +143,13 @@ TodoList/ ## 🎯 核心模块说明 -### TodoList.Core +### Hua.Todo.Core 核心业务逻辑层,定义领域模型和业务规则,提供核心业务接口。 -### TodoList.Api +### Hua.Todo.Api 后端 API 项目,提供 RESTful API 接口,处理业务逻辑,管理数据访问和持久化。 -### TodoList.Web +### Hua.Todo.Web 前端 Web 项目,基于 Vue.js 3 + TypeScript,提供用户界面,通过 HTTP API 与后端通信。 ## 🔄 版本更新 @@ -176,13 +176,13 @@ TodoList/ ## 📄 许可证 -本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情 +本项目采用 AGPL-3.0 许可证 - 查看 [LICENSE](LICENSE) (英文) 或 [LICENSE.zh-CN](LICENSE.zh-CN) (中文) 文件了解详情 ## 📞 联系方式 - 项目作者:ShaoHua -- 项目地址:https://git.we965.cn/Tools/TodoList +- 项目地址:https://git.we965.cn/Tools/Hua.Todo --- -**TodoList** - 跨平台任务管理,让效率无处不在! +**Hua.Todo** - 跨平台任务管理,让效率无处不在! diff --git a/TodoList.slnx b/TodoList.slnx deleted file mode 100644 index e6f9e0e..0000000 --- a/TodoList.slnx +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/Android_NotFound_排查计划.md b/docs/Android_NotFound_排查计划.md index d237cb8..bf66db9 100644 --- a/docs/Android_NotFound_排查计划.md +++ b/docs/Android_NotFound_排查计划.md @@ -1,4 +1,4 @@ -# Android 端显示 “Not Found” 排查计划(TodoList.Maui) +# Android 端显示 “Not Found” 排查计划(Hua.Todo.Maui) ## 目标 @@ -7,16 +7,16 @@ ## 背景(当前实现快速定位) -- Android 使用自建 TCP HTTP Server,静态资源从 APK 的 `Assets/wwwroot/*` 读取:[MobileEmbeddedWebServerService](file:///d:/Proj/TodoList/src/TodoList.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs) -- WebView 默认加载内嵌服务器地址(`IsUsingStatic=true` 时):[MainPage.xaml.cs](file:///d:/Proj/TodoList/src/TodoList.Maui/Views/MainPage.xaml.cs) -- Android 端静态文件找不到时返回纯文本 `Not Found`:[HandleStaticAsync](file:///d:/Proj/TodoList/src/TodoList.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs#L214-L255) +- Android 使用自建 TCP HTTP Server,静态资源从 APK 的 `Assets/wwwroot/*` 读取:[MobileEmbeddedWebServerService](file:///d:/Proj/Hua.Todo/src/Hua.Todo.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs) +- WebView 默认加载内嵌服务器地址(`IsUsingStatic=true` 时):[MainPage.xaml.cs](file:///d:/Proj/Hua.Todo/src/Hua.Todo.Maui/Views/MainPage.xaml.cs) +- Android 端静态文件找不到时返回纯文本 `Not Found`:[HandleStaticAsync](file:///d:/Proj/Hua.Todo/src/Hua.Todo.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs#L214-L255) ## 排查顺序(从“最可能 & 最省时间”到“深入原因”) ### 1) 确认 WebView 实际加载的 URL - 在 Android Debug 输出里确认 WebView Source(期望是 `http://localhost:5057` 或 `http://localhost:5057/`) -- 如果不是内嵌地址,检查 `appsettings.json` 的 `WebServer.IsUsingStatic` 与 `ForEndUrl` 配置:[appsettings.json](file:///d:/Proj/TodoList/src/TodoList.Maui/appsettings.json) +- 如果不是内嵌地址,检查 `appsettings.json` 的 `WebServer.IsUsingStatic` 与 `ForEndUrl` 配置:[appsettings.json](file:///d:/Proj/Hua.Todo/src/Hua.Todo.Maui/appsettings.json) 判定: - 若加载的是内嵌地址 → 继续第 2 步 @@ -24,8 +24,8 @@ ### 2) 确认前端 dist 是否存在且可用于打包 -- 检查 `src/TodoList.Web/dist/index.html` 是否存在 -- 如果不存在:在 `src/TodoList.Web` 下执行 `npm ci` + `npm run build`,确保产物生成 +- 检查 `src/Hua.Todo.Web/dist/index.html` 是否存在 +- 如果不存在:在 `src/Hua.Todo.Web` 下执行 `npm ci` + `npm run build`,确保产物生成 判定: - dist 不存在/为空 → “Not Found”高概率来自 Android 静态资源根本没被构建或没被打进 APK @@ -35,7 +35,7 @@ - 重点验证打包结果是否存在: - `assets/wwwroot/index.html` - `assets/wwwroot/assets/*`(至少有 js/css) -- 项目里通过 MSBuild 目标把 `TodoList.Web/dist` 映射为 AndroidAsset(Link 到 `wwwroot/...`):[TodoList.Maui.csproj](file:///d:/Proj/TodoList/src/TodoList.Maui/TodoList.Maui.csproj#L150-L175) +- 项目里通过 MSBuild 目标把 `Hua.Todo.Web/dist` 映射为 AndroidAsset(Link 到 `wwwroot/...`):[Hua.Todo.Maui.csproj](file:///d:/Proj/Hua.Todo/src/Hua.Todo.Maui/Hua.Todo.Maui.csproj#L150-L175) 判定: - APK 内没有 `wwwroot/index.html` → 修复构建/打包流程(第 6 步会给方案) @@ -57,7 +57,7 @@ - 如果看到的不是纯文本 `Not Found`,而是加载错误/空白: - 检查 Android 明文 HTTP(`http://localhost`)是否被允许 - - 检查 `network_security_config.xml` 与 Manifest 配置:[network_security_config.xml](file:///d:/Proj/TodoList/src/TodoList.Maui/Platforms/Android/Resources/xml/network_security_config.xml)、[AndroidManifest.xml](file:///d:/Proj/TodoList/src/TodoList.Maui/Platforms/Android/AndroidManifest.xml) + - 检查 `network_security_config.xml` 与 Manifest 配置:[network_security_config.xml](file:///d:/Proj/Hua.Todo/src/Hua.Todo.Maui/Platforms/Android/Resources/xml/network_security_config.xml)、[AndroidManifest.xml](file:///d:/Proj/Hua.Todo/src/Hua.Todo.Maui/Platforms/Android/AndroidManifest.xml) ### 6) 修复与验证(根据前面判定选择) @@ -65,7 +65,7 @@ - 让构建流程更“硬性”: - 若 dist 不存在则强制构建,或在 Debug 也保证 `AndroidAsset` 包含 dist - - 可选:把 dist 复制进 `TodoList.Maui/wwwroot` 再用 ``/`` 统一打包(减少条件目标的不确定性) + - 可选:把 dist 复制进 `Hua.Todo.Maui/wwwroot` 再用 ``/`` 统一打包(减少条件目标的不确定性) 验证: - APK 内能看到 `assets/wwwroot/index.html`,启动后不再返回 `Not Found` diff --git a/docs/产品需求文档-1.1.0.md b/docs/产品需求文档-1.1.0.md index 51dc392..3263e7e 100644 --- a/docs/产品需求文档-1.1.0.md +++ b/docs/产品需求文档-1.1.0.md @@ -1,7 +1,7 @@ -# TodoList 产品需求文档 (PRD) v1.1.0 +# Hua.Todo 产品需求文档 (PRD) v1.1.0 ## 1. 项目概述 -本项目是一个基于 MAUI + WebView 架构开发的跨平台待办事项管理应用 (TodoList)。旨在提供轻量、高效的任务管理体验,特别是通过快捷键快速唤起记录功能,最大化用户的操作效率。v1.1.0 版本将实现跨平台支持,覆盖 Windows、macOS、Android、iOS 和 Linux(预览)平台。 +本项目是一个基于 MAUI + WebView 架构开发的跨平台代办管理应用 (Hua.Todo)。旨在提供轻量、高效的任务管理体验,特别是通过快捷键快速唤起记录功能,最大化用户的操作效率。v1.1.0 版本将实现跨平台支持,覆盖 Windows、macOS、Android、iOS 和 Linux(预览)平台。 ## 2. 技术架构 diff --git a/docs/产品需求文档.md b/docs/产品需求文档.md index dcbbad1..1439a9a 100644 --- a/docs/产品需求文档.md +++ b/docs/产品需求文档.md @@ -1,7 +1,7 @@ -# TodoList 产品需求文档 (PRD) +# Hua.Todo 产品需求文档 (PRD) ## 1. 项目概述 -本项目是一个基于 C# WPF (.NET 10) 开发的桌面待办事项管理应用 (TodoList)。旨在提供轻量、高效的任务管理体验,特别是通过快捷键快速唤起记录功能,最大化用户的操作效率。 +本项目是一个基于 C# WPF (.NET 10) 开发的桌面代办管理应用 (Hua.Todo)。旨在提供轻量、高效的任务管理体验,特别是通过快捷键快速唤起记录功能,最大化用户的操作效率。 ## 2. 技术架构 - **开发语言**: C# diff --git a/docs/代码规范文档.md b/docs/代码规范文档.md index ca0286a..0498a51 100644 --- a/docs/代码规范文档.md +++ b/docs/代码规范文档.md @@ -1,7 +1,7 @@ -# TodoList 代码规范文档 v1.1.0 +# Hua.Todo 代码规范文档 v1.1.0 ## 1. 概述 -本文档定义 TodoList 项目的代码规范,包括 C#、JavaScript/TypeScript、Vue.js 和其他相关技术的编码标准。遵循这些规范有助于提高代码质量、可读性和可维护性。 +本文档定义 Hua.Todo 项目的代码规范,包括 C#、JavaScript/TypeScript、Vue.js 和其他相关技术的编码标准。遵循这些规范有助于提高代码质量、可读性和可维护性。 ## 2. 通用规范 @@ -80,7 +80,7 @@ using System.Collections.Generic; using System.Threading.Tasks; // 2. 命名空间 -namespace TodoList.Api.Services; +namespace Hua.Todo.Api.Services; // 3. XML 文档注释 /// diff --git a/docs/实现对比文档.md b/docs/实现对比文档.md index 9d7cd78..98cb766 100644 --- a/docs/实现对比文档.md +++ b/docs/实现对比文档.md @@ -1,7 +1,7 @@ -# TodoList 实现对比文档 +# Hua.Todo 实现对比文档 ## 项目概述 -本项目是一个基于 MAUI + WebView 架构开发的跨平台待办事项管理应用。 +本项目是一个基于 MAUI + WebView 架构开发的跨平台代办管理应用。 ## 实现进度 @@ -182,9 +182,9 @@ ## 当前运行状态 ### 服务状态 -- ✅ **TodoList.Api**: 运行中 (http://localhost:5173) -- ✅ **TodoList.Web**: 运行中 (http://localhost:5173) -- ✅ **TodoList.Maui**: 运行中 (Windows 桌面应用) +- ✅ **Hua.Todo.Api**: 运行中 (http://localhost:5173) +- ✅ **Hua.Todo.Web**: 运行中 (http://localhost:5173) +- ✅ **Hua.Todo.Maui**: 运行中 (Windows 桌面应用) ### 修复的 Bug - ✅ 修复了 QuickEntryPage.xaml.cs 中的插值字符串转义问题 diff --git a/docs/技术设计文档.md b/docs/技术设计文档.md index c161ac0..3daa45e 100644 --- a/docs/技术设计文档.md +++ b/docs/技术设计文档.md @@ -1,7 +1,7 @@ -# TodoList 技术设计文档 v1.1.0 +# Hua.Todo 技术设计文档 v1.1.0 ## 1. 项目概述 -本文档描述 TodoList v1.1.0 的技术设计方案,包括项目文件目录结构、模块划分、技术选型和实现细节。 +本文档描述 Hua.Todo v1.1.0 的技术设计方案,包括项目文件目录结构、模块划分、技术选型和实现细节。 ## 2. 技术栈 @@ -28,7 +28,7 @@ ## 3. 项目目录结构 ``` -TodoList/ +Hua.Todo/ ├── docs/ # 文档目录 │ ├── PRD.md # 产品需求文档 │ ├── PRD-1.1.0.md # v1.1.0 产品需求文档 @@ -36,7 +36,7 @@ TodoList/ │ └── CodeStandards.md # 代码规范文档 │ ├── src/ # 源代码目录 -│ ├── TodoList.Maui/ # MAUI 主项目(跨平台入口) +│ ├── Hua.Todo.Maui/ # MAUI 主项目(跨平台入口) │ │ ├── Platforms/ # 平台特定代码 │ │ │ ├── Windows/ # Windows 平台代码 │ │ │ │ ├── App.xaml # Windows 应用入口 @@ -67,9 +67,9 @@ TodoList/ │ │ ├── App.xaml # MAUI 应用入口 │ │ ├── App.xaml.cs │ │ ├── MauiProgram.cs # MAUI 程序配置 -│ │ └── TodoList.Maui.csproj # MAUI 项目文件 +│ │ └── Hua.Todo.Maui.csproj # MAUI 项目文件 │ │ -│ ├── TodoList.Api/ # 后端 API 项目 +│ ├── Hua.Todo.Api/ # 后端 API 项目 │ │ ├── Controllers/ # API 控制器 │ │ │ ├── TasksController.cs │ │ │ ├── SettingsController.cs @@ -95,9 +95,9 @@ TodoList/ │ │ │ └── ServiceCollectionExtensions.cs │ │ ├── Program.cs # API 入口 │ │ ├── appsettings.json # 配置文件 -│ │ └── TodoList.Api.csproj # API 项目文件 +│ │ └── Hua.Todo.Api.csproj # API 项目文件 │ │ -│ ├── TodoList.Core/ # 核心业务逻辑层 +│ ├── Hua.Todo.Core/ # 核心业务逻辑层 │ │ ├── Entities/ # 实体类 │ │ │ ├── Task.cs │ │ │ └── TaskPriority.cs @@ -108,9 +108,9 @@ TodoList/ │ │ │ └── TaskTitle.cs │ │ ├── Specifications/ # 规范模式 │ │ │ └── TaskSpecifications.cs -│ │ └── TodoList.Core.csproj # Core 项目文件 +│ │ └── Hua.Todo.Core.csproj # Core 项目文件 │ │ -│ ├── TodoList.Web/ # 前端 Web 项目 (Vue.js) +│ ├── Hua.Todo.Web/ # 前端 Web 项目 (Vue.js) │ │ ├── public/ # 静态资源 │ │ │ └── index.html │ │ ├── src/ # 源代码 @@ -145,7 +145,7 @@ TodoList/ │ │ ├── tsconfig.json # TypeScript 配置 │ │ └── index.html # HTML 模板 │ │ -│ └── TodoList.Tests/ # 测试项目 +│ └── Hua.Todo.Tests/ # 测试项目 │ ├── Unit/ # 单元测试 │ │ ├── Services/ │ │ │ └── TaskServiceTests.cs @@ -153,16 +153,16 @@ TodoList/ │ │ └── TasksControllerTests.cs │ ├── Integration/ # 集成测试 │ │ └── ApiIntegrationTests.cs -│ └── TodoList.Tests.csproj +│ └── Hua.Todo.Tests.csproj │ ├── .gitignore # Git 忽略文件 -├── TodoList.sln # 解决方案文件 +├── Hua.Todo.sln # 解决方案文件 └── README.md # 项目说明文档 ``` ## 4. 模块设计 -### 4.1 MAUI 主项目 (TodoList.Maui) +### 4.1 MAUI 主项目 (Hua.Todo.Maui) **职责**: - 应用程序入口和生命周期管理 - 平台特定功能封装 @@ -175,7 +175,7 @@ TodoList/ - `WebViewContainer`: 封装 WebView 控件 - 平台特定服务: 快捷键、通知等 -### 4.2 后端 API 项目 (TodoList.Api) +### 4.2 后端 API 项目 (Hua.Todo.Api) **职责**: - 提供 RESTful API 接口 - 业务逻辑处理 @@ -188,7 +188,7 @@ TodoList/ - `Data`: 数据访问层和数据库上下文 - `Program.cs`: API 服务器配置和启动 -### 4.3 核心业务层 (TodoList.Core) +### 4.3 核心业务层 (Hua.Todo.Core) **职责**: - 定义领域模型和业务规则 - 提供核心业务接口 @@ -200,7 +200,7 @@ TodoList/ - `ValueObjects`: 值对象 - `Specifications`: 业务规范 -### 4.4 前端 Web 项目 (TodoList.Web) +### 4.4 前端 Web 项目 (Hua.Todo.Web) **职责**: - 用户界面展示 - 用户交互处理 diff --git a/publish.ps1 b/publish.ps1 index fe52246..d6d85bd 100644 --- a/publish.ps1 +++ b/publish.ps1 @@ -1,8 +1,8 @@ $ErrorActionPreference = "Stop" $ScriptPath = $PSScriptRoot -$ProjectDir = Join-Path $ScriptPath "src\TodoList.Maui" -$ProjectFile = Join-Path $ProjectDir "TodoList.Maui.csproj" +$ProjectDir = Join-Path $ScriptPath "src\Hua.Todo.Maui" +$ProjectFile = Join-Path $ProjectDir "Hua.Todo.Maui.csproj" $SetupScript = Join-Path $ProjectDir "setup.iss" # Read version from project file @@ -34,7 +34,7 @@ if (Test-Path $SetupScript) { } } -Write-Host "Building TodoList.Maui (Release)..." -ForegroundColor Cyan +Write-Host "Building Hua.Todo.Maui (Release)..." -ForegroundColor Cyan dotnet publish $ProjectFile -f net10.0-windows10.0.19041.0 -c Release --self-contained false if ($LASTEXITCODE -ne 0) { Write-Error "MAUI build failed" diff --git a/restart-web.ps1 b/restart-web.ps1 index 93c7e3b..ae79814 100644 --- a/restart-web.ps1 +++ b/restart-web.ps1 @@ -5,18 +5,18 @@ param( $ErrorActionPreference = "Stop" Write-Host "====================================" -ForegroundColor Cyan -Write-Host " TodoList.Web Restart Script" -ForegroundColor Cyan +Write-Host " Hua.Todo.Web Restart Script" -ForegroundColor Cyan Write-Host "====================================" -ForegroundColor Cyan Write-Host "" -$webProjectPath = Join-Path $PSScriptRoot "src\TodoList.Web" +$webProjectPath = Join-Path $PSScriptRoot "src\Hua.Todo.Web" if (!(Test-Path $webProjectPath)) { Write-Host "ERROR: Web project path not found: $webProjectPath" -ForegroundColor Red exit 1 } -function Get-TodoListWebProcesses { +function Get-Hua.TodoWebProcesses { param( [Parameter(Mandatory = $true)] [string]$WebProjectPath @@ -31,10 +31,10 @@ function Get-TodoListWebProcesses { Write-Host "[1/3] Stopping existing service..." -ForegroundColor Yellow -$webProcesses = @(Get-TodoListWebProcesses -WebProjectPath $webProjectPath) +$webProcesses = @(Get-Hua.TodoWebProcesses -WebProjectPath $webProjectPath) if ($webProcesses.Count -eq 0) { - Write-Host "OK: TodoList.Web is not running" -ForegroundColor Green + Write-Host "OK: Hua.Todo.Web is not running" -ForegroundColor Green } else { Write-Host "Found $($webProcesses.Count) process(es)" -ForegroundColor Yellow foreach ($process in $webProcesses) { @@ -56,7 +56,7 @@ $timeout = 10 $elapsed = 0 while ($elapsed -lt $timeout) { - $webRunning = @(Get-TodoListWebProcesses -WebProjectPath $webProjectPath) + $webRunning = @(Get-Hua.TodoWebProcesses -WebProjectPath $webProjectPath) if ($webRunning.Count -eq 0) { Write-Host "OK: All processes exited" -ForegroundColor Green @@ -84,7 +84,7 @@ try { $webProcess = Start-Process -FilePath "npm.cmd" -ArgumentList @("run", "dev") -WorkingDirectory $webProjectPath -PassThru - Write-Host "OK: Started TodoList.Web" -ForegroundColor Green + Write-Host "OK: Started Hua.Todo.Web" -ForegroundColor Green Write-Host "PID: $($webProcess.Id)" -ForegroundColor Gray } catch { Write-Host "ERROR: Failed to start service. $_" -ForegroundColor Red diff --git a/src/TodoList.Application/Data/TodoDbContext.cs b/src/Hua.Todo.Application/Data/TodoDbContext.cs similarity index 94% rename from src/TodoList.Application/Data/TodoDbContext.cs rename to src/Hua.Todo.Application/Data/TodoDbContext.cs index 9503c59..5e6d359 100644 --- a/src/TodoList.Application/Data/TodoDbContext.cs +++ b/src/Hua.Todo.Application/Data/TodoDbContext.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; -using TodoList.Core.Entities; +using Hua.Todo.Core.Entities; -namespace TodoList.Application.Data; +namespace Hua.Todo.Application.Data; public class TodoDbContext : DbContext { diff --git a/src/TodoList.Application/DynamicApi/DynamicApiExtensions.cs b/src/Hua.Todo.Application/DynamicApi/DynamicApiExtensions.cs similarity index 84% rename from src/TodoList.Application/DynamicApi/DynamicApiExtensions.cs rename to src/Hua.Todo.Application/DynamicApi/DynamicApiExtensions.cs index a116780..766d26d 100644 --- a/src/TodoList.Application/DynamicApi/DynamicApiExtensions.cs +++ b/src/Hua.Todo.Application/DynamicApi/DynamicApiExtensions.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Builder; -namespace TodoList.Application.DynamicApi; +namespace Hua.Todo.Application.DynamicApi; public static class DynamicApiExtensions { diff --git a/src/TodoList.Application/DynamicApi/DynamicApiMiddleware.cs b/src/Hua.Todo.Application/DynamicApi/DynamicApiMiddleware.cs similarity index 99% rename from src/TodoList.Application/DynamicApi/DynamicApiMiddleware.cs rename to src/Hua.Todo.Application/DynamicApi/DynamicApiMiddleware.cs index fdff662..0e91834 100644 --- a/src/TodoList.Application/DynamicApi/DynamicApiMiddleware.cs +++ b/src/Hua.Todo.Application/DynamicApi/DynamicApiMiddleware.cs @@ -2,9 +2,9 @@ using System.Reflection; using System.Text.Json; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; -using TodoList.Application.Interfaces; +using Hua.Todo.Application.Interfaces; -namespace TodoList.Application.DynamicApi; +namespace Hua.Todo.Application.DynamicApi; public class DynamicApiMiddleware { diff --git a/src/TodoList.Application/DynamicApi/HttpAttributes.cs b/src/Hua.Todo.Application/DynamicApi/HttpAttributes.cs similarity index 96% rename from src/TodoList.Application/DynamicApi/HttpAttributes.cs rename to src/Hua.Todo.Application/DynamicApi/HttpAttributes.cs index efd445b..e7ee1e1 100644 --- a/src/TodoList.Application/DynamicApi/HttpAttributes.cs +++ b/src/Hua.Todo.Application/DynamicApi/HttpAttributes.cs @@ -1,4 +1,4 @@ -namespace TodoList.Application.DynamicApi; +namespace Hua.Todo.Application.DynamicApi; [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class HttpGetAttribute : Attribute diff --git a/src/TodoList.Application/DynamicApi/ParameterBindingAttributes.cs b/src/Hua.Todo.Application/DynamicApi/ParameterBindingAttributes.cs similarity index 84% rename from src/TodoList.Application/DynamicApi/ParameterBindingAttributes.cs rename to src/Hua.Todo.Application/DynamicApi/ParameterBindingAttributes.cs index 7530fa2..d752d30 100644 --- a/src/TodoList.Application/DynamicApi/ParameterBindingAttributes.cs +++ b/src/Hua.Todo.Application/DynamicApi/ParameterBindingAttributes.cs @@ -1,4 +1,4 @@ -namespace TodoList.Application.DynamicApi; +namespace Hua.Todo.Application.DynamicApi; [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)] public class FromQueryAttribute : Attribute diff --git a/src/TodoList.Application/DynamicApi/RemoteServiceAttribute.cs b/src/Hua.Todo.Application/DynamicApi/RemoteServiceAttribute.cs similarity index 86% rename from src/TodoList.Application/DynamicApi/RemoteServiceAttribute.cs rename to src/Hua.Todo.Application/DynamicApi/RemoteServiceAttribute.cs index d758d3a..4f9a49d 100644 --- a/src/TodoList.Application/DynamicApi/RemoteServiceAttribute.cs +++ b/src/Hua.Todo.Application/DynamicApi/RemoteServiceAttribute.cs @@ -1,4 +1,4 @@ -namespace TodoList.Application.DynamicApi; +namespace Hua.Todo.Application.DynamicApi; [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Method, AllowMultiple = false)] public class RemoteServiceAttribute : Attribute diff --git a/src/TodoList.Application/TodoList.Application.csproj b/src/Hua.Todo.Application/Hua.Todo.Application.csproj similarity index 91% rename from src/TodoList.Application/TodoList.Application.csproj rename to src/Hua.Todo.Application/Hua.Todo.Application.csproj index c6fed9e..ff4eedd 100644 --- a/src/TodoList.Application/TodoList.Application.csproj +++ b/src/Hua.Todo.Application/Hua.Todo.Application.csproj @@ -20,7 +20,7 @@ - + diff --git a/src/Hua.Todo.Application/Interfaces/IDynamicApiService.cs b/src/Hua.Todo.Application/Interfaces/IDynamicApiService.cs new file mode 100644 index 0000000..b1f989e --- /dev/null +++ b/src/Hua.Todo.Application/Interfaces/IDynamicApiService.cs @@ -0,0 +1,5 @@ +namespace Hua.Todo.Application.Interfaces; + +public interface IDynamicApiService +{ +} diff --git a/src/TodoList.Application/Interfaces/ITaskService.cs b/src/Hua.Todo.Application/Interfaces/ITaskService.cs similarity index 86% rename from src/TodoList.Application/Interfaces/ITaskService.cs rename to src/Hua.Todo.Application/Interfaces/ITaskService.cs index 185194e..800a62f 100644 --- a/src/TodoList.Application/Interfaces/ITaskService.cs +++ b/src/Hua.Todo.Application/Interfaces/ITaskService.cs @@ -1,6 +1,6 @@ -using TodoList.Application.Models; +using Hua.Todo.Application.Models; -namespace TodoList.Application.Interfaces; +namespace Hua.Todo.Application.Interfaces; public interface ITaskService : IDynamicApiService { diff --git a/src/TodoList.Application/Migrations/20260313044926_InitialCreate.Designer.cs b/src/Hua.Todo.Application/Migrations/20260313044926_InitialCreate.Designer.cs similarity index 93% rename from src/TodoList.Application/Migrations/20260313044926_InitialCreate.Designer.cs rename to src/Hua.Todo.Application/Migrations/20260313044926_InitialCreate.Designer.cs index 931e04a..7dfa92a 100644 --- a/src/TodoList.Application/Migrations/20260313044926_InitialCreate.Designer.cs +++ b/src/Hua.Todo.Application/Migrations/20260313044926_InitialCreate.Designer.cs @@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using TodoList.Application.Data; +using Hua.Todo.Application.Data; #nullable disable -namespace TodoList.Application.Migrations +namespace Hua.Todo.Application.Migrations { [DbContext(typeof(TodoDbContext))] [Migration("20260313044926_InitialCreate")] @@ -20,7 +20,7 @@ namespace TodoList.Application.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.5"); - modelBuilder.Entity("TodoList.Core.Entities.TaskEntity", b => + modelBuilder.Entity("Hua.Todo.Core.Entities.TaskEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() diff --git a/src/TodoList.Application/Migrations/20260313044926_InitialCreate.cs b/src/Hua.Todo.Application/Migrations/20260313044926_InitialCreate.cs similarity index 97% rename from src/TodoList.Application/Migrations/20260313044926_InitialCreate.cs rename to src/Hua.Todo.Application/Migrations/20260313044926_InitialCreate.cs index 71551ef..c803810 100644 --- a/src/TodoList.Application/Migrations/20260313044926_InitialCreate.cs +++ b/src/Hua.Todo.Application/Migrations/20260313044926_InitialCreate.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace TodoList.Application.Migrations +namespace Hua.Todo.Application.Migrations { /// public partial class InitialCreate : Migration diff --git a/src/TodoList.Application/Migrations/20260313092658_AddParentTaskId.Designer.cs b/src/Hua.Todo.Application/Migrations/20260313092658_AddParentTaskId.Designer.cs similarity index 88% rename from src/TodoList.Application/Migrations/20260313092658_AddParentTaskId.Designer.cs rename to src/Hua.Todo.Application/Migrations/20260313092658_AddParentTaskId.Designer.cs index deb519c..e7ab522 100644 --- a/src/TodoList.Application/Migrations/20260313092658_AddParentTaskId.Designer.cs +++ b/src/Hua.Todo.Application/Migrations/20260313092658_AddParentTaskId.Designer.cs @@ -4,11 +4,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using TodoList.Application.Data; +using Hua.Todo.Application.Data; #nullable disable -namespace TodoList.Application.Migrations +namespace Hua.Todo.Application.Migrations { [DbContext(typeof(TodoDbContext))] [Migration("20260313092658_AddParentTaskId")] @@ -20,7 +20,7 @@ namespace TodoList.Application.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.5"); - modelBuilder.Entity("TodoList.Core.Entities.TaskEntity", b => + modelBuilder.Entity("Hua.Todo.Core.Entities.TaskEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -61,9 +61,9 @@ namespace TodoList.Application.Migrations b.ToTable("Tasks"); }); - modelBuilder.Entity("TodoList.Core.Entities.TaskEntity", b => + modelBuilder.Entity("Hua.Todo.Core.Entities.TaskEntity", b => { - b.HasOne("TodoList.Core.Entities.TaskEntity", "ParentTask") + b.HasOne("Hua.Todo.Core.Entities.TaskEntity", "ParentTask") .WithMany("SubTasks") .HasForeignKey("ParentTaskId") .OnDelete(DeleteBehavior.Restrict); @@ -71,7 +71,7 @@ namespace TodoList.Application.Migrations b.Navigation("ParentTask"); }); - modelBuilder.Entity("TodoList.Core.Entities.TaskEntity", b => + modelBuilder.Entity("Hua.Todo.Core.Entities.TaskEntity", b => { b.Navigation("SubTasks"); }); diff --git a/src/TodoList.Application/Migrations/20260313092658_AddParentTaskId.cs b/src/Hua.Todo.Application/Migrations/20260313092658_AddParentTaskId.cs similarity index 97% rename from src/TodoList.Application/Migrations/20260313092658_AddParentTaskId.cs rename to src/Hua.Todo.Application/Migrations/20260313092658_AddParentTaskId.cs index a3b931c..1c529a2 100644 --- a/src/TodoList.Application/Migrations/20260313092658_AddParentTaskId.cs +++ b/src/Hua.Todo.Application/Migrations/20260313092658_AddParentTaskId.cs @@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore.Migrations; #nullable disable -namespace TodoList.Application.Migrations +namespace Hua.Todo.Application.Migrations { /// public partial class AddParentTaskId : Migration diff --git a/src/TodoList.Application/Migrations/TodoDbContextModelSnapshot.cs b/src/Hua.Todo.Application/Migrations/TodoDbContextModelSnapshot.cs similarity index 87% rename from src/TodoList.Application/Migrations/TodoDbContextModelSnapshot.cs rename to src/Hua.Todo.Application/Migrations/TodoDbContextModelSnapshot.cs index 18464f8..4e6620e 100644 --- a/src/TodoList.Application/Migrations/TodoDbContextModelSnapshot.cs +++ b/src/Hua.Todo.Application/Migrations/TodoDbContextModelSnapshot.cs @@ -3,11 +3,11 @@ using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using TodoList.Application.Data; +using Hua.Todo.Application.Data; #nullable disable -namespace TodoList.Application.Migrations +namespace Hua.Todo.Application.Migrations { [DbContext(typeof(TodoDbContext))] partial class TodoDbContextModelSnapshot : ModelSnapshot @@ -17,7 +17,7 @@ namespace TodoList.Application.Migrations #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.5"); - modelBuilder.Entity("TodoList.Core.Entities.TaskEntity", b => + modelBuilder.Entity("Hua.Todo.Core.Entities.TaskEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -58,9 +58,9 @@ namespace TodoList.Application.Migrations b.ToTable("Tasks"); }); - modelBuilder.Entity("TodoList.Core.Entities.TaskEntity", b => + modelBuilder.Entity("Hua.Todo.Core.Entities.TaskEntity", b => { - b.HasOne("TodoList.Core.Entities.TaskEntity", "ParentTask") + b.HasOne("Hua.Todo.Core.Entities.TaskEntity", "ParentTask") .WithMany("SubTasks") .HasForeignKey("ParentTaskId") .OnDelete(DeleteBehavior.Restrict); @@ -68,7 +68,7 @@ namespace TodoList.Application.Migrations b.Navigation("ParentTask"); }); - modelBuilder.Entity("TodoList.Core.Entities.TaskEntity", b => + modelBuilder.Entity("Hua.Todo.Core.Entities.TaskEntity", b => { b.Navigation("SubTasks"); }); diff --git a/src/TodoList.Application/Models/TaskModels.cs b/src/Hua.Todo.Application/Models/TaskModels.cs similarity index 94% rename from src/TodoList.Application/Models/TaskModels.cs rename to src/Hua.Todo.Application/Models/TaskModels.cs index 9f083a3..eb8c586 100644 --- a/src/TodoList.Application/Models/TaskModels.cs +++ b/src/Hua.Todo.Application/Models/TaskModels.cs @@ -1,7 +1,7 @@ -using TodoList.Core.Entities; +using Hua.Todo.Core.Entities; using System.Text.Json.Serialization; -namespace TodoList.Application.Models; +namespace Hua.Todo.Application.Models; public class CreateTaskDto { diff --git a/src/TodoList.Application/Properties/launchSettings.json b/src/Hua.Todo.Application/Properties/launchSettings.json similarity index 89% rename from src/TodoList.Application/Properties/launchSettings.json rename to src/Hua.Todo.Application/Properties/launchSettings.json index fcfe098..910b051 100644 --- a/src/TodoList.Application/Properties/launchSettings.json +++ b/src/Hua.Todo.Application/Properties/launchSettings.json @@ -1,6 +1,6 @@ { "profiles": { - "TodoList.Application": { + "Hua.Todo.Application": { "commandName": "Project", "launchBrowser": true, "environmentVariables": { diff --git a/src/TodoList.Application/Repositories/TaskRepository.cs b/src/Hua.Todo.Application/Repositories/TaskRepository.cs similarity index 93% rename from src/TodoList.Application/Repositories/TaskRepository.cs rename to src/Hua.Todo.Application/Repositories/TaskRepository.cs index c89cefe..8cc8cfa 100644 --- a/src/TodoList.Application/Repositories/TaskRepository.cs +++ b/src/Hua.Todo.Application/Repositories/TaskRepository.cs @@ -1,9 +1,9 @@ using Microsoft.EntityFrameworkCore; -using TodoList.Application.Data; -using TodoList.Core.Entities; -using TodoList.Core.Interfaces; +using Hua.Todo.Application.Data; +using Hua.Todo.Core.Entities; +using Hua.Todo.Core.Interfaces; -namespace TodoList.Application.Repositories; +namespace Hua.Todo.Application.Repositories; public class TaskRepository : ITaskRepository { diff --git a/src/TodoList.Application/ServiceCollectionExtensions.cs b/src/Hua.Todo.Application/ServiceCollectionExtensions.cs similarity index 63% rename from src/TodoList.Application/ServiceCollectionExtensions.cs rename to src/Hua.Todo.Application/ServiceCollectionExtensions.cs index 0bceef9..21ccc79 100644 --- a/src/TodoList.Application/ServiceCollectionExtensions.cs +++ b/src/Hua.Todo.Application/ServiceCollectionExtensions.cs @@ -1,20 +1,20 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; -using TodoList.Application.Data; -using TodoList.Application.Interfaces; -using TodoList.Application.Repositories; -using TodoList.Application.Services; -using TodoList.Core.Interfaces; -using ITaskService = TodoList.Application.Interfaces.ITaskService; +using Hua.Todo.Application.Data; +using Hua.Todo.Application.Interfaces; +using Hua.Todo.Application.Repositories; +using Hua.Todo.Application.Services; +using Hua.Todo.Core.Interfaces; +using ITaskService = Hua.Todo.Application.Interfaces.ITaskService; -namespace TodoList.Application; +namespace Hua.Todo.Application; public static class ServiceCollectionExtensions { public static IServiceCollection AddApplicationServices(this IServiceCollection services, string connectionString) { services.AddDbContext(options => - options.UseSqlite(connectionString, b => b.MigrationsAssembly("TodoList.Application"))); + options.UseSqlite(connectionString, b => b.MigrationsAssembly("Hua.Todo.Application"))); services.AddScoped(); services.AddScoped(); diff --git a/src/TodoList.Application/Services/TaskService.cs b/src/Hua.Todo.Application/Services/TaskService.cs similarity index 95% rename from src/TodoList.Application/Services/TaskService.cs rename to src/Hua.Todo.Application/Services/TaskService.cs index 8ca6fb6..adc9315 100644 --- a/src/TodoList.Application/Services/TaskService.cs +++ b/src/Hua.Todo.Application/Services/TaskService.cs @@ -1,9 +1,9 @@ -using TodoList.Application.Interfaces; -using TodoList.Application.Models; -using TodoList.Core.Entities; -using TodoList.Core.Interfaces; +using Hua.Todo.Application.Interfaces; +using Hua.Todo.Application.Models; +using Hua.Todo.Core.Entities; +using Hua.Todo.Core.Interfaces; -namespace TodoList.Application.Services; +namespace Hua.Todo.Application.Services; public class TaskService : ITaskService { diff --git a/src/TodoList.Core/Entities/TaskEntity.cs b/src/Hua.Todo.Core/Entities/TaskEntity.cs similarity index 93% rename from src/TodoList.Core/Entities/TaskEntity.cs rename to src/Hua.Todo.Core/Entities/TaskEntity.cs index c355257..998e4e4 100644 --- a/src/TodoList.Core/Entities/TaskEntity.cs +++ b/src/Hua.Todo.Core/Entities/TaskEntity.cs @@ -1,7 +1,7 @@ -namespace TodoList.Core.Entities; +namespace Hua.Todo.Core.Entities; /// -/// 任务实体类,表示一个待办事项 +/// 任务实体类,表示一个代办 /// public class TaskEntity { diff --git a/src/TodoList.Core/Entities/TaskPriority.cs b/src/Hua.Todo.Core/Entities/TaskPriority.cs similarity index 91% rename from src/TodoList.Core/Entities/TaskPriority.cs rename to src/Hua.Todo.Core/Entities/TaskPriority.cs index fb8a7bc..83f3844 100644 --- a/src/TodoList.Core/Entities/TaskPriority.cs +++ b/src/Hua.Todo.Core/Entities/TaskPriority.cs @@ -1,4 +1,4 @@ -namespace TodoList.Core.Entities; +namespace Hua.Todo.Core.Entities; /// /// 任务优先级枚举,定义任务的三种优先级级别 diff --git a/src/TodoList.Core/TodoList.Core.csproj b/src/Hua.Todo.Core/Hua.Todo.Core.csproj similarity index 100% rename from src/TodoList.Core/TodoList.Core.csproj rename to src/Hua.Todo.Core/Hua.Todo.Core.csproj diff --git a/src/TodoList.Core/Interfaces/ITaskRepository.cs b/src/Hua.Todo.Core/Interfaces/ITaskRepository.cs similarity index 96% rename from src/TodoList.Core/Interfaces/ITaskRepository.cs rename to src/Hua.Todo.Core/Interfaces/ITaskRepository.cs index d9f9505..a158d70 100644 --- a/src/TodoList.Core/Interfaces/ITaskRepository.cs +++ b/src/Hua.Todo.Core/Interfaces/ITaskRepository.cs @@ -1,6 +1,6 @@ -using TodoList.Core.Entities; +using Hua.Todo.Core.Entities; -namespace TodoList.Core.Interfaces; +namespace Hua.Todo.Core.Interfaces; /// /// 任务仓储接口,定义任务数据访问操作 diff --git a/src/TodoList.Host/TodoList.Host.csproj b/src/Hua.Todo.Host/Hua.Todo.Host.csproj similarity index 90% rename from src/TodoList.Host/TodoList.Host.csproj rename to src/Hua.Todo.Host/Hua.Todo.Host.csproj index 2d2c2b7..cfc9fd1 100644 --- a/src/TodoList.Host/TodoList.Host.csproj +++ b/src/Hua.Todo.Host/Hua.Todo.Host.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/TodoList.Host/Program.cs b/src/Hua.Todo.Host/Program.cs similarity index 71% rename from src/TodoList.Host/Program.cs rename to src/Hua.Todo.Host/Program.cs index 62948c7..2f98173 100644 --- a/src/TodoList.Host/Program.cs +++ b/src/Hua.Todo.Host/Program.cs @@ -1,9 +1,9 @@ using System.Text.Json; using Microsoft.EntityFrameworkCore; -using TodoList.Application; -using TodoList.Application.DynamicApi; -using TodoList.Application.Interfaces; -using TodoList.Application.Models; +using Hua.Todo.Application; +using Hua.Todo.Application.DynamicApi; +using Hua.Todo.Application.Interfaces; +using Hua.Todo.Application.Models; var builder = WebApplication.CreateBuilder(args); @@ -11,7 +11,7 @@ builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); builder.Services.AddAuthorization(); -builder.Services.AddApplicationServices("Data Source=todolist.db"); +builder.Services.AddApplicationServices("Data Source=Hua.Todo.db"); builder.Services.AddCors(options => { @@ -28,7 +28,7 @@ var app = builder.Build(); // Apply database migrations using (var scope = app.Services.CreateScope()) { - var dbContext = scope.ServiceProvider.GetRequiredService(); + var dbContext = scope.ServiceProvider.GetRequiredService(); dbContext.Database.Migrate(); } diff --git a/src/TodoList.Host/Properties/launchSettings.json b/src/Hua.Todo.Host/Properties/launchSettings.json similarity index 100% rename from src/TodoList.Host/Properties/launchSettings.json rename to src/Hua.Todo.Host/Properties/launchSettings.json diff --git a/src/TodoList.Host/appsettings.Development.json b/src/Hua.Todo.Host/appsettings.Development.json similarity index 100% rename from src/TodoList.Host/appsettings.Development.json rename to src/Hua.Todo.Host/appsettings.Development.json diff --git a/src/TodoList.Host/appsettings.json b/src/Hua.Todo.Host/appsettings.json similarity index 100% rename from src/TodoList.Host/appsettings.json rename to src/Hua.Todo.Host/appsettings.json diff --git a/src/TodoList.Maui/App.xaml b/src/Hua.Todo.Maui/App.xaml similarity index 85% rename from src/TodoList.Maui/App.xaml rename to src/Hua.Todo.Maui/App.xaml index 89a62e7..64a5e3f 100644 --- a/src/TodoList.Maui/App.xaml +++ b/src/Hua.Todo.Maui/App.xaml @@ -1,8 +1,8 @@  + xmlns:local="clr-namespace:Hua.Todo.Maui" + x:Class="Hua.Todo.Maui.App"> diff --git a/src/TodoList.Maui/App.xaml.cs b/src/Hua.Todo.Maui/App.xaml.cs similarity index 96% rename from src/TodoList.Maui/App.xaml.cs rename to src/Hua.Todo.Maui/App.xaml.cs index 85f08a1..cb3588d 100644 --- a/src/TodoList.Maui/App.xaml.cs +++ b/src/Hua.Todo.Maui/App.xaml.cs @@ -1,9 +1,9 @@ using Microsoft.Extensions.DependencyInjection; using System; using System.IO; -using TodoList.Maui.Services; -using TodoList.Maui.Views; -using TodoList.Maui.Models; +using Hua.Todo.Maui.Services; +using Hua.Todo.Maui.Views; +using Hua.Todo.Maui.Models; #if WINDOWS using System.Runtime.InteropServices; using Windowing = Microsoft.UI.Windowing; @@ -11,7 +11,7 @@ using WinUiWindow = Microsoft.UI.Xaml.Window; using WinRT.Interop; #endif -namespace TodoList.Maui; +namespace Hua.Todo.Maui; public partial class App : global::Microsoft.Maui.Controls.Application { @@ -70,7 +70,7 @@ protected override Microsoft.Maui.Controls.Window CreateWindow(IActivationState? platformWindow.AppWindow.Closing += (sender, args) => { args.Cancel = true; - new TodoList.Maui.Platforms.Windows.WindowsWindowService().HideWindow(_mainWindow); + new Hua.Todo.Maui.Platforms.Windows.WindowsWindowService().HideWindow(_mainWindow); }; CenterMainWindow(platformWindow); @@ -88,7 +88,7 @@ protected override Microsoft.Maui.Controls.Window CreateWindow(IActivationState? if (_mainWindow == null) return; #if WINDOWS - if (_mainWindow.Handler?.PlatformView is not Window) + if (_mainWindow.Handler?.PlatformView is not WinUiWindow) { if (attempt < 30) { @@ -118,7 +118,7 @@ protected override Microsoft.Maui.Controls.Window CreateWindow(IActivationState? #if WINDOWS if (_mainWindow.Handler != null) { - new TodoList.Maui.Platforms.Windows.WindowsWindowService().RestoreWindow(_mainWindow); + new Hua.Todo.Maui.Platforms.Windows.WindowsWindowService().RestoreWindow(_mainWindow); var platformWindow = _mainWindow.Handler.PlatformView as WinUiWindow; platformWindow?.Activate(); } diff --git a/src/TodoList.Maui/AppShell.xaml b/src/Hua.Todo.Maui/AppShell.xaml similarity index 59% rename from src/TodoList.Maui/AppShell.xaml rename to src/Hua.Todo.Maui/AppShell.xaml index 28863e4..62aa1d1 100644 --- a/src/TodoList.Maui/AppShell.xaml +++ b/src/Hua.Todo.Maui/AppShell.xaml @@ -1,11 +1,11 @@ + xmlns:local="clr-namespace:Hua.Todo.Maui" + xmlns:views="clr-namespace:Hua.Todo.Maui.Views" + Title="Hua.Todo.Maui"> maccatalyst-x64;maccatalyst-arm64 --> Exe - TodoList.Maui + Hua.Todo.Maui true true enable enable 65001 - - C:\Users\ShaoHua\AppData\Local\Android\Sdk + + $(USERPROFILE)\AppData\Local\Android\Sdk - 待办事项 + 代办 - com.companyname.todolist.maui + com.companyname.Hua.Todo.maui 1.1.5 @@ -34,9 +34,9 @@ 1 - 待办事项 - 待办事项 - TodoList + 待办 + 待办 + Hua.Todo Copyright 2024 @@ -48,8 +48,8 @@ 10.0.17763.0 10.0.17763.0 - $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)/../TodoList.Web')) - $(TodoListWebDir)\dist + $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)/../Hua.Todo.Web')) + $(TodoWebDir)\dist false false @@ -115,7 +115,7 @@ - + @@ -146,52 +146,38 @@ - - - - + + + + - + - <_TodoListWebDistFiles Include="$(TodoListWebDistDir)\**\*" /> + <_TodoWebDistFiles Include="$(TodoWebDistDir)\**\*" /> - + - + wwwroot/%(RecursiveDir)%(Filename)%(Extension) - + - <_TodoListWebDistFiles Include="$(TodoListWebDistDir)\**\*" /> + <_TodoWebDistFiles Include="$(TodoWebDistDir)\**\*" /> - + diff --git a/src/TodoList.Maui/TodoList.Maui.csproj.DotSettings b/src/Hua.Todo.Maui/Hua.Todo.Maui.csproj.DotSettings similarity index 100% rename from src/TodoList.Maui/TodoList.Maui.csproj.DotSettings rename to src/Hua.Todo.Maui/Hua.Todo.Maui.csproj.DotSettings diff --git a/src/TodoList.Maui/MauiProgram.cs b/src/Hua.Todo.Maui/MauiProgram.cs similarity index 78% rename from src/TodoList.Maui/MauiProgram.cs rename to src/Hua.Todo.Maui/MauiProgram.cs index 9c70f39..bf16cee 100644 --- a/src/TodoList.Maui/MauiProgram.cs +++ b/src/Hua.Todo.Maui/MauiProgram.cs @@ -2,13 +2,13 @@ using System.Text.Json; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using Microsoft.Data.Sqlite; -using TodoList.Application; -using TodoList.Application.Data; -using TodoList.Maui.Models; -using TodoList.Maui.Services; -using TodoList.Maui.Services.Platforms; +using Hua.Todo.Application; +using Hua.Todo.Application.Data; +using Hua.Todo.Maui.Models; +using Hua.Todo.Maui.Services; +using Hua.Todo.Maui.Services.Platforms; -namespace TodoList.Maui; +namespace Hua.Todo.Maui; public static class MauiProgram { @@ -28,8 +28,14 @@ public static class MauiProgram // Set default connection string if not provided if (string.IsNullOrEmpty(appSettings.WebServer.ConnectionString)) { - var dbPath = Path.Combine(FileSystem.AppDataDirectory, "todolist.db"); - appSettings.WebServer.ConnectionString = $"Data Source={dbPath}"; + var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + var dbDir = Path.Combine(localAppData, "Hua.Todo"); + if (!Directory.Exists(dbDir)) + { + Directory.CreateDirectory(dbDir); + } + var dbPath = Path.Combine(dbDir, "Hua.Todo.db"); + appSettings.WebServer.ConnectionString = $"Data Source={dbPath};Cache=Shared"; } builder.Services.AddSingleton(appSettings); @@ -63,8 +69,18 @@ public static class MauiProgram var app = builder.Build(); - _ = Task.Run(() => InitializeDatabase(app.Services, connectionString)); - _ = Task.Run(() => StartWebServer(app.Services)); + _ = Task.Run(async () => + { + try + { + InitializeDatabase(app.Services, connectionString); + await StartWebServer(app.Services); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($"App initialization failed: {ex}"); + } + }); return app; } @@ -117,6 +133,8 @@ public static class MauiProgram } } + // Ensure WAL mode to avoid locking issues + dbContext.Database.ExecuteSqlRaw("PRAGMA journal_mode=WAL;"); dbContext.Database.Migrate(); } catch (Exception ex) @@ -134,12 +152,12 @@ public static class MauiProgram } } - private static void StartWebServer(IServiceProvider services) + private static async Task StartWebServer(IServiceProvider services) { try { var webServer = services.GetRequiredService(); - _ = webServer.StartAsync(); + await webServer.StartAsync(); } catch (Exception ex) { diff --git a/src/TodoList.Maui/Models/AppSettings.cs b/src/Hua.Todo.Maui/Models/AppSettings.cs similarity index 97% rename from src/TodoList.Maui/Models/AppSettings.cs rename to src/Hua.Todo.Maui/Models/AppSettings.cs index 93bfd42..e5b8803 100644 --- a/src/TodoList.Maui/Models/AppSettings.cs +++ b/src/Hua.Todo.Maui/Models/AppSettings.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace TodoList.Maui.Models; +namespace Hua.Todo.Maui.Models; public class AppSettings { diff --git a/src/TodoList.Maui/Models/HotKeyConfig.cs b/src/Hua.Todo.Maui/Models/HotKeyConfig.cs similarity index 98% rename from src/TodoList.Maui/Models/HotKeyConfig.cs rename to src/Hua.Todo.Maui/Models/HotKeyConfig.cs index 2fa0b7e..53d0db9 100644 --- a/src/TodoList.Maui/Models/HotKeyConfig.cs +++ b/src/Hua.Todo.Maui/Models/HotKeyConfig.cs @@ -1,7 +1,7 @@ using System.ComponentModel; using System.Runtime.CompilerServices; -namespace TodoList.Maui.Models +namespace Hua.Todo.Maui.Models { /// /// 热键配置模型类 diff --git a/src/TodoList.Maui/Models/QuickEntryData.cs b/src/Hua.Todo.Maui/Models/QuickEntryData.cs similarity index 93% rename from src/TodoList.Maui/Models/QuickEntryData.cs rename to src/Hua.Todo.Maui/Models/QuickEntryData.cs index 254f9a6..0558309 100644 --- a/src/TodoList.Maui/Models/QuickEntryData.cs +++ b/src/Hua.Todo.Maui/Models/QuickEntryData.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace TodoList.Maui.Models +namespace Hua.Todo.Maui.Models { public class QuickEntryData { diff --git a/src/TodoList.Maui/Models/TodoItem.cs b/src/Hua.Todo.Maui/Models/TodoItem.cs similarity index 88% rename from src/TodoList.Maui/Models/TodoItem.cs rename to src/Hua.Todo.Maui/Models/TodoItem.cs index e4ed206..3d555b4 100644 --- a/src/TodoList.Maui/Models/TodoItem.cs +++ b/src/Hua.Todo.Maui/Models/TodoItem.cs @@ -1,7 +1,7 @@ -namespace TodoList.Maui.Models +namespace Hua.Todo.Maui.Models { /// - /// 待办事项模型类 + /// 代办模型类 /// public class TodoItem { diff --git a/src/TodoList.Maui/Platforms/Android/AndroidAssetFileProvider.cs b/src/Hua.Todo.Maui/Platforms/Android/AndroidAssetFileProvider.cs similarity index 98% rename from src/TodoList.Maui/Platforms/Android/AndroidAssetFileProvider.cs rename to src/Hua.Todo.Maui/Platforms/Android/AndroidAssetFileProvider.cs index 1895ff1..1702f54 100644 --- a/src/TodoList.Maui/Platforms/Android/AndroidAssetFileProvider.cs +++ b/src/Hua.Todo.Maui/Platforms/Android/AndroidAssetFileProvider.cs @@ -2,7 +2,7 @@ using Android.Content.Res; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Primitives; -namespace TodoList.Maui.Platforms.Android; +namespace Hua.Todo.Maui.Platforms.Android; public sealed class AndroidAssetFileProvider : IFileProvider { diff --git a/src/TodoList.Maui/Platforms/Android/AndroidManifest.xml b/src/Hua.Todo.Maui/Platforms/Android/AndroidManifest.xml similarity index 100% rename from src/TodoList.Maui/Platforms/Android/AndroidManifest.xml rename to src/Hua.Todo.Maui/Platforms/Android/AndroidManifest.xml diff --git a/src/TodoList.Maui/Platforms/Android/MainActivity.cs b/src/Hua.Todo.Maui/Platforms/Android/MainActivity.cs similarity index 96% rename from src/TodoList.Maui/Platforms/Android/MainActivity.cs rename to src/Hua.Todo.Maui/Platforms/Android/MainActivity.cs index 3973942..a3b605f 100644 --- a/src/TodoList.Maui/Platforms/Android/MainActivity.cs +++ b/src/Hua.Todo.Maui/Platforms/Android/MainActivity.cs @@ -2,7 +2,7 @@ using Android.App; using Android.Content.PM; using Android.OS; -namespace TodoList.Maui; +namespace Hua.Todo.Maui; [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTop, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] public class MainActivity : MauiAppCompatActivity diff --git a/src/TodoList.Maui/Platforms/Android/MainApplication.cs b/src/Hua.Todo.Maui/Platforms/Android/MainApplication.cs similarity index 92% rename from src/TodoList.Maui/Platforms/Android/MainApplication.cs rename to src/Hua.Todo.Maui/Platforms/Android/MainApplication.cs index dfd526d..4fad2c3 100644 --- a/src/TodoList.Maui/Platforms/Android/MainApplication.cs +++ b/src/Hua.Todo.Maui/Platforms/Android/MainApplication.cs @@ -1,7 +1,7 @@ using Android.App; using Android.Runtime; -namespace TodoList.Maui; +namespace Hua.Todo.Maui; [Application] public class MainApplication : MauiApplication diff --git a/src/TodoList.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs b/src/Hua.Todo.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs similarity index 99% rename from src/TodoList.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs rename to src/Hua.Todo.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs index 6f410ae..7fc1aed 100644 --- a/src/TodoList.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs +++ b/src/Hua.Todo.Maui/Platforms/Android/MobileEmbeddedWebServerService.cs @@ -3,11 +3,11 @@ using System.Net.Sockets; using System.Text; using System.Text.Json; using System.Text.Json.Serialization; -using TodoList.Application.Interfaces; -using TodoList.Application.Models; -using TodoList.Maui.Models; +using Hua.Todo.Application.Interfaces; +using Hua.Todo.Application.Models; +using Hua.Todo.Maui.Models; -namespace TodoList.Maui.Services; +namespace Hua.Todo.Maui.Services; public sealed class MobileEmbeddedWebServerService : IEmbeddedWebServerService { diff --git a/src/TodoList.Maui/Platforms/Android/Resources/drawable/appicon.xml b/src/Hua.Todo.Maui/Platforms/Android/Resources/drawable/appicon.xml similarity index 100% rename from src/TodoList.Maui/Platforms/Android/Resources/drawable/appicon.xml rename to src/Hua.Todo.Maui/Platforms/Android/Resources/drawable/appicon.xml diff --git a/src/TodoList.Maui/Platforms/Android/Resources/drawable/appicon_round.xml b/src/Hua.Todo.Maui/Platforms/Android/Resources/drawable/appicon_round.xml similarity index 100% rename from src/TodoList.Maui/Platforms/Android/Resources/drawable/appicon_round.xml rename to src/Hua.Todo.Maui/Platforms/Android/Resources/drawable/appicon_round.xml diff --git a/src/TodoList.Maui/Platforms/Android/Resources/values/colors.xml b/src/Hua.Todo.Maui/Platforms/Android/Resources/values/colors.xml similarity index 100% rename from src/TodoList.Maui/Platforms/Android/Resources/values/colors.xml rename to src/Hua.Todo.Maui/Platforms/Android/Resources/values/colors.xml diff --git a/src/TodoList.Maui/Platforms/Android/Resources/xml/network_security_config.xml b/src/Hua.Todo.Maui/Platforms/Android/Resources/xml/network_security_config.xml similarity index 100% rename from src/TodoList.Maui/Platforms/Android/Resources/xml/network_security_config.xml rename to src/Hua.Todo.Maui/Platforms/Android/Resources/xml/network_security_config.xml diff --git a/src/TodoList.Maui/Platforms/iOS/AppDelegate.cs b/src/Hua.Todo.Maui/Platforms/MacCatalyst/AppDelegate.cs similarity index 87% rename from src/TodoList.Maui/Platforms/iOS/AppDelegate.cs rename to src/Hua.Todo.Maui/Platforms/MacCatalyst/AppDelegate.cs index 8ac3d66..cf3b1b5 100644 --- a/src/TodoList.Maui/Platforms/iOS/AppDelegate.cs +++ b/src/Hua.Todo.Maui/Platforms/MacCatalyst/AppDelegate.cs @@ -1,6 +1,6 @@ using Foundation; -namespace TodoList.Maui; +namespace Hua.Todo.Maui; [Register("AppDelegate")] public class AppDelegate : MauiUIApplicationDelegate diff --git a/src/TodoList.Maui/Platforms/MacCatalyst/Entitlements.plist b/src/Hua.Todo.Maui/Platforms/MacCatalyst/Entitlements.plist similarity index 100% rename from src/TodoList.Maui/Platforms/MacCatalyst/Entitlements.plist rename to src/Hua.Todo.Maui/Platforms/MacCatalyst/Entitlements.plist diff --git a/src/TodoList.Maui/Platforms/MacCatalyst/Info.plist b/src/Hua.Todo.Maui/Platforms/MacCatalyst/Info.plist similarity index 100% rename from src/TodoList.Maui/Platforms/MacCatalyst/Info.plist rename to src/Hua.Todo.Maui/Platforms/MacCatalyst/Info.plist diff --git a/src/TodoList.Maui/Platforms/MacCatalyst/Program.cs b/src/Hua.Todo.Maui/Platforms/MacCatalyst/Program.cs similarity index 92% rename from src/TodoList.Maui/Platforms/MacCatalyst/Program.cs rename to src/Hua.Todo.Maui/Platforms/MacCatalyst/Program.cs index a158ec6..baf24a8 100644 --- a/src/TodoList.Maui/Platforms/MacCatalyst/Program.cs +++ b/src/Hua.Todo.Maui/Platforms/MacCatalyst/Program.cs @@ -1,7 +1,7 @@ using ObjCRuntime; using UIKit; -namespace TodoList.Maui; +namespace Hua.Todo.Maui; public class Program { diff --git a/src/TodoList.Maui/Platforms/Windows/App.xaml b/src/Hua.Todo.Maui/Platforms/Windows/App.xaml similarity index 73% rename from src/TodoList.Maui/Platforms/Windows/App.xaml rename to src/Hua.Todo.Maui/Platforms/Windows/App.xaml index e6c8b8b..17d54de 100644 --- a/src/TodoList.Maui/Platforms/Windows/App.xaml +++ b/src/Hua.Todo.Maui/Platforms/Windows/App.xaml @@ -1,8 +1,8 @@  + xmlns:local="using:Hua.Todo.Maui.WinUI"> diff --git a/src/TodoList.Maui/Platforms/Windows/App.xaml.cs b/src/Hua.Todo.Maui/Platforms/Windows/App.xaml.cs similarity index 95% rename from src/TodoList.Maui/Platforms/Windows/App.xaml.cs rename to src/Hua.Todo.Maui/Platforms/Windows/App.xaml.cs index 73793d3..1fbd1f9 100644 --- a/src/TodoList.Maui/Platforms/Windows/App.xaml.cs +++ b/src/Hua.Todo.Maui/Platforms/Windows/App.xaml.cs @@ -3,7 +3,7 @@ // To learn more about WinUI, the WinUI project structure, // and more about our project templates, see: http://aka.ms/winui-project-info. -namespace TodoList.Maui.WinUI; +namespace Hua.Todo.Maui.WinUI; /// /// Provides application-specific behavior to supplement the default Application class. diff --git a/src/TodoList.Maui/Platforms/Windows/Package.appxmanifest b/src/Hua.Todo.Maui/Platforms/Windows/Package.appxmanifest similarity index 100% rename from src/TodoList.Maui/Platforms/Windows/Package.appxmanifest rename to src/Hua.Todo.Maui/Platforms/Windows/Package.appxmanifest diff --git a/src/TodoList.Maui/Platforms/Windows/WindowsKeyboardHandler.cs b/src/Hua.Todo.Maui/Platforms/Windows/WindowsKeyboardHandler.cs similarity index 98% rename from src/TodoList.Maui/Platforms/Windows/WindowsKeyboardHandler.cs rename to src/Hua.Todo.Maui/Platforms/Windows/WindowsKeyboardHandler.cs index 51a811a..d568553 100644 --- a/src/TodoList.Maui/Platforms/Windows/WindowsKeyboardHandler.cs +++ b/src/Hua.Todo.Maui/Platforms/Windows/WindowsKeyboardHandler.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace TodoList.Maui.Platforms.Windows +namespace Hua.Todo.Maui.Platforms.Windows { public class WindowsKeyboardHandler : IDisposable { diff --git a/src/TodoList.Maui/Platforms/Windows/WindowsWindowService.cs b/src/Hua.Todo.Maui/Platforms/Windows/WindowsWindowService.cs similarity index 97% rename from src/TodoList.Maui/Platforms/Windows/WindowsWindowService.cs rename to src/Hua.Todo.Maui/Platforms/Windows/WindowsWindowService.cs index 7d78c1b..34053e2 100644 --- a/src/TodoList.Maui/Platforms/Windows/WindowsWindowService.cs +++ b/src/Hua.Todo.Maui/Platforms/Windows/WindowsWindowService.cs @@ -4,7 +4,7 @@ using Microsoft.Maui.Controls; using Microsoft.UI.Windowing; using WinRT.Interop; -namespace TodoList.Maui.Platforms.Windows +namespace Hua.Todo.Maui.Platforms.Windows { public class WindowsWindowService { diff --git a/src/TodoList.Maui/Platforms/Windows/app.manifest b/src/Hua.Todo.Maui/Platforms/Windows/app.manifest similarity index 92% rename from src/TodoList.Maui/Platforms/Windows/app.manifest rename to src/Hua.Todo.Maui/Platforms/Windows/app.manifest index 17c7afe..2a3c57e 100644 --- a/src/TodoList.Maui/Platforms/Windows/app.manifest +++ b/src/Hua.Todo.Maui/Platforms/Windows/app.manifest @@ -1,6 +1,6 @@ - + diff --git a/src/TodoList.Maui/Platforms/MacCatalyst/AppDelegate.cs b/src/Hua.Todo.Maui/Platforms/iOS/AppDelegate.cs similarity index 87% rename from src/TodoList.Maui/Platforms/MacCatalyst/AppDelegate.cs rename to src/Hua.Todo.Maui/Platforms/iOS/AppDelegate.cs index 8ac3d66..cf3b1b5 100644 --- a/src/TodoList.Maui/Platforms/MacCatalyst/AppDelegate.cs +++ b/src/Hua.Todo.Maui/Platforms/iOS/AppDelegate.cs @@ -1,6 +1,6 @@ using Foundation; -namespace TodoList.Maui; +namespace Hua.Todo.Maui; [Register("AppDelegate")] public class AppDelegate : MauiUIApplicationDelegate diff --git a/src/TodoList.Maui/Platforms/iOS/Info.plist b/src/Hua.Todo.Maui/Platforms/iOS/Info.plist similarity index 100% rename from src/TodoList.Maui/Platforms/iOS/Info.plist rename to src/Hua.Todo.Maui/Platforms/iOS/Info.plist diff --git a/src/TodoList.Maui/Platforms/iOS/Program.cs b/src/Hua.Todo.Maui/Platforms/iOS/Program.cs similarity index 92% rename from src/TodoList.Maui/Platforms/iOS/Program.cs rename to src/Hua.Todo.Maui/Platforms/iOS/Program.cs index a158ec6..baf24a8 100644 --- a/src/TodoList.Maui/Platforms/iOS/Program.cs +++ b/src/Hua.Todo.Maui/Platforms/iOS/Program.cs @@ -1,7 +1,7 @@ using ObjCRuntime; using UIKit; -namespace TodoList.Maui; +namespace Hua.Todo.Maui; public class Program { diff --git a/src/TodoList.Maui/Platforms/iOS/Resources/PrivacyInfo.xcprivacy b/src/Hua.Todo.Maui/Platforms/iOS/Resources/PrivacyInfo.xcprivacy similarity index 100% rename from src/TodoList.Maui/Platforms/iOS/Resources/PrivacyInfo.xcprivacy rename to src/Hua.Todo.Maui/Platforms/iOS/Resources/PrivacyInfo.xcprivacy diff --git a/src/TodoList.Maui/README.md b/src/Hua.Todo.Maui/README.md similarity index 89% rename from src/TodoList.Maui/README.md rename to src/Hua.Todo.Maui/README.md index 5dd7f10..1c91a6e 100644 --- a/src/TodoList.Maui/README.md +++ b/src/Hua.Todo.Maui/README.md @@ -1,8 +1,8 @@ -# TodoList MAUI 跨平台快捷键功能 +# Hua.Todo MAUI 跨平台快捷键功能 ## 功能概述 -本项目实现了基于 MAUI + WebView 架构的跨平台待办事项管理应用,支持全局快捷键快速唤醒功能。 +本项目实现了基于 MAUI + WebView 架构的跨平台代办管理应用,支持全局快捷键快速唤醒功能。 ## 支持的平台 @@ -25,14 +25,14 @@ - 设置持久化保存 ### 3. WebView 集成 -- 主界面嵌入 WebView,显示 TodoList Web 应用 +- 主界面嵌入 WebView,显示 Hua.Todo Web 应用 - 快捷键按下时自动激活窗口并聚焦 WebView - 支持与本地 API 服务通信 ## 项目结构 ``` -TodoList.Maui/ +Hua.Todo.Maui/ ├── Models/ │ └── HotKeyConfig.cs # 快捷键配置模型 ├── Services/ @@ -58,21 +58,21 @@ TodoList.Maui/ #### Windows ```bash -cd TodoList.Maui +cd Hua.Todo.Maui dotnet build -f net10.0-windows10.0.19041.0 dotnet run -f net10.0-windows10.0.19041.0 ``` #### macOS ```bash -cd TodoList.Maui +cd Hua.Todo.Maui dotnet build -f net10.0-maccatalyst dotnet run -f net10.0-maccatalyst ``` #### Android ```bash -cd TodoList.Maui +cd Hua.Todo.Maui dotnet build -f net10.0-android dotnet run -f net10.0-android ``` @@ -134,7 +134,7 @@ dotnet run -f net10.0-android 1. **macOS 权限**: 首次运行时需要在系统设置中授予辅助功能权限 2. **Windows UAC**: 某些情况下可能需要管理员权限 3. **移动端限制**: 移动端不支持真正的全局快捷键,使用通知快捷方式替代 -4. **WebView**: 确保 TodoList.Api 服务在 `http://localhost:5173` 运行 +4. **WebView**: 确保 Hua.Todo.Api 服务在 `http://localhost:5173` 运行 ## 后续计划 @@ -146,4 +146,4 @@ dotnet run -f net10.0-android ## 许可证 -MIT License \ No newline at end of file +AGPL-3.0 License ([English](file:///d:/Proj/Hua.Todo/LICENSE) | [中文](file:///d:/Proj/Hua.Todo/LICENSE.zh-CN)) \ No newline at end of file diff --git a/src/TodoList.Maui/Resources/AppIcon/appicon.svg b/src/Hua.Todo.Maui/Resources/AppIcon/appicon.svg similarity index 100% rename from src/TodoList.Maui/Resources/AppIcon/appicon.svg rename to src/Hua.Todo.Maui/Resources/AppIcon/appicon.svg diff --git a/src/TodoList.Maui/Resources/AppIcon/appiconfg.svg b/src/Hua.Todo.Maui/Resources/AppIcon/appiconfg.svg similarity index 100% rename from src/TodoList.Maui/Resources/AppIcon/appiconfg.svg rename to src/Hua.Todo.Maui/Resources/AppIcon/appiconfg.svg diff --git a/src/TodoList.Maui/Resources/Fonts/OpenSans-Regular.ttf b/src/Hua.Todo.Maui/Resources/Fonts/OpenSans-Regular.ttf similarity index 100% rename from src/TodoList.Maui/Resources/Fonts/OpenSans-Regular.ttf rename to src/Hua.Todo.Maui/Resources/Fonts/OpenSans-Regular.ttf diff --git a/src/TodoList.Maui/Resources/Fonts/OpenSans-Semibold.ttf b/src/Hua.Todo.Maui/Resources/Fonts/OpenSans-Semibold.ttf similarity index 100% rename from src/TodoList.Maui/Resources/Fonts/OpenSans-Semibold.ttf rename to src/Hua.Todo.Maui/Resources/Fonts/OpenSans-Semibold.ttf diff --git a/src/TodoList.Maui/Resources/Images/app_titlebar_icon.svg b/src/Hua.Todo.Maui/Resources/Images/app_titlebar_icon.svg similarity index 100% rename from src/TodoList.Maui/Resources/Images/app_titlebar_icon.svg rename to src/Hua.Todo.Maui/Resources/Images/app_titlebar_icon.svg diff --git a/src/TodoList.Maui/Resources/Images/dotnet_bot.png b/src/Hua.Todo.Maui/Resources/Images/dotnet_bot.png similarity index 100% rename from src/TodoList.Maui/Resources/Images/dotnet_bot.png rename to src/Hua.Todo.Maui/Resources/Images/dotnet_bot.png diff --git a/src/TodoList.Maui/Resources/Images/titlebar_icon.png b/src/Hua.Todo.Maui/Resources/Images/titlebar_icon.png similarity index 100% rename from src/TodoList.Maui/Resources/Images/titlebar_icon.png rename to src/Hua.Todo.Maui/Resources/Images/titlebar_icon.png diff --git a/src/TodoList.Maui/Resources/Raw/AboutAssets.txt b/src/Hua.Todo.Maui/Resources/Raw/AboutAssets.txt similarity index 100% rename from src/TodoList.Maui/Resources/Raw/AboutAssets.txt rename to src/Hua.Todo.Maui/Resources/Raw/AboutAssets.txt diff --git a/src/TodoList.Maui/Resources/Splash/splash.svg b/src/Hua.Todo.Maui/Resources/Splash/splash.svg similarity index 100% rename from src/TodoList.Maui/Resources/Splash/splash.svg rename to src/Hua.Todo.Maui/Resources/Splash/splash.svg diff --git a/src/TodoList.Maui/Resources/Styles/Colors.xaml b/src/Hua.Todo.Maui/Resources/Styles/Colors.xaml similarity index 100% rename from src/TodoList.Maui/Resources/Styles/Colors.xaml rename to src/Hua.Todo.Maui/Resources/Styles/Colors.xaml diff --git a/src/TodoList.Maui/Resources/Styles/Styles.xaml b/src/Hua.Todo.Maui/Resources/Styles/Styles.xaml similarity index 100% rename from src/TodoList.Maui/Resources/Styles/Styles.xaml rename to src/Hua.Todo.Maui/Resources/Styles/Styles.xaml diff --git a/src/TodoList.Maui/Services/AppMetadata.cs b/src/Hua.Todo.Maui/Services/AppMetadata.cs similarity index 97% rename from src/TodoList.Maui/Services/AppMetadata.cs rename to src/Hua.Todo.Maui/Services/AppMetadata.cs index 976b368..801a1ea 100644 --- a/src/TodoList.Maui/Services/AppMetadata.cs +++ b/src/Hua.Todo.Maui/Services/AppMetadata.cs @@ -2,7 +2,7 @@ using Microsoft.Maui.ApplicationModel; using System; using System.Reflection; -namespace TodoList.Maui.Services; +namespace Hua.Todo.Maui.Services; public static class AppMetadata { diff --git a/src/TodoList.Maui/Services/EmbeddedWebServerService.cs b/src/Hua.Todo.Maui/Services/EmbeddedWebServerService.cs similarity index 92% rename from src/TodoList.Maui/Services/EmbeddedWebServerService.cs rename to src/Hua.Todo.Maui/Services/EmbeddedWebServerService.cs index 95c1060..e1d1eef 100644 --- a/src/TodoList.Maui/Services/EmbeddedWebServerService.cs +++ b/src/Hua.Todo.Maui/Services/EmbeddedWebServerService.cs @@ -6,12 +6,12 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Hosting; using System.Text.Json; -using TodoList.Application; -using TodoList.Application.DynamicApi; -using TodoList.Maui.Models; -using AppSettings = TodoList.Maui.Models.AppSettings; +using Hua.Todo.Application; +using Hua.Todo.Application.DynamicApi; +using Hua.Todo.Maui.Models; +using AppSettings = Hua.Todo.Maui.Models.AppSettings; -namespace TodoList.Maui.Services; +namespace Hua.Todo.Maui.Services; public class EmbeddedWebServerService : IEmbeddedWebServerService { @@ -30,12 +30,12 @@ public class EmbeddedWebServerService : IEmbeddedWebServerService { if (_webApp != null) return; - var builder = WebApplication.CreateSlimBuilder(); + var builder = WebApplication.CreateBuilder(); builder.WebHost.UseUrls(_appSettings.WebServer.HostUrl); - builder.Services.AddControllers() + .AddApplicationPart(typeof(Hua.Todo.Application.ServiceCollectionExtensions).Assembly) .AddJsonOptions(options => { options.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; diff --git a/src/TodoList.Maui/Services/GlobalHotKeyServiceFactory.cs b/src/Hua.Todo.Maui/Services/GlobalHotKeyServiceFactory.cs similarity index 95% rename from src/TodoList.Maui/Services/GlobalHotKeyServiceFactory.cs rename to src/Hua.Todo.Maui/Services/GlobalHotKeyServiceFactory.cs index 25ac1b8..dcad916 100644 --- a/src/TodoList.Maui/Services/GlobalHotKeyServiceFactory.cs +++ b/src/Hua.Todo.Maui/Services/GlobalHotKeyServiceFactory.cs @@ -1,6 +1,6 @@ -using TodoList.Maui.Services.Platforms; +using Hua.Todo.Maui.Services.Platforms; -namespace TodoList.Maui.Services +namespace Hua.Todo.Maui.Services { /// /// 全局热键服务工厂类,根据平台创建相应的热键服务实例 diff --git a/src/TodoList.Maui/Services/HotKeySettingsService.cs b/src/Hua.Todo.Maui/Services/HotKeySettingsService.cs similarity index 96% rename from src/TodoList.Maui/Services/HotKeySettingsService.cs rename to src/Hua.Todo.Maui/Services/HotKeySettingsService.cs index ba617fb..e9c7db1 100644 --- a/src/TodoList.Maui/Services/HotKeySettingsService.cs +++ b/src/Hua.Todo.Maui/Services/HotKeySettingsService.cs @@ -1,8 +1,8 @@ using Microsoft.Maui.Storage; using System.Text.Json; -using TodoList.Maui.Models; +using Hua.Todo.Maui.Models; -namespace TodoList.Maui.Services +namespace Hua.Todo.Maui.Services { public interface IHotKeySettingsService { diff --git a/src/TodoList.Maui/Services/IEmbeddedWebServerService.cs b/src/Hua.Todo.Maui/Services/IEmbeddedWebServerService.cs similarity index 81% rename from src/TodoList.Maui/Services/IEmbeddedWebServerService.cs rename to src/Hua.Todo.Maui/Services/IEmbeddedWebServerService.cs index 2075fb7..bd8e32b 100644 --- a/src/TodoList.Maui/Services/IEmbeddedWebServerService.cs +++ b/src/Hua.Todo.Maui/Services/IEmbeddedWebServerService.cs @@ -1,4 +1,4 @@ -namespace TodoList.Maui.Services; +namespace Hua.Todo.Maui.Services; public interface IEmbeddedWebServerService { diff --git a/src/TodoList.Maui/Services/IGlobalHotKeyService.cs b/src/Hua.Todo.Maui/Services/IGlobalHotKeyService.cs similarity index 96% rename from src/TodoList.Maui/Services/IGlobalHotKeyService.cs rename to src/Hua.Todo.Maui/Services/IGlobalHotKeyService.cs index c01a575..a219949 100644 --- a/src/TodoList.Maui/Services/IGlobalHotKeyService.cs +++ b/src/Hua.Todo.Maui/Services/IGlobalHotKeyService.cs @@ -1,4 +1,4 @@ -namespace TodoList.Maui.Services +namespace Hua.Todo.Maui.Services { /// /// 全局热键服务接口,定义跨平台热键功能 diff --git a/src/TodoList.Maui/Services/ISystemTrayService.cs b/src/Hua.Todo.Maui/Services/ISystemTrayService.cs similarity index 94% rename from src/TodoList.Maui/Services/ISystemTrayService.cs rename to src/Hua.Todo.Maui/Services/ISystemTrayService.cs index 05eb760..ca5edf9 100644 --- a/src/TodoList.Maui/Services/ISystemTrayService.cs +++ b/src/Hua.Todo.Maui/Services/ISystemTrayService.cs @@ -1,4 +1,4 @@ -namespace TodoList.Maui.Services +namespace Hua.Todo.Maui.Services { public interface ISystemTrayService { diff --git a/src/TodoList.Maui/Services/NoopEmbeddedWebServerService.cs b/src/Hua.Todo.Maui/Services/NoopEmbeddedWebServerService.cs similarity index 88% rename from src/TodoList.Maui/Services/NoopEmbeddedWebServerService.cs rename to src/Hua.Todo.Maui/Services/NoopEmbeddedWebServerService.cs index 9db66bf..8a2b8d0 100644 --- a/src/TodoList.Maui/Services/NoopEmbeddedWebServerService.cs +++ b/src/Hua.Todo.Maui/Services/NoopEmbeddedWebServerService.cs @@ -1,4 +1,4 @@ -namespace TodoList.Maui.Services; +namespace Hua.Todo.Maui.Services; public sealed class NoopEmbeddedWebServerService : IEmbeddedWebServerService { diff --git a/src/TodoList.Maui/Services/Platforms/MacGlobalHotKeyService.cs b/src/Hua.Todo.Maui/Services/Platforms/MacGlobalHotKeyService.cs similarity index 99% rename from src/TodoList.Maui/Services/Platforms/MacGlobalHotKeyService.cs rename to src/Hua.Todo.Maui/Services/Platforms/MacGlobalHotKeyService.cs index 8147862..b3811de 100644 --- a/src/TodoList.Maui/Services/Platforms/MacGlobalHotKeyService.cs +++ b/src/Hua.Todo.Maui/Services/Platforms/MacGlobalHotKeyService.cs @@ -2,7 +2,7 @@ using AppKit; using Foundation; -namespace TodoList.Maui.Services.Platforms +namespace Hua.Todo.Maui.Services.Platforms { /// /// macOS 平台全局热键服务实现类 diff --git a/src/TodoList.Maui/Services/Platforms/MobileGlobalHotKeyService.cs b/src/Hua.Todo.Maui/Services/Platforms/MobileGlobalHotKeyService.cs similarity index 97% rename from src/TodoList.Maui/Services/Platforms/MobileGlobalHotKeyService.cs rename to src/Hua.Todo.Maui/Services/Platforms/MobileGlobalHotKeyService.cs index b50fdf6..ce1f241 100644 --- a/src/TodoList.Maui/Services/Platforms/MobileGlobalHotKeyService.cs +++ b/src/Hua.Todo.Maui/Services/Platforms/MobileGlobalHotKeyService.cs @@ -5,7 +5,7 @@ using AndroidX.Core.App; using AndroidX.Core.Content.PM; using AndroidX.Core.Graphics.Drawable; -namespace TodoList.Maui.Services.Platforms +namespace Hua.Todo.Maui.Services.Platforms { /// /// Android 平台全局热键服务实现类 @@ -82,7 +82,7 @@ namespace TodoList.Maui.Services.Platforms using Foundation; using UIKit; -namespace TodoList.Maui.Services.Platforms +namespace Hua.Todo.Maui.Services.Platforms { /// /// iOS 平台全局热键服务实现类 diff --git a/src/TodoList.Maui/Services/Platforms/WindowsGlobalHotKeyService.cs b/src/Hua.Todo.Maui/Services/Platforms/WindowsGlobalHotKeyService.cs similarity index 99% rename from src/TodoList.Maui/Services/Platforms/WindowsGlobalHotKeyService.cs rename to src/Hua.Todo.Maui/Services/Platforms/WindowsGlobalHotKeyService.cs index d52646f..6d0406c 100644 --- a/src/TodoList.Maui/Services/Platforms/WindowsGlobalHotKeyService.cs +++ b/src/Hua.Todo.Maui/Services/Platforms/WindowsGlobalHotKeyService.cs @@ -3,7 +3,7 @@ using System.Runtime.InteropServices; using WinRT.Interop; using MauiWindow = Microsoft.Maui.Controls.Window; -namespace TodoList.Maui.Services.Platforms +namespace Hua.Todo.Maui.Services.Platforms { /// /// Windows 平台全局热键服务实现类 diff --git a/src/TodoList.Maui/Services/Platforms/WindowsSystemTrayService.cs b/src/Hua.Todo.Maui/Services/Platforms/WindowsSystemTrayService.cs similarity index 97% rename from src/TodoList.Maui/Services/Platforms/WindowsSystemTrayService.cs rename to src/Hua.Todo.Maui/Services/Platforms/WindowsSystemTrayService.cs index c0bdfa0..d62d145 100644 --- a/src/TodoList.Maui/Services/Platforms/WindowsSystemTrayService.cs +++ b/src/Hua.Todo.Maui/Services/Platforms/WindowsSystemTrayService.cs @@ -5,9 +5,9 @@ using System.Linq; using System.Windows.Forms; using Microsoft.UI.Xaml; using WinRT.Interop; -using TodoList.Maui.Services; +using Hua.Todo.Maui.Services; -namespace TodoList.Maui.Services.Platforms +namespace Hua.Todo.Maui.Services.Platforms { public class WindowsSystemTrayService : ISystemTrayService, IDisposable { diff --git a/src/TodoList.Maui/Views/MainPage.xaml b/src/Hua.Todo.Maui/Views/MainPage.xaml similarity index 81% rename from src/TodoList.Maui/Views/MainPage.xaml rename to src/Hua.Todo.Maui/Views/MainPage.xaml index 0bb1ed7..a06a56e 100644 --- a/src/TodoList.Maui/Views/MainPage.xaml +++ b/src/Hua.Todo.Maui/Views/MainPage.xaml @@ -1,7 +1,7 @@ + x:Class="Hua.Todo.Maui.Views.MainPage"> diff --git a/src/TodoList.Maui/Views/MainPage.xaml.cs b/src/Hua.Todo.Maui/Views/MainPage.xaml.cs similarity index 97% rename from src/TodoList.Maui/Views/MainPage.xaml.cs rename to src/Hua.Todo.Maui/Views/MainPage.xaml.cs index 9f048cf..d4ef63a 100644 --- a/src/TodoList.Maui/Views/MainPage.xaml.cs +++ b/src/Hua.Todo.Maui/Views/MainPage.xaml.cs @@ -1,8 +1,8 @@ using Microsoft.Maui.Controls; -using TodoList.Maui.Models; -using TodoList.Maui.Services; +using Hua.Todo.Maui.Models; +using Hua.Todo.Maui.Services; -namespace TodoList.Maui.Views +namespace Hua.Todo.Maui.Views { public partial class MainPage : ContentPage { diff --git a/src/TodoList.Maui/appsettings.json b/src/Hua.Todo.Maui/appsettings.json similarity index 100% rename from src/TodoList.Maui/appsettings.json rename to src/Hua.Todo.Maui/appsettings.json diff --git a/src/TodoList.Maui/icon.ico b/src/Hua.Todo.Maui/icon.ico similarity index 100% rename from src/TodoList.Maui/icon.ico rename to src/Hua.Todo.Maui/icon.ico diff --git a/src/TodoList.Maui/icon.jpg b/src/Hua.Todo.Maui/icon.jpg similarity index 100% rename from src/TodoList.Maui/icon.jpg rename to src/Hua.Todo.Maui/icon.jpg diff --git a/src/TodoList.Maui/setup.iss b/src/Hua.Todo.Maui/setup.iss similarity index 94% rename from src/TodoList.Maui/setup.iss rename to src/Hua.Todo.Maui/setup.iss index 7597388..35e0e26 100644 --- a/src/TodoList.Maui/setup.iss +++ b/src/Hua.Todo.Maui/setup.iss @@ -1,8 +1,8 @@ -#define MyAppName "TodoList" +#define MyAppName "Hua.Todo" #define MyAppVersion "1.1.4" #define MyAppPublisher "ShaoHua" -#define MyAppURL "https://git.we965.cn/Tools/TodoList" -#define MyAppExeName "TodoList.exe" +#define MyAppURL "https://git.we965.cn/Tools/Hua.Todo" +#define MyAppExeName "Hua.Todo.exe" [Setup] ; 1. 改用更快压缩(优先速度) diff --git a/src/TodoList.Web/.gitignore b/src/Hua.Todo.Web/.gitignore similarity index 100% rename from src/TodoList.Web/.gitignore rename to src/Hua.Todo.Web/.gitignore diff --git a/src/TodoList.Web/.vite/deps/_metadata.json b/src/Hua.Todo.Web/.vite/deps/_metadata.json similarity index 100% rename from src/TodoList.Web/.vite/deps/_metadata.json rename to src/Hua.Todo.Web/.vite/deps/_metadata.json diff --git a/src/TodoList.Web/.vite/deps/axios.js b/src/Hua.Todo.Web/.vite/deps/axios.js similarity index 100% rename from src/TodoList.Web/.vite/deps/axios.js rename to src/Hua.Todo.Web/.vite/deps/axios.js diff --git a/src/TodoList.Web/.vite/deps/axios.js.map b/src/Hua.Todo.Web/.vite/deps/axios.js.map similarity index 100% rename from src/TodoList.Web/.vite/deps/axios.js.map rename to src/Hua.Todo.Web/.vite/deps/axios.js.map diff --git a/src/TodoList.Web/.vite/deps/package.json b/src/Hua.Todo.Web/.vite/deps/package.json similarity index 100% rename from src/TodoList.Web/.vite/deps/package.json rename to src/Hua.Todo.Web/.vite/deps/package.json diff --git a/src/TodoList.Web/.vite/deps/vue.js b/src/Hua.Todo.Web/.vite/deps/vue.js similarity index 100% rename from src/TodoList.Web/.vite/deps/vue.js rename to src/Hua.Todo.Web/.vite/deps/vue.js diff --git a/src/TodoList.Web/.vite/deps/vue.js.map b/src/Hua.Todo.Web/.vite/deps/vue.js.map similarity index 100% rename from src/TodoList.Web/.vite/deps/vue.js.map rename to src/Hua.Todo.Web/.vite/deps/vue.js.map diff --git a/src/TodoList.Web/.vscode/extensions.json b/src/Hua.Todo.Web/.vscode/extensions.json similarity index 100% rename from src/TodoList.Web/.vscode/extensions.json rename to src/Hua.Todo.Web/.vscode/extensions.json diff --git a/src/TodoList.Web/README.md b/src/Hua.Todo.Web/README.md similarity index 100% rename from src/TodoList.Web/README.md rename to src/Hua.Todo.Web/README.md diff --git a/src/TodoList.Web/index.html b/src/Hua.Todo.Web/index.html similarity index 91% rename from src/TodoList.Web/index.html rename to src/Hua.Todo.Web/index.html index 14f4213..f82fb05 100644 --- a/src/TodoList.Web/index.html +++ b/src/Hua.Todo.Web/index.html @@ -4,7 +4,7 @@ - todolist-web + Hua.Todo-web
diff --git a/src/TodoList.Web/package-lock.json b/src/Hua.Todo.Web/package-lock.json similarity index 99% rename from src/TodoList.Web/package-lock.json rename to src/Hua.Todo.Web/package-lock.json index c720ab6..27eca56 100644 --- a/src/TodoList.Web/package-lock.json +++ b/src/Hua.Todo.Web/package-lock.json @@ -1,11 +1,11 @@ { - "name": "todolist-web", + "name": "Hua.Todo-web", "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "todolist-web", + "name": "Hua.Todo-web", "version": "0.0.0", "dependencies": { "axios": "^1.13.6", diff --git a/src/TodoList.Web/package.json b/src/Hua.Todo.Web/package.json similarity index 90% rename from src/TodoList.Web/package.json rename to src/Hua.Todo.Web/package.json index f738244..ee5dd60 100644 --- a/src/TodoList.Web/package.json +++ b/src/Hua.Todo.Web/package.json @@ -1,7 +1,8 @@ { - "name": "todolist-web", + "name": "Hua.Todo-web", "private": true, "version": "0.0.0", + "license": "AGPL-3.0", "type": "module", "scripts": { "dev": "vite", diff --git a/src/TodoList.Web/public/favicon.svg b/src/Hua.Todo.Web/public/favicon.svg similarity index 100% rename from src/TodoList.Web/public/favicon.svg rename to src/Hua.Todo.Web/public/favicon.svg diff --git a/src/TodoList.Web/public/icons.svg b/src/Hua.Todo.Web/public/icons.svg similarity index 100% rename from src/TodoList.Web/public/icons.svg rename to src/Hua.Todo.Web/public/icons.svg diff --git a/src/TodoList.Web/src/App.vue b/src/Hua.Todo.Web/src/App.vue similarity index 100% rename from src/TodoList.Web/src/App.vue rename to src/Hua.Todo.Web/src/App.vue diff --git a/src/TodoList.Web/src/api/client.ts b/src/Hua.Todo.Web/src/api/client.ts similarity index 100% rename from src/TodoList.Web/src/api/client.ts rename to src/Hua.Todo.Web/src/api/client.ts diff --git a/src/TodoList.Web/src/api/tasks.ts b/src/Hua.Todo.Web/src/api/tasks.ts similarity index 100% rename from src/TodoList.Web/src/api/tasks.ts rename to src/Hua.Todo.Web/src/api/tasks.ts diff --git a/src/TodoList.Web/src/assets/hero.png b/src/Hua.Todo.Web/src/assets/hero.png similarity index 100% rename from src/TodoList.Web/src/assets/hero.png rename to src/Hua.Todo.Web/src/assets/hero.png diff --git a/src/TodoList.Web/src/assets/vite.svg b/src/Hua.Todo.Web/src/assets/vite.svg similarity index 100% rename from src/TodoList.Web/src/assets/vite.svg rename to src/Hua.Todo.Web/src/assets/vite.svg diff --git a/src/TodoList.Web/src/assets/vue.svg b/src/Hua.Todo.Web/src/assets/vue.svg similarity index 100% rename from src/TodoList.Web/src/assets/vue.svg rename to src/Hua.Todo.Web/src/assets/vue.svg diff --git a/src/TodoList.Web/src/components/HelloWorld.vue b/src/Hua.Todo.Web/src/components/HelloWorld.vue similarity index 100% rename from src/TodoList.Web/src/components/HelloWorld.vue rename to src/Hua.Todo.Web/src/components/HelloWorld.vue diff --git a/src/TodoList.Web/src/components/HotKeySettingsDialog.vue b/src/Hua.Todo.Web/src/components/HotKeySettingsDialog.vue similarity index 100% rename from src/TodoList.Web/src/components/HotKeySettingsDialog.vue rename to src/Hua.Todo.Web/src/components/HotKeySettingsDialog.vue diff --git a/src/TodoList.Web/src/components/TaskEditDialog.vue b/src/Hua.Todo.Web/src/components/TaskEditDialog.vue similarity index 100% rename from src/TodoList.Web/src/components/TaskEditDialog.vue rename to src/Hua.Todo.Web/src/components/TaskEditDialog.vue diff --git a/src/TodoList.Web/src/components/TaskItem.vue b/src/Hua.Todo.Web/src/components/TaskItem.vue similarity index 100% rename from src/TodoList.Web/src/components/TaskItem.vue rename to src/Hua.Todo.Web/src/components/TaskItem.vue diff --git a/src/TodoList.Web/src/components/TaskList.vue b/src/Hua.Todo.Web/src/components/TaskList.vue similarity index 100% rename from src/TodoList.Web/src/components/TaskList.vue rename to src/Hua.Todo.Web/src/components/TaskList.vue diff --git a/src/TodoList.Web/src/main.ts b/src/Hua.Todo.Web/src/main.ts similarity index 100% rename from src/TodoList.Web/src/main.ts rename to src/Hua.Todo.Web/src/main.ts diff --git a/src/TodoList.Web/src/services/localStorageService.ts b/src/Hua.Todo.Web/src/services/localStorageService.ts similarity index 95% rename from src/TodoList.Web/src/services/localStorageService.ts rename to src/Hua.Todo.Web/src/services/localStorageService.ts index f58c6d9..28142d7 100644 --- a/src/TodoList.Web/src/services/localStorageService.ts +++ b/src/Hua.Todo.Web/src/services/localStorageService.ts @@ -1,8 +1,8 @@ import type { Task } from '../types/task'; import { normalizeTasks } from './taskNormalizer'; -const STORAGE_KEY = 'todolist_tasks'; -const SYNC_STATUS_KEY = 'todolist_sync_status'; +const STORAGE_KEY = 'Hua.Todo_tasks'; +const SYNC_STATUS_KEY = 'Hua.Todo_sync_status'; export interface SyncStatus { lastSyncTime: number; diff --git a/src/TodoList.Web/src/services/taskNormalizer.ts b/src/Hua.Todo.Web/src/services/taskNormalizer.ts similarity index 100% rename from src/TodoList.Web/src/services/taskNormalizer.ts rename to src/Hua.Todo.Web/src/services/taskNormalizer.ts diff --git a/src/TodoList.Web/src/style.css b/src/Hua.Todo.Web/src/style.css similarity index 100% rename from src/TodoList.Web/src/style.css rename to src/Hua.Todo.Web/src/style.css diff --git a/src/TodoList.Web/src/types/task.ts b/src/Hua.Todo.Web/src/types/task.ts similarity index 100% rename from src/TodoList.Web/src/types/task.ts rename to src/Hua.Todo.Web/src/types/task.ts diff --git a/src/TodoList.Web/tsconfig.app.json b/src/Hua.Todo.Web/tsconfig.app.json similarity index 100% rename from src/TodoList.Web/tsconfig.app.json rename to src/Hua.Todo.Web/tsconfig.app.json diff --git a/src/TodoList.Web/tsconfig.json b/src/Hua.Todo.Web/tsconfig.json similarity index 100% rename from src/TodoList.Web/tsconfig.json rename to src/Hua.Todo.Web/tsconfig.json diff --git a/src/TodoList.Web/tsconfig.node.json b/src/Hua.Todo.Web/tsconfig.node.json similarity index 100% rename from src/TodoList.Web/tsconfig.node.json rename to src/Hua.Todo.Web/tsconfig.node.json diff --git a/src/TodoList.Web/vite.config.ts b/src/Hua.Todo.Web/vite.config.ts similarity index 100% rename from src/TodoList.Web/vite.config.ts rename to src/Hua.Todo.Web/vite.config.ts diff --git a/src/TodoList.Application/Interfaces/IDynamicApiService.cs b/src/TodoList.Application/Interfaces/IDynamicApiService.cs deleted file mode 100644 index c765b67..0000000 --- a/src/TodoList.Application/Interfaces/IDynamicApiService.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace TodoList.Application.Interfaces; - -public interface IDynamicApiService -{ -} diff --git a/start-forend.ps1 b/start-forend.ps1 index ad3a095..df8e9fa 100644 --- a/start-forend.ps1 +++ b/start-forend.ps1 @@ -5,18 +5,18 @@ param( $ErrorActionPreference = "Stop" Write-Host "====================================" -ForegroundColor Cyan -Write-Host " TodoList.Web 启动脚本" -ForegroundColor Cyan +Write-Host " Hua.Todo.Web 启动脚本" -ForegroundColor Cyan Write-Host "====================================" -ForegroundColor Cyan Write-Host "" -$webProjectPath = Join-Path $PSScriptRoot "src\TodoList.Web" +$webProjectPath = Join-Path $PSScriptRoot "src\Hua.Todo.Web" -Write-Host "[1/2] 检查 TodoList.Web 服务..." -ForegroundColor Yellow +Write-Host "[1/2] 检查 Hua.Todo.Web 服务..." -ForegroundColor Yellow -$webProcess = Get-CimInstance Win32_Process -Filter "Name='node.exe'" | Where-Object { $_.CommandLine -like "*vite*" -or $_.CommandLine -like "*TodoList.Web*" } +$webProcess = Get-CimInstance Win32_Process -Filter "Name='node.exe'" | Where-Object { $_.CommandLine -like "*vite*" -or $_.CommandLine -like "*Hua.Todo.Web*" } if ($webProcess) { - Write-Host "⚠️ TodoList.Web 服务已经在运行中" -ForegroundColor Yellow + Write-Host "⚠️ Hua.Todo.Web 服务已经在运行中" -ForegroundColor Yellow Write-Host " 进程 ID: ($($webProcess.ProcessId))" -ForegroundColor Gray if ($Force) { @@ -43,11 +43,11 @@ if ($webProcess) { exit 0 } } else { - Write-Host "✓ TodoList.Web 服务未运行" -ForegroundColor Green + Write-Host "✓ Hua.Todo.Web 服务未运行" -ForegroundColor Green Write-Host "" } -Write-Host "[2/2] 启动 TodoList.Web 服务..." -ForegroundColor Yellow +Write-Host "[2/2] 启动 Hua.Todo.Web 服务..." -ForegroundColor Yellow if (!(Test-Path $webProjectPath)) { Write-Host "❌ Web 项目路径不存在: $webProjectPath" -ForegroundColor Red @@ -60,7 +60,7 @@ Write-Host "🚀 启动服务..." -ForegroundColor Green try { $webProcess = Start-Process -FilePath "npm.cmd" -ArgumentList "run", "dev" -WorkingDirectory $webProjectPath -PassThru - Write-Host "✅ TodoList.Web 服务已启动" -ForegroundColor Green + Write-Host "✅ Hua.Todo.Web 服务已启动" -ForegroundColor Green Write-Host " 进程 ID: ($($webProcess.Id))" -ForegroundColor Gray Write-Host "" Write-Host "====================================" -ForegroundColor Cyan diff --git a/start-maui.ps1 b/start-maui.ps1 index e0e6331..f2ad7f9 100644 --- a/start-maui.ps1 +++ b/start-maui.ps1 @@ -9,12 +9,12 @@ param( $ErrorActionPreference = "Stop" Write-Host "====================================" -ForegroundColor Cyan -Write-Host " TodoList.Maui 启动脚本" -ForegroundColor Cyan +Write-Host " Hua.Todo.Maui 启动脚本" -ForegroundColor Cyan Write-Host "====================================" -ForegroundColor Cyan Write-Host "" -$mauiProjectPath = Join-Path $PSScriptRoot "src\TodoList.Maui" -$mauiProjectFile = Join-Path $mauiProjectPath "TodoList.Maui.csproj" +$mauiProjectPath = Join-Path $PSScriptRoot "src\Hua.Todo.Maui" +$mauiProjectFile = Join-Path $mauiProjectPath "Hua.Todo.Maui.csproj" if (!(Test-Path $mauiProjectFile)) { Write-Host "❌ MAUI 项目文件不存在: $mauiProjectFile" -ForegroundColor Red @@ -26,15 +26,15 @@ if (!(Get-Command "dotnet" -ErrorAction SilentlyContinue)) { exit 1 } -Write-Host "[1/2] 检查 TodoList.Maui 是否已在运行..." -ForegroundColor Yellow +Write-Host "[1/2] 检查 Hua.Todo.Maui 是否已在运行..." -ForegroundColor Yellow -$runningProcesses = Get-CimInstance Win32_Process -Filter "Name='TodoList.Maui.exe' OR Name='dotnet.exe'" | Where-Object { - $_.CommandLine -like "*TodoList.Maui*" +$runningProcesses = Get-CimInstance Win32_Process -Filter "Name='Hua.Todo.Maui.exe' OR Name='dotnet.exe'" | Where-Object { + $_.CommandLine -like "*Hua.Todo.Maui*" } if ($runningProcesses) { $pids = ($runningProcesses.ProcessId | Sort-Object) -join ", " - Write-Host "⚠️ TodoList.Maui 可能已在运行中" -ForegroundColor Yellow + Write-Host "⚠️ Hua.Todo.Maui 可能已在运行中" -ForegroundColor Yellow Write-Host " 进程 ID: ($pids)" -ForegroundColor Gray if ($Force) { @@ -54,11 +54,11 @@ if ($runningProcesses) { exit 0 } } else { - Write-Host "✓ TodoList.Maui 未运行" -ForegroundColor Green + Write-Host "✓ Hua.Todo.Maui 未运行" -ForegroundColor Green Write-Host "" } -Write-Host "[2/2] 启动 TodoList.Maui..." -ForegroundColor Yellow +Write-Host "[2/2] 启动 Hua.Todo.Maui..." -ForegroundColor Yellow $argumentList = @( "build", @@ -81,7 +81,7 @@ Write-Host "" try { $mauiProcess = Start-Process -FilePath "dotnet" -ArgumentList $argumentList -WorkingDirectory $mauiProjectPath -PassThru - Write-Host "✅ TodoList.Maui 已启动" -ForegroundColor Green + Write-Host "✅ Hua.Todo.Maui 已启动" -ForegroundColor Green Write-Host " 进程 ID: ($($mauiProcess.Id))" -ForegroundColor Gray Write-Host "" Write-Host "📝 提示:" -ForegroundColor Yellow diff --git a/项目结构说明.md b/项目结构说明.md deleted file mode 100644 index 14f8802..0000000 --- a/项目结构说明.md +++ /dev/null @@ -1,344 +0,0 @@ -# TodoList 项目结构说明 - -## 项目概述 - -TodoList 是一个跨平台的待办事项管理应用,采用多种技术栈实现不同平台的客户端。项目包含 WPF 桌面应用、MAUI 跨平台应用、Web 前端以及后端 API 服务。 - -## 项目结构 - -``` -TodoList/ -├── docs/ # 项目文档目录 -│ ├── 产品需求文档.md # 产品需求说明 -│ ├── 产品需求文档-1.1.0.md # v1.1.0版本需求 -│ ├── 技术设计文档.md # 技术架构设计 -│ ├── 代码规范文档.md # 代码编写规范 -│ └── 实现对比文档.md # 不同实现方案对比 -│ -├── src/ # 源代码目录 -│ ├── TodoList.Api/ # 后端 API 项目 (ASP.NET Core) -│ │ ├── Controllers/ # API 控制器 -│ │ │ └── TasksController.cs # 任务相关API端点 -│ │ ├── Data/ # 数据库相关 -│ │ │ ├── TodoDbContext.cs # EF Core 数据库上下文 -│ │ │ └── Migrations/ # 数据库迁移文件 -│ │ │ ├── 20260313044926_InitialCreate.cs -│ │ │ ├── 20260313044926_InitialCreate.Designer.cs -│ │ │ ├── 20260313092658_AddParentTaskId.cs -│ │ │ ├── 20260313092658_AddParentTaskId.Designer.cs -│ │ │ └── TodoDbContextModelSnapshot.cs -│ │ ├── Models/ # 数据模型 -│ │ │ └── TaskModels.cs # 任务数据传输对象 -│ │ ├── Repositories/ # 数据访问层 -│ │ │ └── TaskRepository.cs # 任务仓储实现 -│ │ ├── Services/ # 业务服务层 -│ │ │ └── TaskService.cs # 任务业务逻辑 -│ │ ├── Properties/ # 项目属性 -│ │ │ └── launchSettings.json # 启动配置 -│ │ ├── Program.cs # 应用程序入口 -│ │ ├── appsettings.json # 应用配置 -│ │ ├── appsettings.Development.json # 开发环境配置 -│ │ ├── TodoList.Api.csproj # 项目文件 -│ │ ├── TodoList.Api.http # HTTP 测试文件 -│ │ └── todolist.db # SQLite 数据库文件 -│ │ -│ ├── TodoList.Core/ # 核心业务逻辑层 -│ │ ├── Entities/ # 领域实体 -│ │ │ ├── Task.cs # 任务实体 -│ │ │ └── TaskPriority.cs # 任务优先级枚举 -│ │ ├── Interfaces/ # 接口定义 -│ │ │ ├── ITaskRepository.cs # 任务仓储接口 -│ │ │ └── ITaskService.cs # 任务服务接口 -│ │ ├── Class1.cs # 临时类文件 -│ │ └── TodoList.Core.csproj # 项目文件 -│ │ -│ ├── TodoList.Maui/ # MAUI 跨平台应用 -│ │ ├── Models/ # 数据模型 -│ │ │ ├── HotKeyConfig.cs # 热键配置模型 -│ │ │ └── QuickEntryData.cs # 快速输入数据模型 -│ │ ├── Services/ # 服务层 -│ │ │ ├── Platforms/ # 平台特定服务 -│ │ │ │ ├── WindowsGlobalHotKeyService.cs # Windows热键服务 -│ │ │ │ ├── MacGlobalHotKeyService.cs # macOS热键服务 -│ │ │ │ └── MobileGlobalHotKeyService.cs # 移动端热键服务 -│ │ │ ├── GlobalHotKeyServiceFactory.cs # 热键服务工厂 -│ │ │ ├── HotKeySettingsService.cs # 热键设置服务 -│ │ │ └── IGlobalHotKeyService.cs # 热键服务接口 -│ │ ├── Views/ # 视图层 -│ │ │ ├── MainPage.xaml # 主页面 -│ │ │ ├── MainPage.xaml.cs -│ │ │ ├── QuickEntryPage.xaml # 快速输入页面 -│ │ │ ├── QuickEntryPage.xaml.cs -│ │ │ ├── HotKeySettingsPage.xaml # 热键设置页面 -│ │ │ └── HotKeySettingsPage.xaml.cs -│ │ ├── Platforms/ # 平台特定代码 -│ │ │ ├── Windows/ # Windows 平台 -│ │ │ │ ├── App.xaml -│ │ │ │ ├── App.xaml.cs -│ │ │ │ ├── Package.appxmanifest -│ │ │ │ └── app.manifest -│ │ │ ├── MacCatalyst/ # macOS 平台 -│ │ │ │ ├── AppDelegate.cs -│ │ │ │ ├── Program.cs -│ │ │ │ ├── Info.plist -│ │ │ │ └── Entitlements.plist -│ │ │ ├── iOS/ # iOS 平台 -│ │ │ │ ├── AppDelegate.cs -│ │ │ │ ├── Program.cs -│ │ │ │ ├── Info.plist -│ │ │ │ └── Resources/ -│ │ │ │ └── PrivacyInfo.xcprivacy -│ │ │ └── Android/ # Android 平台 -│ │ │ ├── MainActivity.cs -│ │ │ ├── MainApplication.cs -│ │ │ ├── AndroidManifest.xml -│ │ │ └── Resources/ -│ │ │ └── values/ -│ │ │ └── colors.xml -│ │ ├── Resources/ # 资源文件 -│ │ │ ├── AppIcon/ # 应用图标 -│ │ │ │ ├── appicon.svg -│ │ │ │ └── appiconfg.svg -│ │ │ ├── Fonts/ # 字体文件 -│ │ │ │ ├── OpenSans-Regular.ttf -│ │ │ │ └── OpenSans-Semibold.ttf -│ │ │ ├── Images/ # 图片资源 -│ │ │ │ └── dotnet_bot.png -│ │ │ ├── Splash/ # 启动画面 -│ │ │ │ └── splash.svg -│ │ │ ├── Raw/ # 原始资源 -│ │ │ │ └── AboutAssets.txt -│ │ │ └── Styles/ # 样式资源 -│ │ │ ├── Colors.xaml -│ │ │ └── Styles.xaml -│ │ ├── Properties/ # 项目属性 -│ │ │ └── launchSettings.json -│ │ ├── App.xaml # 应用程序 -│ │ ├── App.xaml.cs -│ │ ├── AppShell.xaml # 应用外壳 -│ │ ├── AppShell.xaml.cs -│ │ ├── MainPage.xaml # 主页面(备用) -│ │ ├── MainPage.xaml.cs -│ │ ├── MauiProgram.cs # MAUI 程序入口 -│ │ ├── TodoList.Maui.csproj # 项目文件 -│ │ ├── IMPLEMENTATION_SUMMARY.md # 实现总结 -│ │ └── README.md # MAUI 项目说明 -│ │ -│ └── TodoList.Web/ # Web 前端项目 (Vue.js) -│ ├── public/ # 静态资源 -│ │ ├── favicon.svg -│ │ └── icons.svg -│ ├── src/ # 源代码 -│ │ ├── api/ # API 调用 -│ │ │ ├── client.ts # HTTP 客户端配置 -│ │ │ └── tasks.ts # 任务相关 API -│ │ ├── assets/ # 资源文件 -│ │ │ ├── hero.png -│ │ │ ├── vite.svg -│ │ │ └── vue.svg -│ │ ├── components/ # Vue 组件 -│ │ │ ├── HelloWorld.vue -│ │ │ ├── TaskList.vue # 任务列表组件 -│ │ │ └── TaskItem.vue # 任务项组件 -│ │ ├── services/ # 服务层 -│ │ │ └── localStorageService.ts # 本地存储服务 -│ │ ├── types/ # TypeScript 类型定义 -│ │ │ └── task.ts # 任务类型 -│ │ ├── App.vue # 根组件 -│ │ ├── main.ts # 应用入口 -│ │ └── style.css # 全局样式 -│ ├── .vscode/ # VS Code 配置 -│ │ └── extensions.json -│ ├── .gitignore -│ ├── index.html # HTML 入口 -│ ├── package.json # Node.js 依赖配置 -│ ├── tsconfig.json # TypeScript 配置 -│ ├── tsconfig.app.json -│ ├── tsconfig.node.json -│ ├── vite.config.ts # Vite 构建配置 -│ └── README.md # Web 项目说明 -│ -├── TodoList/ # WPF 桌面应用项目 -│ ├── Converters/ # 值转换器 -│ │ └── EnumDescriptionConverter.cs -│ ├── Models/ # 数据模型 -│ │ └── TodoItem.cs -│ ├── Services/ # 服务层 -│ │ ├── IDataService.cs # 数据服务接口 -│ │ ├── FileDataService.cs # 文件数据服务 -│ │ ├── SqliteDataService.cs # SQLite 数据服务 -│ │ ├── GlobalShortcutService.cs # 全局快捷键服务 -│ │ └── SettingsService.cs # 设置服务 -│ ├── ViewModels/ # 视图模型 -│ │ ├── MainViewModel.cs -│ │ └── QuickEntryViewModel.cs -│ ├── Views/ # 视图 -│ │ ├── MainWindow.xaml # 主窗口 -│ │ ├── MainWindow.xaml.cs -│ │ ├── QuickEntryWindow.xaml # 快速输入窗口 -│ │ └── QuickEntryWindow.xaml.cs -│ ├── App.xaml # 应用程序 -│ ├── App.xaml.cs -│ ├── AssemblyInfo.cs # 程序集信息 -│ ├── BuildSetup.ps1 # 构建安装包脚本 -│ ├── setup.iss # Inno Setup 安装脚本 -│ ├── icon.ico # 应用图标 -│ └── TodoList.csproj # 项目文件 -│ -├── TodoList.slnx # Visual Studio 解决方案文件 -├── .gitattributes # Git 属性配置 -├── .gitignore # Git 忽略文件配置 -├── README.md # 项目说明文档 -├── SCRIPTS_README.md # 脚本使用说明 -├── start-service.ps1 # 启动服务脚本 -├── stop-service.ps1 # 停止服务脚本 -└── restart-service.ps1 # 重启服务脚本 -``` - -## 技术栈说明 - -### TodoList (WPF 桌面应用) -- **框架**: WPF (Windows Presentation Foundation) -- **语言**: C# (.NET 8.0) -- **架构模式**: MVVM (Model-View-ViewModel) -- **数据存储**: SQLite (sqlite-net-pcl) -- **MVVM 框架**: CommunityToolkit.Mvvm -- **功能**: Windows 桌面应用,支持全局快捷键、快速输入等功能 - -### TodoList.Api (后端 API) -- **框架**: ASP.NET Core Web API -- **语言**: C# (.NET 10.0) -- **ORM**: Entity Framework Core -- **数据库**: SQLite -- **API 文档**: Swashbuckle (Swagger) -- **功能**: 提供 RESTful API,处理业务逻辑和数据持久化 - -### TodoList.Core (核心业务逻辑) -- **语言**: C# (.NET 10.0) -- **架构**: 领域驱动设计 (DDD) -- **功能**: 定义核心实体、接口和业务规则 - -### TodoList.Maui (跨平台应用) -- **框架**: .NET MAUI -- **语言**: C# (.NET 10.0) -- **支持平台**: Windows, macOS, iOS, Android -- **功能**: 跨平台原生应用,支持平台特定的热键功能 - -### TodoList.Web (Web 前端) -- **框架**: Vue.js 3 -- **语言**: TypeScript -- **构建工具**: Vite -- **HTTP 客户端**: Axios -- **状态管理**: Pinia -- **功能**: 响应式 Web 界面,通过 HTTP API 与后端通信 - -## 项目依赖关系 - -``` -TodoList.Web (前端) - ↓ HTTP API -TodoList.Api (后端) - ↓ 项目引用 -TodoList.Core (核心层) - ↓ EF Core -SQLite 数据库 -``` - -## 开发环境要求 - -### 后端开发 -- .NET 10 SDK -- Visual Studio 2022 或更高版本 -- SQLite - -### 前端开发 -- Node.js 18+ -- npm 或 yarn - -### MAUI 开发 -- Visual Studio 2022 17.8 或更高版本 -- .NET MAUI 工作负载 -- 各平台开发工具(Xcode, Android Studio 等) - -### WPF 开发 -- .NET 8 SDK -- Visual Studio 2022 或更高版本 -- Windows 操作系统 - -## 启动方式 - -### 启动后端 API -```bash -cd src/TodoList.Api -dotnet restore -dotnet ef database update -dotnet run -``` - -### 启动 Web 前端 -```bash -cd src/TodoList.Web -npm install -npm run dev -``` - -### 运行 WPF 应用 -```bash -cd TodoList -dotnet run -``` - -### 运行 MAUI 应用 -```bash -cd src/TodoList.Maui -dotnet build -``` - -## API 端点 - -- `GET /api/tasks` - 获取任务列表 -- `GET /api/tasks/{id}` - 获取单个任务 -- `POST /api/tasks` - 创建任务 -- `PUT /api/tasks/{id}` - 更新任务 -- `PATCH /api/tasks/{id}/complete` - 切换完成状态 -- `DELETE /api/tasks/{id}` - 删除任务 - -## 数据库结构 - -### Tasks 表 -- Id (主键) -- Title (标题) -- Description (描述) -- Priority (优先级: High, Medium, Low) -- IsCompleted (完成状态) -- DueDate (截止日期) -- CreatedAt (创建时间) -- UpdatedAt (更新时间) -- ParentTaskId (父任务ID,支持子任务) - -## 脚本说明 - -- `start-service.ps1` - 启动后端服务 -- `stop-service.ps1` - 停止后端服务 -- `restart-service.ps1` - 重启后端服务 -- `TodoList/BuildSetup.ps1` - 构建 WPF 安装包 - -## 版本历史 - -- **v1.0.0**: 初始 WPF 版本 -- **v1.1.0**: 重构为 MAUI + WebView 架构,实现跨平台支持 - -## 注意事项 - -1. WPF 项目仅支持 Windows 平台 -2. MAUI 项目支持多平台,但需要相应的开发环境 -3. Web 项目需要先启动后端 API 服务 -4. SQLite 数据库文件位于 `src/TodoList.Api/todolist.db` -5. 首次运行需要执行数据库迁移命令 - -## 扩展阅读 - -- [产品需求文档](./docs/产品需求文档.md) -- [技术设计文档](./docs/技术设计文档.md) -- [代码规范文档](./docs/代码规范文档.md) -- [实现对比文档](./docs/实现对比文档.md)