发布 1.9 版本

This commit is contained in:
JoeanAmier
2024-03-15 22:21:03 +08:00
parent a997fe1a1d
commit f607be0aaf
47 changed files with 1045 additions and 589 deletions

View File

@@ -1,25 +1,22 @@
from typing import Callable
from textual.app import ComposeResult
from textual.containers import Grid
from textual.screen import ModalScreen
from textual.widgets import Label
from textual.widgets import LoadingIndicator
from source.translator import (
English,
Chinese,
)
__all__ = ["Loading"]
class Loading(ModalScreen):
def __init__(self, language: Chinese | English):
def __init__(self, message: Callable[[str], str]):
super().__init__()
self.prompt = language
self.message = message
def compose(self) -> ComposeResult:
yield Grid(
Label(self.prompt.processing),
Label(self.message("程序处理中...")),
LoadingIndicator(),
classes="loading",
)