-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: n0sense <[email protected]>
- Loading branch information
Showing
21 changed files
with
628 additions
and
526 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,3 +111,6 @@ dmypy.json | |
|
||
# macos | ||
.DS_Store | ||
|
||
# Visual Studio Code Run/Debug configuration | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
-i https://pypi.org/simple | ||
certifi==2022.9.24; python_version >= '3.6' | ||
charset-normalizer==2.1.1; python_version >= '3.6' | ||
hackcqooc==0.0.5 | ||
idna==3.4; python_version >= '3.5' | ||
js2py==0.71 | ||
pillow==9.2.0; python_version >= '3.7' | ||
beartype==0.11.0 ; python_full_version >= '3.7.0' | ||
certifi==2022.9.24 ; python_version >= '3.6' | ||
charset-normalizer==2.1.1 ; python_full_version >= '3.6.0' | ||
flet==0.1.65 | ||
hackcqooc==0.0.8 | ||
idna==3.4 ; python_version >= '3.5' | ||
js2py==0.74 | ||
oauthlib==3.2.2 ; python_version >= '3.6' | ||
pillow==9.3.0 | ||
pyjsparser==2.7.1 | ||
pytz-deprecation-shim==0.1.0.post0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' | ||
requests==2.28.1; python_version >= '3.7' and python_version < '4' | ||
six==1.16.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' | ||
ttkbootstrap==1.9.0 | ||
tzdata==2022.4; python_version >= '3.6' | ||
tzlocal==4.2; python_version >= '3.6' | ||
urllib3==1.26.12; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4' | ||
pytz-deprecation-shim==0.1.0.post0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' | ||
repath==0.9.0 | ||
requests==2.28.1 ; python_version >= '3.7' and python_version < '4' | ||
six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2' | ||
tzdata==2022.6 ; platform_system == 'Windows' | ||
tzlocal==4.2 ; python_version >= '3.6' | ||
urllib3==1.26.13 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' | ||
watchdog==2.1.9 ; python_version >= '3.6' | ||
websocket-client==1.4.2 ; python_version >= '3.7' |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# -*- coding: utf-8 -*- | ||
from loginView import login_view | ||
from skipView import skip_view | ||
|
||
import flet as ft | ||
import tempfile | ||
import os | ||
import logging | ||
from logging.handlers import RotatingFileHandler | ||
|
||
folder_path = f"{tempfile.gettempdir()+os.sep}fuckcqooc" | ||
|
||
if not os.path.exists(folder_path): | ||
os.makedirs(folder_path) | ||
else: | ||
# Empty the folder | ||
for file in os.listdir(folder_path): | ||
os.remove(folder_path + os.sep + file) | ||
|
||
log_location = f"{folder_path+os.sep}fuckcqooc.log" | ||
logger = logging.getLogger() | ||
logger.setLevel(logging.INFO) | ||
handler = RotatingFileHandler( | ||
log_location, "a", maxBytes=1024 * 1024 * 5, backupCount=5 | ||
) | ||
logger.addHandler(handler) | ||
logging.info(f"Started logging to file {log_location}.") | ||
|
||
font_family = { | ||
"Noto Sans SC": "/fonts/NotoSansSC-Regular.otf", | ||
"JetBrains Mono": "/fonts/JetBrainsMono-Regular.ttf", | ||
} | ||
|
||
|
||
def main(page: ft.Page): | ||
logging.info("Init main page") | ||
|
||
def on_route_change(e): | ||
page.views.clear() | ||
login_view(page) | ||
if e.route == "/course": | ||
skip_view(page) | ||
page.update() | ||
|
||
def view_pop(): | ||
page.views.pop() | ||
top_view = page.views[-1] | ||
page.go(top_view.route) | ||
|
||
page.core = None | ||
page.log_folder_path = folder_path | ||
page.title = "Fuckcqooc" | ||
page.vertical_alignment = "center" | ||
page.horizontal_alignment = "center" | ||
page.fonts = font_family | ||
page.on_route_change = on_route_change | ||
page.on_view_pop = view_pop | ||
page.window_min_width = 800 | ||
page.window_width = 800 | ||
page.window_height = 600 | ||
page.window_min_height = 600 | ||
page.go(page.route) | ||
|
||
|
||
ft.app(target=main, assets_dir="../assets") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# -*- coding: utf-8 -*- | ||
import flet as ft | ||
|
||
|
||
def show_snack_bar(page, text, color, selectable=False): | ||
return page.show_snack_bar( | ||
ft.SnackBar( | ||
open=True, | ||
content=ft.Text(text, selectable=selectable), | ||
bgcolor=color, | ||
) | ||
) |
Oops, something went wrong.