feat: shell.html—本地HTML加载Expo web bundle(safe)

This commit is contained in:
LukeMackin
2026-07-22 21:02:06 +08:00
parent d75ed790cc
commit b04238892d
2 changed files with 9 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
<!DOCTYPE html>
<html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Yuzu GCA</title>
<style>body{margin:0;background:#0f172a}#root{min-height:100vh}#loading{color:#94a3b8;text-align:center;padding-top:40vh;font:16px system-ui}</style>
</head><body>
<div id="root"><div id="loading">Loading Yuzu GCA...</div></div>
<script src="http://10.1.0.17:8081/index.bundle?platform=web&dev=true"></script>
</body></html>

View File

@@ -10,7 +10,7 @@ class MainActivity : AppCompatActivity() {
WebView(this).apply { WebView(this).apply {
settings.javaScriptEnabled = true settings.javaScriptEnabled = true
settings.domStorageEnabled = true settings.domStorageEnabled = true
loadUrl("http://10.1.0.17:8081/index.bundle?platform=android&dev=true&minify=false") loadUrl("file:///android_asset/shell.html")
}.also { setContentView(it) } }.also { setContentView(it) }
} }
} }