重构项目文件结构并重命名根目录

 新功能:
- 重新组织项目文件结构,采用模块化架构
- 重命名根目录: 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标识符已更新
This commit is contained in:
ZhangLei
2025-11-02 22:05:00 +08:00
parent 906f6478db
commit 6383047f9b
25 changed files with 12 additions and 12 deletions

View File

@@ -254,12 +254,12 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = test1/test1.entitlements;
CODE_SIGN_ENTITLEMENTS = Bitcoin-Monitoring/Resources/BitcoinMonitoring.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"test1/Preview Content\"";
DEVELOPMENT_ASSET_PATHS = "\"Bitcoin-Monitoring/Preview Content\"";
ENABLE_APP_SANDBOX = YES;
ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;
ENABLE_PREVIEWS = YES;
@@ -274,7 +274,7 @@
);
MACOSX_DEPLOYMENT_TARGET = 13.5;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.mark.test1;
PRODUCT_BUNDLE_IDENTIFIER = com.mark.bitcoin-monitoring;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
@@ -287,12 +287,12 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CODE_SIGN_ENTITLEMENTS = test1/test1.entitlements;
CODE_SIGN_ENTITLEMENTS = Bitcoin-Monitoring/Resources/BitcoinMonitoring.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"test1/Preview Content\"";
DEVELOPMENT_ASSET_PATHS = "\"Bitcoin-Monitoring/Preview Content\"";
ENABLE_APP_SANDBOX = YES;
ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;
ENABLE_PREVIEWS = YES;
@@ -307,7 +307,7 @@
);
MACOSX_DEPLOYMENT_TARGET = 13.5;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.mark.test1;
PRODUCT_BUNDLE_IDENTIFIER = com.mark.bitcoin-monitoring;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;

View File

@@ -1,5 +1,5 @@
//
// test1App.swift
// BitcoinMonitoringApp.swift
// Bitcoin Monitoring
//
// Created by Mark on 2025/10/28.
@@ -9,7 +9,7 @@ import SwiftUI
import AppKit
@main
struct test1App: App {
struct BitcoinMonitoringApp: App {
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
@@ -20,7 +20,7 @@ struct test1App: App {
}
class AppDelegate: NSObject, NSApplicationDelegate {
var menuBarApp: BTCMenuBarApp?
var menuBarApp: MenuBarManager?
func applicationDidFinishLaunching(_ notification: Notification) {
// Dock
@@ -32,7 +32,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
//
menuBarApp = BTCMenuBarApp()
menuBarApp = MenuBarManager()
}
func applicationShouldTerminate(_ sender: NSApplication) -> NSApplication.TerminateReply {

View File

@@ -1,5 +1,5 @@
//
// BTCMenuBarApp.swift
// MenuBarManager.swift
// Bitcoin Monitoring
//
// Created by Mark on 2025/10/28.
@@ -11,7 +11,7 @@ import Combine
// macOS
@MainActor
class BTCMenuBarApp: NSObject, ObservableObject {
class MenuBarManager: NSObject, ObservableObject {
private var statusItem: NSStatusItem?
private var popover: NSPopover?
private let appSettings: AppSettings

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB