add block icon

This commit is contained in:
sawka
2024-06-21 15:15:38 -07:00
parent 8683105f70
commit e7550c0a3e
4 changed files with 80 additions and 28 deletions
+8 -6
View File
@@ -54,6 +54,7 @@ type RunCmdFnType = func(ctx context.Context, cmd wshutil.BlockCommand, cmdCtx w
type BlockController struct {
Lock *sync.Mutex
ControllerType string
TabId string
BlockId string
BlockDef *wstore.BlockDef
@@ -308,12 +309,13 @@ func StartBlockController(ctx context.Context, tabId string, blockId string, run
return nil
}
bc := &BlockController{
Lock: &sync.Mutex{},
TabId: tabId,
BlockId: blockId,
Status: "init",
InputCh: make(chan wshutil.BlockCommand),
RunCmdFn: runCmdFn,
Lock: &sync.Mutex{},
ControllerType: blockData.Controller,
TabId: tabId,
BlockId: blockId,
Status: "init",
InputCh: make(chan wshutil.BlockCommand),
RunCmdFn: runCmdFn,
}
blockControllerMap[blockId] = bc
go bc.Run(blockData)