Native splash held while connecting; offline shows the same picture with a connecting line; web splash hidden inside the app
Inside the app the web splash is invisible with the new APK (the system splash is still on top) and icon-only for old APKs, so there is no second picture to switch to. Offline or a 5xx on the main frame: system splash released onto the same icon (288dp drawable) with 'در حال اتصال به اینترنت…', retried every 5s. A slow-but-online load shows nothing extra. Debug build compiles; not run on a device. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
12
index.html
12
index.html
@@ -14,10 +14,22 @@
|
||||
Vazirmatn بعد از CSS میرسد و عوضشدنِ فونت خودش یک پرش است. -->
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
<link rel="preload" as="image" href="/app-icon.png" />
|
||||
<script>
|
||||
(function () {
|
||||
var b = window.TadrisinoAndroid;
|
||||
if (b) document.documentElement.className = typeof b.appReady === 'function' ? 'in-app' : 'in-old-app';
|
||||
})();
|
||||
</script>
|
||||
<style>
|
||||
.boot-splash { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
|
||||
align-items: center; justify-content: center; gap: 20px; background: #fff; }
|
||||
.boot-splash img { width: 144px; height: 144px; display: block; }
|
||||
/* داخلِ اپِ اندروید اسپلشِ بومی روی صفحه است و سایت زیرش بار میشود؛ اسپلشِ وب نباید یک بار دیگر
|
||||
«عوض شدن» نشان دهد. APKِ تازه (appReady دارد): اسپلشِ وب نامرئی است. APKِ قدیمی: فقط آیکون،
|
||||
بینام، تا کمتر از اسپلشِ سیستم فرق کند. */
|
||||
.in-app .boot-splash > * { visibility: hidden; }
|
||||
.in-old-app .boot-splash span { display: none; }
|
||||
.in-old-app .boot-splash img { width: 160px; height: 160px; }
|
||||
.boot-splash span { font: 900 34px/1.2 system-ui, -apple-system, sans-serif; color: #1a1a2e; }
|
||||
</style>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user