Skip to content

Commit baab45b

Browse files
committed
[201_46] 引导弹窗加入进度条
1 parent d7faff6 commit baab45b

File tree

5 files changed

+41
-941
lines changed

5 files changed

+41
-941
lines changed

TeXmacs/plugins/lang/dic/en_US/zh_CN.scm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,10 +1289,10 @@
12891289
("logarithmic" "对数坐标")
12901290
("logarithms" "对数")
12911291
("Log In" "登录")
1292-
("Log in and enjoy seamless Markdown import." "登陆即享Markdown无缝导入")
1293-
("Log in to chat with the AI." "登陆即可与AI进行对话")
1292+
("Log in and enjoy seamless Markdown import." "登录即享Markdown无缝导入")
1293+
("Log in to chat with the AI." "登录即可与AI进行对话")
12941294
("Log in to sync settings and access all features" "登录即可同步设置并访问所有功能。")
1295-
("Log in to use the latest OCR model." "登陆即用OCR最新模型")
1295+
("Log in to use the latest OCR model." "登录即用OCR最新模型")
12961296
("login" "登录")
12971297
("Login error, please log in again." "登录有误,请重新登陆")
12981298
("long text" "长文本")

devel/201_46.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ rm ~/.local/share/moganlab/system
2424

2525
5. 把引导弹窗X掉,不进入主界面
2626

27+
28+
## 2025/12/31 引导弹窗加入进度条
29+
#### what
30+
1. 进度条组件:使用 QProgressBar 显示初始化进度,范围 0-100,实时更新百分比
31+
2. 状态标签:显示当前初始化步骤("准备初始化..."、"正在初始化..."、"初始化完成"等)
32+
3. 时间估算标签:根据已用时间和预计总时间显示剩余时间(分钟或秒)
33+
4. 显示时机:初始化开始时自动显示进度UI,隐藏功能列表
34+
5. 进度更新:通过 BootstrapWorker 信号实时更新进度条和状态信息
35+
6. 完成处理:初始化完成后,根据用户是否已做选择决定是否关闭弹窗
36+
2737
## 2025/12/27 非社区版安装后首次或者更新后打开软件,出现引导弹窗
2838

2939
#### what

src/Plugins/Qt/startup_login_dialog.cpp

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ namespace QWK {
2727
void
2828
StartupLoginDialog::setupUi () {
2929
// Create title label
30-
titleLabel= new QLabel (qt_translate ("欢迎使用 Liii STEM"),
31-
this); // 欢迎使用 Liii STEM
30+
titleLabel= new QLabel (qt_translate ("Welcome to Liii STEM"),
31+
this); // Welcome to Liii STEM
3232
titleLabel->setAlignment (Qt::AlignCenter);
3333
titleLabel->setObjectName ("titleLabel");
3434

3535
// Create subtitle label
36-
subtitleLabel= new QLabel (qt_translate ("登录即可同步设置并访问所有功能。"),
37-
this); // 登录即可同步设置并访问所有功能。
36+
subtitleLabel= new QLabel (qt_translate ("Log in to sync settings and access all features"),
37+
this); // Log in to sync settings and access all features
3838
subtitleLabel->setAlignment (Qt::AlignCenter);
3939
subtitleLabel->setObjectName ("subtitleLabel");
4040

4141
// Create feature labels
42-
featureLabel1= new QLabel (qt_translate ("1. 注册即送14天会员期限"),
43-
this); // 注册即送14天会员期限
42+
featureLabel1= new QLabel ("1. " + qt_translate ("Register now and receive a 14-day membership."),
43+
this); // Register now and receive a 14-day membership.
4444
featureLabel2=
45-
new QLabel (qt_translate ("2. 登录即可同步设置并访问所有功能。"),
46-
this); // 登录即可同步设置并访问所有功能。
47-
featureLabel3= new QLabel (qt_translate ("3. 登录即可与AI进行对话"),
48-
this); // 登录即可与AI进行对话
49-
featureLabel4= new QLabel (qt_translate ("4. 登录即享Markdown无缝导入"),
50-
this); // 登录即享Markdown无缝导入
45+
new QLabel ("2. " + qt_translate ("Log in to sync settings and access all features"),
46+
this); // Log in to sync settings and access all features
47+
featureLabel3= new QLabel ("3. " + qt_translate ("Log in to chat with the AI."),
48+
this); // Log in to chat with the AI.
49+
featureLabel4= new QLabel ("4. " + qt_translate ("Log in and enjoy seamless Markdown import."),
50+
this); // Log in and enjoy seamless Markdown import.
5151

5252
featureLabel1->setObjectName ("featureLabel");
5353
featureLabel2->setObjectName ("featureLabel");
@@ -367,6 +367,16 @@ StartupLoginDialog::startBackgroundInitialization() {
367367
// Enable buttons and update UI for user choice
368368
loginButton->setEnabled(true);
369369
skipButton->setEnabled(true);
370+
371+
// Show feature labels and hide progress UI after initialization
372+
// featureLabel1->setVisible(true);
373+
// featureLabel2->setVisible(true);
374+
// featureLabel3->setVisible(true);
375+
// featureLabel4->setVisible(true);
376+
progressBar->setVisible(true);
377+
statusLabel->setVisible(true);
378+
timeEstimationLabel->setVisible(true);
379+
370380
emit windowReadyForTransition();
371381
}
372382
} else {
@@ -378,6 +388,12 @@ StartupLoginDialog::startBackgroundInitialization() {
378388
// Re-enable buttons for retry (though retry not implemented yet)
379389
loginButton->setEnabled(true);
380390
skipButton->setEnabled(true);
391+
392+
// // Show feature labels even if initialization failed
393+
// featureLabel1->setVisible(true);
394+
// featureLabel2->setVisible(true);
395+
// featureLabel3->setVisible(true);
396+
// featureLabel4->setVisible(true);
381397
}
382398

383399
emit initializationFinished(success);

0 commit comments

Comments
 (0)