fix(interface): 界面兼容性改进

This commit is contained in:
2026-01-04 04:14:57 +08:00
parent d9bf28cf75
commit 5f64ae7250
6 changed files with 54 additions and 10 deletions

View File

@@ -79,7 +79,9 @@ class MemScreen(Screen):
# logger.debug(shim.puzzle2widget[puzzle_debug["puzzle"]])
def _get_progress_text(self):
return f"当前进度: {self.procession.process() + 1}/{self.procession.total_length()}"
s = f"阶段: {self.procession.phase.name}\n"
s += f"当前进度: {self.procession.process() + 1}/{self.procession.total_length()}"
return s
def update_display(self):
"""更新进度显示"""
@@ -142,7 +144,7 @@ class MemScreen(Screen):
ret = self.procession.forward(1)
if ret == 0: # 若结束了此次队列
self.update_state()
if self.procession == 0: # 若所有队列都结束了
if self.procession.phase == PhaserState.FINISHED: # 若所有队列都结束了
logger.debug(f"记忆进程结束")
self.mount_finished_widget()
return

View File

@@ -53,7 +53,7 @@ class ClozePuzzle(BasePuzzleWidget):
self.hashmap = dict()
def _load(self):
setting = self.atom.registry["orbital"]["puzzles"][self.alia]
setting = self.atom.registry["nucleon"]["puzzles"][self.alia]
self.puzzle = pz.ClozePuzzle(
text=setting["text"],
delimiter=setting["delimiter"],

View File

@@ -61,11 +61,7 @@ class MCQPuzzle(BasePuzzleWidget):
self.puzzle.refresh()
def compose(self):
setting: Setting = self.atom.registry["nucleon"].metadata["orbital"]["puzzles"][
self.alia
]
logger.debug(f"Puzzle Setting: {setting}")
logger.debug(f"WIRED INDEX: {len(self.inputlist)}")
setting: Setting = self.atom.registry["nucleon"]["puzzles"][self.alia]
if len(self.inputlist) > len(self.puzzle.options):
logger.debug("ERR IDX")
logger.debug(self.inputlist)