⬆️ Upgrade dependencies

This commit is contained in:
2025-10-10 23:40:23 +08:00
parent b5d90cc59a
commit 03780b5bc7
24 changed files with 1892 additions and 252 deletions

View File

@@ -5,7 +5,7 @@ import (
"errors"
"fmt"
"github.com/creativeprojects/go-selfupdate"
"github.com/wailsapp/wails/v3/pkg/services/badge"
"github.com/wailsapp/wails/v3/pkg/services/dock"
"github.com/wailsapp/wails/v3/pkg/services/log"
"github.com/wailsapp/wails/v3/pkg/services/notifications"
"os"
@@ -30,7 +30,7 @@ type SelfUpdateResult struct {
type SelfUpdateService struct {
logger *log.LogService
configService *ConfigService
badgeService *badge.BadgeService // 直接使用Wails原生badge服务
badgeService *dock.DockService // 直接使用Wails原生badge服务
notificationService *notifications.NotificationService // 通知服务
config *models.AppConfig
@@ -39,7 +39,7 @@ type SelfUpdateService struct {
}
// NewSelfUpdateService 创建自我更新服务实例
func NewSelfUpdateService(configService *ConfigService, badgeService *badge.BadgeService, notificationService *notifications.NotificationService, logger *log.LogService) (*SelfUpdateService, error) {
func NewSelfUpdateService(configService *ConfigService, badgeService *dock.DockService, notificationService *notifications.NotificationService, logger *log.LogService) (*SelfUpdateService, error) {
// 获取配置
appConfig, err := configService.GetConfig()
if err != nil {

View File

@@ -4,7 +4,7 @@ import (
"voidraft/internal/models"
"github.com/wailsapp/wails/v3/pkg/application"
"github.com/wailsapp/wails/v3/pkg/services/badge"
"github.com/wailsapp/wails/v3/pkg/services/dock"
"github.com/wailsapp/wails/v3/pkg/services/log"
"github.com/wailsapp/wails/v3/pkg/services/notifications"
)
@@ -27,7 +27,7 @@ type ServiceManager struct {
selfUpdateService *SelfUpdateService
translationService *TranslationService
themeService *ThemeService
badgeService *badge.BadgeService
badgeService *dock.DockService
notificationService *notifications.NotificationService
testService *TestService // 测试服务(仅开发环境)
BackupService *BackupService
@@ -40,7 +40,7 @@ func NewServiceManager() *ServiceManager {
logger := log.New()
// 初始化badge服务
badgeService := badge.New()
badgeService := dock.New()
// 初始化通知服务
notificationService := notifications.New()
@@ -258,7 +258,7 @@ func (sm *ServiceManager) GetThemeService() *ThemeService {
}
// GetBadgeService 获取badge服务实例
func (sm *ServiceManager) GetBadgeService() *badge.BadgeService {
func (sm *ServiceManager) GetBadgeService() *dock.DockService {
return sm.badgeService
}

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"github.com/wailsapp/wails/v3/pkg/application"
"github.com/wailsapp/wails/v3/pkg/services/badge"
"github.com/wailsapp/wails/v3/pkg/services/dock"
"github.com/wailsapp/wails/v3/pkg/services/log"
"github.com/wailsapp/wails/v3/pkg/services/notifications"
)
@@ -13,12 +13,12 @@ import (
// TestService 测试服务 - 仅在开发环境使用
type TestService struct {
logger *log.LogService
badgeService *badge.BadgeService
badgeService *dock.DockService
notificationService *notifications.NotificationService
}
// NewTestService 创建测试服务实例
func NewTestService(badgeService *badge.BadgeService, notificationService *notifications.NotificationService, logger *log.LogService) *TestService {
func NewTestService(badgeService *dock.DockService, notificationService *notifications.NotificationService, logger *log.LogService) *TestService {
if logger == nil {
logger = log.New()
}