|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import flet as ft
|
|
|
|
|
from views import admins, customers, domains, peerings, subscribers, rewriteRules, download
|
|
|
|
|
from views import admins, customers, domains, peerings, subscribers, rewriteRules, download, upload
|
|
|
|
|
import login
|
|
|
|
|
|
|
|
|
|
def main(page: ft.Page):
|
|
|
|
|
@ -20,6 +20,8 @@ def main(page: ft.Page):
|
|
|
|
|
login.log(page)
|
|
|
|
|
elif event.route == "/rewriterulesets":
|
|
|
|
|
rewriteRules.rewrite(page)
|
|
|
|
|
elif event.route == "/upload":
|
|
|
|
|
upload.upload(page)
|
|
|
|
|
|
|
|
|
|
if event.route == '/login':
|
|
|
|
|
page.navigation_bar.visible = False
|
|
|
|
|
@ -47,13 +49,13 @@ def main(page: ft.Page):
|
|
|
|
|
ft.NavigationBarDestination(icon=ft.icons.REMOVE_RED_EYE, label="Peerings"),
|
|
|
|
|
ft.NavigationBarDestination(icon=ft.icons.PERSON_ADD, label="Subscribers"),
|
|
|
|
|
ft.NavigationBarDestination(icon=ft.icons.NOTES, label= "Rewrite Rules"),
|
|
|
|
|
ft.NavigationBarDestination(icon=ft.icons.DOWNLOAD, label="Download info")
|
|
|
|
|
ft.NavigationBarDestination(icon=ft.icons.UPLOAD, label="Upload info"),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
page.navigation_bar = ft.NavigationBar(
|
|
|
|
|
selected_index=0,
|
|
|
|
|
on_change=lambda e: page.go(
|
|
|
|
|
["/administration", "/customers", "/domains", "/peerings", "/subscribers", "/rewriterulesets"][e.control.selected_index]
|
|
|
|
|
["/administration", "/customers", "/domains", "/peerings", "/subscribers", "/rewriterulesets", "/upload"][e.control.selected_index]
|
|
|
|
|
),
|
|
|
|
|
destinations=destinations,
|
|
|
|
|
visible=False
|
|
|
|
|
|