准备重构
This commit is contained in:
24
legacy/main.py
Normal file
24
legacy/main.py
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
from textual.app import App
|
||||
import screens
|
||||
import os
|
||||
|
||||
class AppLauncher(App):
|
||||
CSS_PATH = "styles.css"
|
||||
TITLE = "潜进 - 辅助记忆调度器"
|
||||
BINDINGS = [("escape", "quit", "退出"), ("d", "toggle_dark", "改变色调")]
|
||||
SCREENS = {
|
||||
"dashboard": screens.DashboardScreen,
|
||||
}
|
||||
|
||||
def on_mount(self) -> None:
|
||||
self.push_screen("dashboard")
|
||||
|
||||
if __name__ == "__main__":
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
os.chdir(script_dir)
|
||||
os.makedirs("electron", exist_ok=True)
|
||||
os.makedirs("nucleon", exist_ok=True)
|
||||
os.makedirs("cache/voice", exist_ok=True)
|
||||
app = AppLauncher()
|
||||
app.run()
|
Reference in New Issue
Block a user