diff --git a/frontend/components/FetchProgress.js b/frontend/components/FetchProgress.js
index 344d8f2355..f333ff380a 100644
--- a/frontend/components/FetchProgress.js
+++ b/frontend/components/FetchProgress.js
@@ -38,25 +38,6 @@ export const read_Uint8Array_with_progress = async (response, on_progress) => {
export const FetchProgress = ({ progress }) =>
progress == null || progress === 1
? null
- : html`
`
+ : html``
diff --git a/frontend/editor.css b/frontend/editor.css
index 2fa1d47bb9..1b1c7271fe 100644
--- a/frontend/editor.css
+++ b/frontend/editor.css
@@ -854,6 +854,22 @@ nav#at_the_top > #process_status:empty {
display: none;
}
+.statefile-fetch-progress {
+ /* width: 200px;
+ height: 27px;
+ background: white;
+ border: 5px solid #d1d9e4;
+ border-radius: 6px; */
+ --w: min(80vw, 300px);
+ position: fixed;
+ left: calc(50vw - 0.5 * var(--w));
+ top: 0;
+ z-index: 300000;
+ /* box-sizing: content-box; */
+ /* height: 2rem; */
+ width: var(--w);
+}
+
loading-bar {
height: 6px;
width: 10vw;
diff --git a/frontend/editor.js b/frontend/editor.js
index c1c201247c..42a73b6300 100644
--- a/frontend/editor.js
+++ b/frontend/editor.js
@@ -122,8 +122,10 @@ const get_statefile =
// @ts-ignore
window?.pluto_injected_environment?.custom_get_statefile?.(read_Uint8Array_with_progress, without_path_entries, unpack) ??
(async (launch_params, set_statefile_download_progress) => {
+ set_statefile_download_progress("indeterminate")
const r = await fetch(new Request(launch_params.statefile, { integrity: launch_params.statefile_integrity ?? undefined }))
- const data = await read_Uint8Array_with_progress(r, set_statefile_download_progress)
+ set_statefile_download_progress(0.2)
+ const data = await read_Uint8Array_with_progress(r, (x) => set_statefile_download_progress(x * 0.8 + 0.2))
const state = without_path_entries(unpack(data))
return state
})