Update the Rio Version, add meta tags, refactor rio components that have init overwrites, add member picture for Tim
This commit is contained in:
@@ -10,13 +10,7 @@ from .. import components as comps, services
|
||||
|
||||
|
||||
class Pics(rio.Component):
|
||||
database_service: services.DatabaseService
|
||||
active_picture: Optional[rio.URL]
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self.database_service = self.session[services.DatabaseService]
|
||||
self.active_picture: Optional[rio.URL] = None
|
||||
active_picture: Optional[rio.URL] = None
|
||||
|
||||
@rio.event.on_window_size_change
|
||||
async def on_window_size_change(self) -> None:
|
||||
@@ -29,7 +23,7 @@ class Pics(rio.Component):
|
||||
def build(self) -> rio.Component:
|
||||
if self.active_picture is None:
|
||||
grid = rio.Grid(row_spacing=0.4, column_spacing=0.5, margin_right=1)
|
||||
for i, link in enumerate(self.database_service.get_picture_paths()):
|
||||
for i, link in enumerate(self.session[services.DatabaseService].get_picture_paths()):
|
||||
grid.add(
|
||||
rio.Button(
|
||||
rio.Image(
|
||||
|
||||
Reference in New Issue
Block a user