diff --git a/controldeck.py b/controldeck.py index aedb87c..6246449 100644 --- a/controldeck.py +++ b/controldeck.py @@ -19,12 +19,15 @@ APP_NAME = "ControlDeck" STATUS_DIV = Div() STATUS_DIV.classes = " border-2 border-gray-800 bg-gray-900 text-gray-600 h-40 m-2 pt-1 pl-2 mr-16 rounded-lg flex" +def tohtml(text): + return text.replace("\n", "
") + def mouseenter_status(self, msg): STATUS_DIV.inner_html = "
" STATUS_DIV.inner_html += "
command
" - STATUS_DIV.inner_html += f"
{str(self.command)}
" + STATUS_DIV.inner_html += f"
{tohtml(self.command.strip())}
" STATUS_DIV.inner_html += "
state
" - STATUS_DIV.inner_html += f"
{str(self.state)}
" + STATUS_DIV.inner_html += f"
{tohtml(self.state.strip())}
" STATUS_DIV.inner_html += "
" def process(args, output=True):