Update README and add MIT license

This commit is contained in:
sangge 2025-06-07 23:04:33 +08:00
parent 7e8f95e73e
commit 7f2e43668a
2 changed files with 108 additions and 4 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 CountDown
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,7 +1,90 @@
# Tauri + React + Typescript
# CountDown - 纪念日倒计时应用
This template should help get you started developing with Tauri, React and Typescript in Vite.
一个基于 Tauri + React + TypeScript 构建的跨平台纪念日倒计时应用,支持桌面端和移动端。
## Recommended IDE Setup
## ✨ 特性
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)
- 📅 添加和管理重要纪念日
- ⏰ 实时计算从纪念日开始到现在的天数
- 🎨 8种精美主题每次启动随机切换
- 📱 响应式设计,支持桌面和移动端
- 🗃️ 本地SQLite数据库存储
- ⚡ 基于Tauri的原生性能
## 🎨 主题系统
应用内置8种不同风格的主题
- 🔵 蓝色主题(默认)
- 🟢 绿色主题
- 🟣 紫色主题
- 🟠 橙色主题
- 🩷 粉色主题
- 🔷 青色主题
- ⚫ 暗色主题
- 🌈 渐变主题
每次启动应用会随机选择一个主题,为用户带来不同的视觉体验。
## 🚀 快速开始
### 环境要求
- Node.js 18+
- Rust 1.70+
- pnpm
### 安装依赖
```bash
pnpm install
```
### 开发模式
```bash
pnpm tauri dev
```
### 构建应用
```bash
# 桌面端
pnpm tauri build
# 或使用脚本
./build_desktop.sh
# Android端
./build_android.sh
```
## 🏗️ 技术架构
### 前端
- **框架**: React 18 + TypeScript
- **路由**: React Router DOM
- **构建**: Vite
- **样式**: CSS Variables + 响应式设计
### 后端
- **框架**: Tauri 2.x + Rust
- **数据库**: SQLite (rusqlite)
- **数据序列化**: Serde
- **日期处理**: Chrono
### 数据库结构
```sql
CREATE TABLE anniversaries (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
start_date TEXT NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
```
## 📱 功能页面
应用包含三个主要页面:
- **首页**: 显示所有纪念日列表和天数统计
- **详情页**: 查看单个纪念日详情和删除操作
- **添加页**: 创建新的纪念日记录
## 📄 许可证
本项目使用 [MIT License](LICENSE) 开源协议。