mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2026-03-22 06:57:16 +08:00
发布 1.9 版本
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user