363363 align-items : stretch;
364364 }
365365
366+ .switch-surface .summary-hidden {
367+ grid-template-columns : minmax (0 , 1fr );
368+ }
369+
366370 .switch-panel ,
367371 .summary-panel {
368372 min-width : 0 ;
@@ -845,7 +849,6 @@ <h2 data-i18n="summary">切换摘要</h2>
845849 live : "实盘" ,
846850 paper : "Dry run" ,
847851 summary : "当前配置状态" ,
848- publicSummary : "公开预览" ,
849852 copySummary : "复制状态" ,
850853 loginToRun : "登录后切换" ,
851854 loadingConfig : "读取配置中" ,
@@ -872,8 +875,6 @@ <h2 data-i18n="summary">切换摘要</h2>
872875 currentStrategy : "当前策略" ,
873876 nextStrategy : "选择策略" ,
874877 notRead : "未读取" ,
875- publicPreview : "公开示例" ,
876- accountConfigLoaded : "账号配置已加载" ,
877878 } ,
878879 en : {
879880 appTitle : "Strategy Switch" ,
@@ -895,7 +896,6 @@ <h2 data-i18n="summary">切换摘要</h2>
895896 live : "Live" ,
896897 paper : "Dry run" ,
897898 summary : "Current Config" ,
898- publicSummary : "Public Preview" ,
899899 copySummary : "Copy state" ,
900900 loginToRun : "Sign in to switch" ,
901901 loadingConfig : "Loading config" ,
@@ -922,8 +922,6 @@ <h2 data-i18n="summary">切换摘要</h2>
922922 currentStrategy : "Current strategy" ,
923923 nextStrategy : "Selected strategy" ,
924924 notRead : "Not read" ,
925- publicPreview : "Public preview" ,
926- accountConfigLoaded : "Account config loaded" ,
927925 } ,
928926 } ;
929927
@@ -1294,10 +1292,17 @@ <h2 data-i18n="summary">切换摘要</h2>
12941292 }
12951293
12961294 function renderSummary ( ) {
1295+ const showSummary = Boolean ( state . auth . allowed ) ;
1296+ const summaryPanel = document . querySelector ( ".summary-panel" ) ;
1297+ const switchSurface = document . querySelector ( ".switch-surface" ) ;
1298+ summaryPanel . hidden = ! showSummary ;
1299+ switchSurface . classList . toggle ( "summary-hidden" , ! showSummary ) ;
1300+ if ( ! showSummary ) return ;
1301+
12971302 const inputs = buildInputs ( ) ;
12981303 const list = el ( "summary-list" ) ;
12991304 list . replaceChildren ( ) ;
1300- document . querySelector ( ".summary-head h2" ) . textContent = state . auth . allowed ? t ( "summary" ) : t ( "publicSummary ") ;
1305+ document . querySelector ( ".summary-head h2" ) . textContent = t ( "summary" ) ;
13011306 for ( const [ label , value ] of summaryRows ( inputs ) ) {
13021307 const row = document . createElement ( "div" ) ;
13031308 row . className = "summary-row" ;
@@ -1309,7 +1314,10 @@ <h2 data-i18n="summary">切换摘要</h2>
13091314 list . appendChild ( row ) ;
13101315 }
13111316
1312- el ( "mode-pill" ) . textContent = modeLabel ( inputs . execution_mode ) ;
1317+ const account = selectedAccount ( ) ;
1318+ const currentEntry = currentEntryForAccount ( state . selected , account ) ;
1319+ const currentMode = normalizeExecutionMode ( currentEntry ?. execution_mode , currentEntry ?. dry_run_only ) ;
1320+ el ( "mode-pill" ) . textContent = currentMode ? modeLabel ( currentMode ) : t ( "notRead" ) ;
13131321 }
13141322
13151323 function renderAuth ( ) {
0 commit comments