feat: 初始化 Wails + React + Go 桌面应用模板
- Wails v2.16.0 + React 19 + TypeScript + Vite 7 - 插件系统(build tag 控制编译,plugin.json 运行时配置) - 支付插件(授权、账号、订单、退款、账单) - 高并发基础设施(任务池、批量处理器、限流器、环形缓冲、管道) - Windows 系统托盘(Win32 API) - CodeGraph 索引 + .memory 记忆包 - 默认图标 assets/icon.png
This commit is contained in:
26
internal/plugins/iconfont_impl.go
Normal file
26
internal/plugins/iconfont_impl.go
Normal file
@@ -0,0 +1,26 @@
|
||||
//go:build iconfont
|
||||
|
||||
package plugins
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type iconfontPlugin struct {
|
||||
enabled bool
|
||||
}
|
||||
|
||||
func (p *iconfontPlugin) Name() string { return "iconfont" }
|
||||
func (p *iconfontPlugin) Enabled() bool { return p.enabled }
|
||||
func (p *iconfontPlugin) Init(ctx context.Context) error {
|
||||
fmt.Println("[iconfont] initialized")
|
||||
return nil
|
||||
}
|
||||
func (p *iconfontPlugin) Register(app *App) error { return nil }
|
||||
func (p *iconfontPlugin) Shutdown() error { return nil }
|
||||
|
||||
func init() {
|
||||
cfg, _ := LoadOrDefault()
|
||||
Register(&iconfontPlugin{enabled: cfg.Plugins["iconfont"].Enabled})
|
||||
}
|
||||
Reference in New Issue
Block a user