forked from snappy91/Wiglitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
40 lines (29 loc) · 975 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import datetime
import requests, json
import flet as ft
from pages.hotshot import Hotshot
from pages.metadata import Metadata
from pages.detect import Detect
from pages.improve import Improve
def main(page: ft.Page):
page.title = "⋆ ◎ ✾ WIGLITCHER ✾ ◎ ⋆"
page.bgcolor = ft.colors.TRANSPARENT
page.adaptive = True
def route_change(route):
page.views.clear()
page.views.append(Metadata(page))
if page.route == "/hotshot":
page.views.append(Hotshot())
if page.route == "/detect":
page.views.append(Detect())
if page.route == "/improve":
page.views.append(Improve())
page.update()
def view_pop(view):
page.views.pop()
top_view = page.views[-1]
page.go(top_view.route)
page.on_route_change = route_change
page.on_view_pop = view_pop
page.go(page.route)
ft.app(target=main) #, view=ft.AppView.WEB_BROWSER)