56 Commits

Author SHA1 Message Date
ZhangLei
de96284ac2 feat: 添加Option+点击功能设置,支持复制价格和打开币安交易页面 v1.2.1 2025-11-11 16:47:44 +08:00
ZhangLei
eb27b3be0c feat: 更新 README.md,增加自定义币种管理和图标生成相关信息 2025-11-06 16:28:11 +08:00
ZhangLei
55688e2af7 update README.md v1.2.0 2025-11-04 00:36:22 +08:00
ZhangLei
a508e7f704 feat: 更新重置设置警告信息,详细说明将重置的所有设置项 2025-11-04 00:22:27 +08:00
ZhangLei
c92b03d6c4 feat: 添加自定义币种图标生成器,支持基于首字母生成图标并更新相关视图 2025-11-04 00:06:09 +08:00
ZhangLei
4c59c42f5f feat: 确保偏好设置窗口在显示时获得焦点和激活状态 2025-11-03 23:55:48 +08:00
ZhangLei
bef967706f feat: 更新代理设置默认端口为3128,并在保存设置时应用新端口 2025-11-03 23:52:30 +08:00
ZhangLei
6a1ef44411 feat: 为删除按钮添加帮助提示,调整验证按钮样式和尺寸 2025-11-03 23:15:26 +08:00
ZhangLei
fd0170ac37 feat: 更新自定义币种管理,支持多个币种及验证功能 2025-11-03 23:08:48 +08:00
ZhangLei
91127faebe feat: 初始化偏好设置窗口管理器并添加标签导航 2025-11-03 22:40:42 +08:00
ZhangLei
c6150b1b8f feat: Add support for custom cryptocurrency symbols and caching mechanism
- Implemented CustomCryptoSymbol model to handle user-defined symbols.
- Enhanced PriceManager to manage custom symbols, including fetching and caching prices.
- Updated PriceService to support fetching prices for custom symbols.
- Modified CryptoSymbol to include methods for symbol validation and retrieval.
- Redesigned PreferencesWindowView to allow users to add and delete custom symbols with validation.
- Added caching logic for custom symbol prices to improve performance.
- Updated error handling in PriceError to account for custom symbol scenarios.
2025-11-03 21:47:32 +08:00
ZhangLei
f9f81774a0 更新代理设置输入框的占位符文本 2025-11-03 20:03:26 +08:00
ZhangLei
f88e3eb30f 增强检测更新代码 2025-11-02 22:31:16 +08:00
ZhangLei
0e6869ee08 修复Xcode项目文件中的组名引用
- 更新PBXFileSystemSynchronizedRootGroup名称: test1 → Bitcoin-Monitoring
- 更新productName为Bitcoin-Monitoring
- 修复Xcode中显示红色目录名称的问题
2025-11-02 22:09:42 +08:00
ZhangLei
6383047f9b 重构项目文件结构并重命名根目录
 新功能:
- 重新组织项目文件结构,采用模块化架构
- 重命名根目录: test1 → Bitcoin-Monitoring
- 更新Bundle标识符: com.mark.test1 → com.mark.bitcoin-monitoring

🔧 技术改进:
- Core/: 核心应用逻辑 (BitcoinMonitoringApp, MenuBarManager)
- Managers/: 业务逻辑管理器 (AppSettings, PriceManager, PriceService)
- Models/: 数据模型 (CryptoSymbol, RefreshInterval, BTCPriceResponse)
- Views/: SwiftUI视图组件 (PreferencesWindowView, AboutWindowView)
- Windows/: 窗口管理 (PreferencesWindowManager)
- Resources/: 资源文件 (Assets, entitlements)

📝 文档更新:
- 更新CLAUDE.md中的项目架构说明
- 修正文件结构描述以反映新的组织方式

 验证:
- 项目编译成功
- 所有路径引用正确更新
- Bundle标识符已更新
2025-11-02 22:05:00 +08:00
ZhangLei
906f6478db 修复检测更新按钮不走已设代理的问题 v1.1.1 2025-11-01 10:43:24 +08:00
ZhangLei
d03b6f0d07 优化代理认证功能 2025-11-01 10:13:38 +08:00
ZhangLei
9d4ad118ad 新增代理认证功能 2025-11-01 10:03:26 +08:00
Mark
01a8f293a1 Add badges for BTC price monitor project v1.1.0 2025-10-31 20:17:49 +08:00
ZhangLei
37ae661580 version v1.1.0 push 2025-10-31 20:16:39 +08:00
ZhangLei
967f4aaa50 将单选框改为macOS原生Switch样式,支持 macOS 26 Tahoe 液态玻璃的效果。 2025-10-31 19:54:01 +08:00
ZhangLei
0769a8bf73 Perfect the code 2025-10-31 17:01:50 +08:00
ZhangLei
3f73c7af4e Perfect the code 2025-10-31 16:50:27 +08:00
ZhangLei
50689c54a0 bugsfix 2025-10-31 16:12:45 +08:00
ZhangLei
5969b7ae39 新增偏好设置功能,并把原本主菜单的2个功能移到偏好设置中,新增HTTP代理功能 2025-10-31 14:54:44 +08:00
Mark
1bd09df761 Fix formatting issues in README.md
Removed extra div closing tag and adjusted formatting.
v1.0.5
2025-10-31 07:08:42 +08:00
Mark
fb207e53f6 Update README.md 2025-10-31 07:07:06 +08:00
ZhangLei
fe687b9eba update README.md 2025-10-31 07:05:40 +08:00
ZhangLei
d071b3e2dc chore: update copyright headers in source files
- Update copyright year to 2025
- Standardize file header format across project
- Minor formatting consistency improvements
2025-10-31 06:39:28 +08:00
ZhangLei
887946b578 feat(ui): add update detection functionality to about window
- Replace GitHub button with update detection button
- Integrate GitHub API to fetch latest release version
- Implement version comparison logic
- Add loading animation during update check
- Display appropriate alerts for up-to-date/new version/error states
- Auto-open GitHub releases page when update is available
- Auto-close about window after opening release page
- Optimize progress view size for better UI alignment

Technical changes:
- Add GitHubRelease and GitHubCommit models for API parsing
- Add UpdateError enum for error handling
- Implement fetchLatestVersion() with URLSession and semaphores
- Add compareVersions() function for semantic version comparison
- Use DispatchQueue for async network operations and UI updates
2025-10-31 06:39:14 +08:00
ZhangLei
ae51ee7308 bugfix 2025-10-31 06:14:24 +08:00
ZhangLei
21c5890709 更改关于的显示方式 2025-10-31 06:06:15 +08:00
ZhangLei
938ba0ecbb update README.md 2025-10-30 20:25:15 +08:00
ZhangLei
e4e0de1eae update README.md v1.0.4 2025-10-30 19:25:36 +08:00
ZhangLei
a2aabf6fbd Add boot self-start function 2025-10-30 19:19:11 +08:00
ZhangLei
f194c37558 update README.md v1.0.3 2025-10-30 14:49:58 +08:00
ZhangLei
e409a1db1a chore: 更新项目配置信息
- 更新版本号至 v1.0.3
- 添加应用显示名称 "Bitcoin Monitoring"
- 完善版权信息为 "Copyright© 2025 Mark International Inc. All rights reserved."
2025-10-30 14:36:20 +08:00
ZhangLei
f25fc1ab6c fix: 修复配置重置问题并优化菜单交互体验
🐛 问题修复:
- 修复删除配置文件后币种设置不恢复默认值的问题
- 解决 macOS 沙盒缓存导致的配置读取不一致
- 增强币种配置验证逻辑,确保异常情况下的正确重置

 功能改进:
- 优化菜单布局,移除冗余的币种子菜单
- 改进价格显示,添加当前选中币种的✓标记
- 增强 Option+点击复制功能,支持未加载价格的异步获取
- 移除通知权限请求,简化用户交互

🔧 开发工具:
- 新增 resetToDefaults() 方法用于配置重置
- 添加 Debug 模式下的"重置设置"菜单项
- 改进错误处理和调试日志输出
- 新增 fetchSinglePrice() 方法支持单个币种价格获取

📝 项目配置:
- 更新版本号至 v1.0.3
- 完善应用版权信息和显示名称
- 修正部署目标版本信息
2025-10-30 14:35:36 +08:00
ZhangLei
9e805248cb update README.md 2025-10-30 13:37:41 +08:00
Mark
96cdcd5118 Merge pull request #4 from SherlockGougou/fix/enable-menu-item-interactions
fix: 启用菜单项交互功能并添加价格复制功能
2025-10-30 13:31:54 +08:00
SherlockKudou
370f0731d8 fix: 启用菜单项交互功能并添加价格复制功能
- 修复菜单项在价格加载后仍保持禁用状态的问题
- 添加点击选择币种功能:用户可以直接点击价格菜单项选择该币种
- 添加 Option+点击复制价格功能:按住Option键点击菜单项复制价格到剪贴板
- 添加用户友好的操作提示和通知反馈
- 更新应用权限以支持用户通知功能

解决 PR #3 中的反馈意见:菜单项应在价格加载后变为可交互状态
2025-10-30 04:51:18 +00:00
SherlockKudou
ee3e9e650c Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-30 12:34:31 +08:00
sherlock
e54821b8a4 feat: 点击展开菜单栏时直接展示所有币种的即时价格
点击展开菜单栏时直接展示所有币种的即时价格
2025-10-30 12:26:55 +08:00
Mark
76d6179527 Fix download link in README for releases
Updated the download link for the application in the README.
2025-10-29 21:31:02 +08:00
ZhangLei
84229df04d update v1.0.2 2025-10-29 21:19:18 +08:00
ZhangLei
7e27cfa355 feat: 多币种支持 + 配置系统优化
## 新增功能 🚀
- 🔗 新增 BNB (币安币) 和 SOL (Solana) 币种支持
- 💰 现在支持 5 种主流虚拟货币: BTC/ETH/BNB/SOL/DOGE
- 🎨 每种币种都有专属的 SF Symbols 图标

## 系统优化 🔧
- 🐛 修复配置初始化逻辑,确保首次运行显示正确的默认值 (BTC + 30秒)
- 📝 改进调试日志输出,移除冗余的 UserDefaults 域信息
- 🏗️ 优化配置加载逻辑,使用更严格的键存在性检查

## 文档更新 📚
- 📖 更新 README.md,添加多币种功能说明
- 📝 完善使用指南,包含币种切换操作
- 🔗 更新 API 文档,列出所有支持的交易对
- 🎯 新增配置文件位置说明

## 技术改进 
- 🔧 AppSettings 配置管理逻辑重构
- 🎯 增强配置初始化的错误处理
- 📱 更新界面预览截图
- 🏷️ 优化代码注释和架构文档

默认配置: BTC/USDT | 30秒刷新间隔 | 支持用户自定义
2025-10-29 21:17:54 +08:00
Mark
370f103507 Merge pull request #1 from SherlockGougou/main
feat: 增加币种选择:BTC/ETH/DOGE,显示价格更改为千分位
2025-10-29 20:32:47 +08:00
sherlock
64b92ee76a feat: 增加币种选择:BTC/ETH/DOGE,显示价格更改为千分位 2025-10-29 16:05:43 +08:00
ZhangLei
583807ff99 Refactor code structure for improved readability and maintainability v1.0.1 2025-10-29 14:41:38 +08:00
ZhangLei
a526deb79e feat(ui): add configurable refresh interval and enhanced menu features
Major feature enhancement for the BTC price monitoring application:

### New Features
- **Configurable Refresh Intervals**: Users can now select from 5s, 10s, 30s, 60s options
- **Persistent Settings**: User preferences saved via UserDefaults
- **GitHub Integration**: Direct link to project repository via menu
- **Version Display**: Shows current app version in about dialog
- **Debug Logging**: Comprehensive debug output for development (Debug builds only)

### Implementation Details
- **AppSettings.swift**: New configuration management class
- **RefreshInterval.swift**: Enum defining refresh options with display text
- **Enhanced PriceManager**: Dynamic timer management with configurable intervals
- **Updated BTCMenuBarApp**: Added refresh settings submenu, GitHub link, and version info
- **Debug Infrastructure**: Conditional compilation logging throughout price update flow

### UI/UX Improvements
- **Refresh Settings Submenu**: Visual indicators (✓) for current selection
- **Enhanced About Dialog**: Shows current refresh interval and app version
- **Clean Menu Structure**: Organized with proper separators and SF Symbols
- **GitHub Button**: Quick access to project repository

### Code Quality
- **Removed Redundancy**: Deleted unused ContentView.swift template file
- **Comprehensive Comments**: Added detailed Chinese comments throughout
- **Error Handling**: Robust error handling with user-friendly messages
- **Architecture Clean**: Follows MVVM pattern with clear separation of concerns

### Files Changed
- Modified: BTCMenuBarApp.swift, PriceManager.swift, project.pbxproj
- Added: AppSettings.swift, RefreshInterval.swift
- Deleted: ContentView.swift (unused template)
- Updated: Entitlements, app entry point, and service files

BREAKING CHANGE: None - all changes are additive and backward compatible
2025-10-29 14:21:07 +08:00