|
|
@ -36,6 +36,7 @@ class Navbar(rio.Component):
|
|
|
|
office: str = ""
|
|
|
|
office: str = ""
|
|
|
|
def sub_page(self, event: rio.DropdownChangeEvent):
|
|
|
|
def sub_page(self, event: rio.DropdownChangeEvent):
|
|
|
|
page = event.value
|
|
|
|
page = event.value
|
|
|
|
|
|
|
|
if page != 'n/a':
|
|
|
|
self.session.navigate_to("/" + page)
|
|
|
|
self.session.navigate_to("/" + page)
|
|
|
|
self.checkpage = "n/a"
|
|
|
|
self.checkpage = "n/a"
|
|
|
|
|
|
|
|
|
|
|
@ -51,6 +52,10 @@ class Navbar(rio.Component):
|
|
|
|
self.office = self.session[comps.Settings].office
|
|
|
|
self.office = self.session[comps.Settings].office
|
|
|
|
print(self.office)
|
|
|
|
print(self.office)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@rio.event.on_populate
|
|
|
|
|
|
|
|
def set_scan_init(self):
|
|
|
|
|
|
|
|
self.checkpage = "n/a"
|
|
|
|
|
|
|
|
|
|
|
|
def build(self) -> rio.Component:
|
|
|
|
def build(self) -> rio.Component:
|
|
|
|
|
|
|
|
|
|
|
|
# Which page is currently active? This will be used to highlight the
|
|
|
|
# Which page is currently active? This will be used to highlight the
|
|
|
@ -66,7 +71,7 @@ class Navbar(rio.Component):
|
|
|
|
# done by using a `rio.Overlay` component.
|
|
|
|
# done by using a `rio.Overlay` component.
|
|
|
|
return rio.Overlay(
|
|
|
|
return rio.Overlay(
|
|
|
|
rio.Row(
|
|
|
|
rio.Row(
|
|
|
|
rio.Spacer(),
|
|
|
|
#rio.Spacer(),
|
|
|
|
# Use a card for visual separation
|
|
|
|
# Use a card for visual separation
|
|
|
|
rio.Rectangle(
|
|
|
|
rio.Rectangle(
|
|
|
|
content=rio.Row(
|
|
|
|
content=rio.Row(
|
|
|
@ -154,22 +159,28 @@ class Navbar(rio.Component):
|
|
|
|
spacing=1,
|
|
|
|
spacing=1,
|
|
|
|
margin=1,
|
|
|
|
margin=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
fill=self.session.theme.neutral_color,
|
|
|
|
#fill=self.session.theme.neutral_color,
|
|
|
|
corner_radius=self.session.theme.corner_radius_medium,
|
|
|
|
fill=rio.FrostedGlassFill(
|
|
|
|
|
|
|
|
color=rio.Color.from_hex("#a850f480"),
|
|
|
|
|
|
|
|
blur_size = 0.2
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
#corner_radius=self.session.theme.corner_radius_medium,
|
|
|
|
shadow_radius=0.8,
|
|
|
|
shadow_radius=0.8,
|
|
|
|
shadow_color=self.session.theme.shadow_color,
|
|
|
|
shadow_color=self.session.theme.shadow_color,
|
|
|
|
shadow_offset_y=0.2,
|
|
|
|
shadow_offset_y=0.2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
rio.Spacer(),
|
|
|
|
#rio.Spacer(),
|
|
|
|
# Proportions are an easy way to make the navbar's size relative
|
|
|
|
# Proportions are an easy way to make the navbar's size relative
|
|
|
|
# to the screen. This assigns 5% to the first spacer, 90% to the
|
|
|
|
# to the screen. This assigns 5% to the first spacer, 90% to the
|
|
|
|
# navbar, and 5% to the second spacer.
|
|
|
|
# navbar, and 5% to the second spacer.
|
|
|
|
proportions=(0.5, 9, 0.5),
|
|
|
|
#proportions=(0.5, 9, 0.5),
|
|
|
|
# Overlay assigns the entire screen to its child component.
|
|
|
|
# Overlay assigns the entire screen to its child component.
|
|
|
|
# Since the navbar isn't supposed to take up all space, assign
|
|
|
|
# Since the navbar isn't supposed to take up all space, assign
|
|
|
|
# an alignment.
|
|
|
|
# an alignment.
|
|
|
|
align_y=0,
|
|
|
|
align_y=0,
|
|
|
|
margin=2,
|
|
|
|
#align_x=0.5,
|
|
|
|
|
|
|
|
grow_x = True,
|
|
|
|
|
|
|
|
margin=0,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|