Skip to content
Snippets Groups Projects
Commit 278accc9 authored by Podosochnyy Maxim's avatar Podosochnyy Maxim
Browse files

Добавлена поддержка действий

parent d8b33674
Branches
Tags
No related merge requests found
...@@ -20,29 +20,16 @@ def make_action_dict( ...@@ -20,29 +20,16 @@ def make_action_dict(
action_id: str, action_id: str,
name: str, name: str,
kind: int, kind: int,
classes: Optional[list[str]] = None, **kwargs,
target: Optional[int] = 0,
description: Optional[str] = "",
icon: Optional[str] = "",
confirm: bool = True,
view: Optional[int] = 0,
) -> dict: ) -> dict:
if not classes:
classes = ["*"]
action_id = process_action_id(action_id) action_id = process_action_id(action_id)
return { return {
"id": action_id, "id": action_id,
"action": f"grpc:///{extension_id}/{action_id}", "action": f"grpc:///{extension_id}/{action_id}",
"name": name, "name": name,
"target": target,
"classes": classes,
"description": description,
"icon": icon,
"kind": kind, "kind": kind,
"confirm": confirm, **kwargs,
"view": view,
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment