mirror of
https://github.com/ublue-os/forge.git
synced 2025-07-13 21:25:46 +03:00
wip - refactoring and implementing 'real-time' log output
This commit is contained in:
parent
dd001f4fe5
commit
50395caec7
3 changed files with 51 additions and 45 deletions
|
@ -1,10 +1,28 @@
|
|||
from contextlib import contextmanager
|
||||
|
||||
from menu import menu
|
||||
|
||||
from nicegui import ui
|
||||
|
||||
|
||||
class GuiProgressSpinner(ui.spinner):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
type: str = "dots",
|
||||
size: str = "lg",
|
||||
color: str | None = "red",
|
||||
thickness: float = 5
|
||||
) -> None:
|
||||
super().__init__(type, size=size, color=color, thickness=thickness)
|
||||
with self, ui.spinner():
|
||||
self.visible = False
|
||||
|
||||
def enable(self) -> None:
|
||||
self.set_visibility(True)
|
||||
|
||||
def disable(self) -> None:
|
||||
self.set_visibility(False)
|
||||
|
||||
|
||||
@contextmanager
|
||||
def frame(navigation_title: str, enable_right_drawer: bool = False):
|
||||
"""Custom page frame to share the same styling and behavior across all pages"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue