File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 3535
3636 // 控制欢迎弹框是否可见(用于避免闪烁)
3737 let welcomeDialogReady = $state (false );
38+ let hasCheckedWelcomeDialog = $state (false );
3839
3940 // 当 rightClickDisabled 变化时更新同步变量
4041 $effect (() => {
4142 rightClickDisabledSync = rightClickDisabled;
4243 });
44+
45+ // 监听页面切换到仪表盘时检查欢迎弹框(只检查一次)
46+ $effect (() => {
47+ if (activeTab === ' dashboard' && ! hasCheckedWelcomeDialog) {
48+ hasCheckedWelcomeDialog = true ;
49+ GetShowWelcomeDialog ().then (shouldShow => {
50+ if (shouldShow) {
51+ welcomeDialogReady = true ;
52+ }
53+ }).catch (() => {});
54+ }
55+ });
4356
4457 let debugEnabled = $state (false );
4558 let isMaximised = $state (false );
195208 GetLanguage (),
196209 GetVersion ()
197210 ]);
198- // Check if should show welcome dialog
199- const shouldShowWelcome = await GetShowWelcomeDialog ();
200- if (shouldShowWelcome) {
201- welcomeDialogReady = true ;
202- }
203211 rightClickDisabledSync = rightClickDisabled;
204212 debugEnabled = !! config .debugEnabled ;
205213 } catch (e) {
You can’t perform that action at this time.
0 commit comments