fix: 改进
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import heurams.context as cxt
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Button, Header, Label, Footer
|
||||
from .screens.dashboard import DashboardScreen
|
||||
@@ -12,7 +13,7 @@ class HeurAMSApp(App):
|
||||
BINDINGS = [("q", "quit", "退出"),
|
||||
("d", "toggle_dark", "改变色调"),
|
||||
("1", "app.push_screen('dashboard')", "仪表盘"),
|
||||
("2", "app.push_screen('precache_all')", "缓存管理"),
|
||||
("2", "app.push_screen('precache_all')", "缓存管理器"),
|
||||
("3", "app.push_screen('nucleon_creator')", "创建新单元"),
|
||||
]
|
||||
SCREENS = {
|
||||
@@ -28,7 +29,15 @@ class HeurAMSApp(App):
|
||||
self.exit(event.button.id)
|
||||
|
||||
def environment_check():
|
||||
from heurams.context import working_var
|
||||
from pathlib import Path
|
||||
for i in cxt.config_var.get()["paths"].values():
|
||||
i = Path(i)
|
||||
if not i.exists():
|
||||
print(f"创建 {i}")
|
||||
i.mkdir(exist_ok = True, parents = True)
|
||||
else:
|
||||
print(f"找到 {i}")
|
||||
|
||||
environment_check()
|
||||
app = HeurAMSApp()
|
||||
app.run()
|
||||
|
||||
Reference in New Issue
Block a user