File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -544,9 +544,19 @@ function assetUrl(value) {
544544function shouldUseBrowserGenerator ( ) {
545545 return window . GITGREEN_FORCE_BROWSER_GENERATOR === true
546546 || new URLSearchParams ( window . location . search ) . has ( "static" )
547+ || isLocalStaticPreviewHost ( )
547548 || isStaticPagesHost ( ) ;
548549}
549550
551+ function isLocalStaticPreviewHost ( ) {
552+ if ( API_BASE_URL ) {
553+ return false ;
554+ }
555+
556+ const localHosts = [ "127.0.0.1" , "localhost" , "::1" ] ;
557+ return localHosts . includes ( window . location . hostname ) && window . location . port !== "4173" ;
558+ }
559+
550560function isStaticPagesHost ( ) {
551561 if ( API_BASE_URL ) {
552562 return false ;
Original file line number Diff line number Diff line change @@ -257,6 +257,6 @@ <h2 data-i18n="posterSettings">海报设置</h2>
257257 </ aside >
258258 </ div >
259259
260- < script src ="/app.js?v=20260605-real-qr " type ="module "> </ script >
260+ < script src ="/app.js?v=20260605-local-static-fix " type ="module "> </ script >
261261 </ body >
262262</ html >
You can’t perform that action at this time.
0 commit comments