Updated branding colors, fix popup border
This commit is contained in:
parent
d9454f44d8
commit
f873950bc0
@ -1,4 +1,6 @@
|
|||||||
from peewee import *
|
from peewee import *
|
||||||
|
import importlib
|
||||||
|
importlib.import_module('meilisearch')
|
||||||
from search import InventorySearch as ivs
|
from search import InventorySearch as ivs
|
||||||
from playhouse.shortcuts import ReconnectMixin
|
from playhouse.shortcuts import ReconnectMixin
|
||||||
|
|
||||||
|
@ -18,9 +18,10 @@ from db_classes import *
|
|||||||
#
|
#
|
||||||
# https://rio.dev/docs/api/theme
|
# https://rio.dev/docs/api/theme
|
||||||
theme = rio.Theme.from_colors(
|
theme = rio.Theme.from_colors(
|
||||||
secondary_color=rio.Color.from_hex("004990ff"),
|
secondary_color=rio.Color.from_hex("#84329B"),
|
||||||
primary_color=rio.Color.from_hex("004990ff"),
|
primary_color=rio.Color.from_hex("#84329B"),
|
||||||
neutral_color=rio.Color.from_hex("b1cad8FF"),
|
#neutral_color=rio.Color.from_hex("#a850f480"),
|
||||||
|
neutral_color=rio.Color.from_hex("#D0A2F7"),
|
||||||
light=True,
|
light=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -36,8 +36,9 @@ 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
|
||||||
self.session.navigate_to("/" + page)
|
if page != 'n/a':
|
||||||
self.checkpage = "n/a"
|
self.session.navigate_to("/" + page)
|
||||||
|
self.checkpage = "n/a"
|
||||||
|
|
||||||
def set_office(self, event: rio.DropdownChangeEvent):
|
def set_office(self, event: rio.DropdownChangeEvent):
|
||||||
settings = self.session[comps.Settings]
|
settings = self.session[comps.Settings]
|
||||||
@ -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,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -257,30 +257,20 @@ class BrowsePage(rio.Component):
|
|||||||
label="Search"
|
label="Search"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
searchview,
|
|
||||||
|
|
||||||
rio.Popup(
|
rio.Popup(
|
||||||
anchor=rio.Text(
|
anchor=rio.Text(
|
||||||
text="",
|
text="",
|
||||||
style='heading1',
|
style='heading1',
|
||||||
align_x = 0.5
|
align_x = 0.5,
|
||||||
),
|
align_y = 0,
|
||||||
color=self.popup_color,
|
|
||||||
is_open=self.popup_show,
|
|
||||||
content=rio.Text(
|
|
||||||
text=self.popup_message,
|
|
||||||
),
|
|
||||||
|
|
||||||
),
|
|
||||||
rio.Popup(
|
|
||||||
anchor=rio.Text(
|
|
||||||
text="",
|
|
||||||
style='heading1',
|
|
||||||
align_x = 0.5
|
|
||||||
),
|
),
|
||||||
#color=self.popup_color,
|
#color=self.popup_color,
|
||||||
is_open=self.info_show,
|
is_open=self.info_show,
|
||||||
min_width=40,
|
min_width=40,
|
||||||
position='fullscreen',
|
#position='fullscreen',
|
||||||
|
align_y = 1,
|
||||||
color=rio.Color.TRANSPARENT,
|
color=rio.Color.TRANSPARENT,
|
||||||
content=rio.Card(
|
content=rio.Card(
|
||||||
rio.Column(
|
rio.Column(
|
||||||
@ -308,12 +298,14 @@ class BrowsePage(rio.Component):
|
|||||||
anchor=rio.Text(
|
anchor=rio.Text(
|
||||||
text="",
|
text="",
|
||||||
style='heading1',
|
style='heading1',
|
||||||
align_x = 0.5
|
align_x = 0.5,
|
||||||
|
align_y = 0,
|
||||||
),
|
),
|
||||||
#color=self.popup_color,
|
#color=self.popup_color,
|
||||||
is_open=self.edit_show,
|
is_open=self.edit_show,
|
||||||
min_width=40,
|
min_width=40,
|
||||||
position='fullscreen',
|
#position='fullscreen',
|
||||||
|
align_y = 1,
|
||||||
color=rio.Color.TRANSPARENT,
|
color=rio.Color.TRANSPARENT,
|
||||||
content=rio.Card(
|
content=rio.Card(
|
||||||
rio.Column(
|
rio.Column(
|
||||||
@ -374,12 +366,26 @@ class BrowsePage(rio.Component):
|
|||||||
margin=2
|
margin=2
|
||||||
),
|
),
|
||||||
align_x=0.5,
|
align_x=0.5,
|
||||||
align_y=0.5
|
align_y=0.5,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
searchview,
|
||||||
|
rio.Popup(
|
||||||
|
anchor=rio.Text(
|
||||||
|
text="",
|
||||||
|
style='heading1',
|
||||||
|
align_x = 0.5
|
||||||
|
),
|
||||||
|
color=self.popup_color,
|
||||||
|
is_open=self.popup_show,
|
||||||
|
content=rio.Text(
|
||||||
|
text=self.popup_message,
|
||||||
|
),
|
||||||
|
),
|
||||||
spacing=2,
|
spacing=2,
|
||||||
min_width=60,
|
min_width=60,
|
||||||
align_x=0.5,
|
align_x=0.5,
|
||||||
align_y=0,
|
align_y=0,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user