You've already forked HeurAMS-Classic
style: 格式化代码
This commit is contained in:
@@ -16,7 +16,6 @@ from textual.widgets import (
|
||||
Label,
|
||||
ListItem,
|
||||
ListView,
|
||||
Markdown,
|
||||
Static,
|
||||
)
|
||||
|
||||
@@ -117,7 +116,13 @@ class FavoriteManagerScreen(Screen):
|
||||
# 创建列表项, 包含移除按钮
|
||||
container = Horizontal(
|
||||
Label(display_text, classes="favorite-content"),
|
||||
Button("移除", id=f"remove-{button_key}", variant="error", flat=True, classes="favorite-item-btn"),
|
||||
Button(
|
||||
"移除",
|
||||
id=f"remove-{button_key}",
|
||||
variant="error",
|
||||
flat=True,
|
||||
classes="favorite-item-btn",
|
||||
),
|
||||
classes="favorite-item",
|
||||
)
|
||||
return ListItem(container)
|
||||
|
||||
@@ -140,7 +140,11 @@ class MemScreen(Screen):
|
||||
|
||||
if config_var.get()["interface"]["global"]["persist_to_file"]:
|
||||
self.repo.persist_to_repodir()
|
||||
container.mount(Finished(is_saved=config_var.get()["interface"]["global"]["persist_to_file"]))
|
||||
container.mount(
|
||||
Finished(
|
||||
is_saved=config_var.get()["interface"]["global"]["persist_to_file"]
|
||||
)
|
||||
)
|
||||
|
||||
def on_button_pressed(self, event):
|
||||
event.stop()
|
||||
@@ -162,6 +166,7 @@ class MemScreen(Screen):
|
||||
play_by_path(path)
|
||||
else:
|
||||
from heurams.services.tts_service import convertor
|
||||
|
||||
convertor(self.atom.registry["nucleon"]["tts_text"], path)
|
||||
play_by_path(path)
|
||||
|
||||
@@ -224,6 +229,7 @@ class MemScreen(Screen):
|
||||
|
||||
def action_go_back_notif(self):
|
||||
self.notify("确定吗? 按下大写 Q 以返回")
|
||||
|
||||
def action_go_back(self):
|
||||
self.app.pop_screen()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user