upgrade-rio-version (#1)
Co-authored-by: David Rodenkirchen <drodenkirchen@linetco.com> Reviewed-on: Vereins-IT/ez-lan-manager#1
This commit was merged in pull request #1.
This commit is contained in:
@@ -2,14 +2,14 @@ from __future__ import annotations
|
||||
|
||||
from typing import * # type: ignore
|
||||
|
||||
from rio import Component, event, Spacer, Card, Container, Column, Row, TextStyle, Color, Text
|
||||
from rio import Component, event, Spacer, Card, Container, Column, Row, TextStyle, Color, Text, PageView
|
||||
|
||||
from src.ez_lan_manager import ConfigurationService, DatabaseService
|
||||
from src.ez_lan_manager.components.DesktopNavigation import DesktopNavigation
|
||||
|
||||
class BasePage(Component):
|
||||
content: Component
|
||||
|
||||
color = "secondary"
|
||||
corner_radius = (0, 0.5, 0, 0)
|
||||
@event.periodic(60)
|
||||
async def check_db_conn(self) -> None:
|
||||
is_healthy = await self.session[DatabaseService].is_healthy()
|
||||
@@ -21,15 +21,12 @@ class BasePage(Component):
|
||||
await self.force_refresh()
|
||||
|
||||
def build(self) -> Component:
|
||||
if self.content is None:
|
||||
content = Spacer()
|
||||
else:
|
||||
content = Card(
|
||||
self.content,
|
||||
color="secondary",
|
||||
min_width=38,
|
||||
corner_radius=(0, 0.5, 0, 0)
|
||||
)
|
||||
content = Card(
|
||||
PageView(),
|
||||
color="secondary",
|
||||
min_width=38,
|
||||
corner_radius=(0, 0.5, 0, 0)
|
||||
)
|
||||
if self.session.window_width > 28:
|
||||
return Container(
|
||||
content=Column(
|
||||
|
||||
Reference in New Issue
Block a user