mirror of
https://github.com/natankeddem/bale.git
synced 2026-04-23 06:50:41 +00:00
added content min width and remove settings
This commit is contained in:
@@ -27,6 +27,7 @@ class Content:
|
||||
|
||||
def build(self):
|
||||
self._header = ui.header(bordered=True).classes("bg-dark q-pt-sm q-pb-xs")
|
||||
self._header.tailwind.border_color(f"[{el.orange}]").min_width("[920px]")
|
||||
self._header.visible = False
|
||||
with self._header:
|
||||
with ui.row().classes("w-full h-12 justify-between items-center"):
|
||||
@@ -35,7 +36,6 @@ class Content:
|
||||
self._tab["manage"] = ui.tab(name="Manage").classes("text-secondary")
|
||||
self._tab["automation"] = ui.tab(name="Automation").classes("text-secondary")
|
||||
self._tab["history"] = ui.tab(name="History").classes("text-secondary")
|
||||
self._tab["settings"] = ui.tab(name="Settings").classes("text-secondary")
|
||||
with ui.row().classes("items-center"):
|
||||
self._spinner = el.Spinner()
|
||||
self._host_display = ui.label().classes("text-secondary text-h4")
|
||||
@@ -52,14 +52,12 @@ class Content:
|
||||
|
||||
def _build_tab_panels(self):
|
||||
with self._tab_panels:
|
||||
with ui.tab_panel(self._tab["manage"]).style("height: calc(100vh - 131px)"):
|
||||
with el.ContentTabPanel(self._tab["manage"]):
|
||||
self._manage = Manage(spinner=self._spinner, host=self._host)
|
||||
with ui.tab_panel(self._tab["automation"]).style("height: calc(100vh - 131px)"):
|
||||
with el.ContentTabPanel(self._tab["automation"]):
|
||||
self._automation = Automation(spinner=self._spinner, host=self._host)
|
||||
with ui.tab_panel(self._tab["history"]).style("height: calc(100vh - 131px)"):
|
||||
with el.ContentTabPanel(self._tab["history"]):
|
||||
self._history = History(spinner=self._spinner, host=self._host)
|
||||
with ui.tab_panel(self._tab["settings"]).style("height: calc(100vh - 131px)"):
|
||||
ui.label("settings tab")
|
||||
|
||||
async def host_selected(self, name):
|
||||
self._host = name
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from typing import Any, Callable, Dict, List, Literal, Optional, Union
|
||||
from nicegui import ui, app, Tailwind
|
||||
from nicegui.elements.spinner import SpinnerTypes
|
||||
from nicegui.elements.tabs import Tab
|
||||
from nicegui.tailwind_types.height import Height
|
||||
from nicegui.tailwind_types.width import Width
|
||||
from nicegui.elements.mixins.validation_element import ValidationElement
|
||||
@@ -284,3 +285,10 @@ class JsonEditor(ui.json_editor):
|
||||
super().__init__(properties, on_select=on_select, on_change=on_change)
|
||||
self.classes("jse-theme-dark")
|
||||
self.tailwind.height("[360px]").width("full")
|
||||
|
||||
|
||||
class ContentTabPanel(ui.tab_panel):
|
||||
def __init__(self, name: Tab | str) -> None:
|
||||
super().__init__(name)
|
||||
self.style("height: calc(100vh - 131px)")
|
||||
self.tailwind.min_width("[920px]")
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
Reference in New Issue
Block a user