15 lines
481 B
Python
15 lines
481 B
Python
from components.BaseCommandManager import BaseCommandManager
|
|
from components.entryselector.constants import Routes, ROUTE_ROOT
|
|
|
|
|
|
class EntrySelectorCommandManager(BaseCommandManager):
|
|
def __init__(self, owner):
|
|
super().__init__(owner)
|
|
|
|
def select_entry(self, entry):
|
|
return {
|
|
"hx-get": f"{ROUTE_ROOT}{Routes.Select}",
|
|
"hx-target": f"#{self._id}",
|
|
"hx-swap": "outerHTML",
|
|
"hx-vals": f'{{"_id": "{self._id}", "entry": "{entry}"}}',
|
|
} |