Integrate Faraday layout system (#16)

Co-authored-by: Mike Sawka <sawka@users.noreply.github.com>
Co-authored-by: sawka <mike.sawka@gmail.com>
This commit is contained in:
Evan Simkowitz
2024-06-04 13:05:44 -07:00
committed by GitHub
co-authored by Mike Sawka sawka
parent 15527397de
commit c3e71c5c7d
29 changed files with 2469 additions and 369 deletions
+3 -3
View File
@@ -143,15 +143,15 @@ func (svc *ObjectService) CreateBlock(uiContext wstore.UIContext, blockDef *wsto
}
}
rtn := make(map[string]any)
rtn["blockid"] = blockData.OID
rtn["blockId"] = blockData.OID
return updatesRtn(ctx, rtn)
}
func (svc *ObjectService) DeleteBlock(uiContext wstore.UIContext, blockId string) (any, error) {
func (svc *ObjectService) DeleteBlock(uiContext wstore.UIContext, blockId string, newLayout any) (any, error) {
ctx, cancelFn := context.WithTimeout(context.Background(), DefaultTimeout)
defer cancelFn()
ctx = wstore.ContextWithUpdates(ctx)
err := wstore.DeleteBlock(ctx, uiContext.ActiveTabId, blockId)
err := wstore.DeleteBlock(ctx, uiContext.ActiveTabId, blockId, newLayout)
if err != nil {
return nil, fmt.Errorf("error deleting block: %w", err)
}