Spaces:
No application file
No application file
Update bot/ui/callbacks.py
Browse files- bot/ui/callbacks.py +8 -5
bot/ui/callbacks.py
CHANGED
|
@@ -1,11 +1,14 @@
|
|
| 1 |
# PATH: bot/ui/callbacks.py
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
def set_default_cb(profile_id: str) -> str:
|
| 5 |
-
return f"setdef:{profile_id}"
|
| 6 |
|
| 7 |
def parse_cb(data: str) -> tuple[str, str]:
|
| 8 |
if ":" not in data:
|
| 9 |
return data, ""
|
| 10 |
a, b = data.split(":", 1)
|
| 11 |
-
return a, b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# PATH: bot/ui/callbacks.py
|
| 2 |
+
def make(action: str, value: str = "") -> str:
|
| 3 |
+
return f"{action}:{value}" if value else action
|
|
|
|
|
|
|
| 4 |
|
| 5 |
def parse_cb(data: str) -> tuple[str, str]:
|
| 6 |
if ":" not in data:
|
| 7 |
return data, ""
|
| 8 |
a, b = data.split(":", 1)
|
| 9 |
+
return a, b
|
| 10 |
+
|
| 11 |
+
# actions
|
| 12 |
+
AUTH_JSON = "auth_json"
|
| 13 |
+
AUTH_CI = "auth_ci"
|
| 14 |
+
CANCEL = "cancel"
|