add: icon

This commit is contained in:
2026-02-06 04:18:28 +08:00
parent a2ad297dbc
commit 6ec897468f
13 changed files with 50 additions and 24 deletions

View File

@@ -91,6 +91,12 @@ func Load() *Config {
}
}
// 确保默认保存路径存在
err = os.MkdirAll(defaultSavePath, 0755)
if err != nil {
slog.Error("Failed to create default save path", "path", defaultSavePath, "error", err)
}
var config Config
if err := v.Unmarshal(&config); err != nil {
slog.Error("Failed to unmarshal config", "error", err)

View File

@@ -31,10 +31,6 @@ type Service struct {
peersMutex sync.RWMutex
}
func init() {
application.RegisterEvent[[]Peer]("peers:update")
}
func NewService(config *config.Config, app *application.App, port int) *Service {
return &Service{
app: app,

View File

@@ -59,10 +59,6 @@ func NewService(config *config.Config, app *application.App, notifier *notificat
}
}
func init() {
application.RegisterEvent[application.Void]("transfer:refreshList")
}
func (s *Service) GetPort() int {
return s.port
}