CLI: Toasts & Tweaks (#2702)
* progress: cli toasts * forgot the html * progress: toasts * revision: don't open splash on desktop * fix: fmt, spellcheck
This commit is contained in:
1 parent
beeee0dda1
commit
bd58a92441
10 files changed
+363
-31
No files matched your search
@@ -10,6 +10,7 @@ use std::path::{Path, PathBuf};
|
||||
use tracing::Level;
|
||||
|
||||
const DEFAULT_HTML: &str = include_str!("../../assets/index.html");
|
||||
const TOAST_HTML: &str = include_str!("../../assets/toast.html");
|
||||
|
||||
impl BuildRequest {
|
||||
pub(crate) fn prepare_html(
|
||||
@@ -110,9 +111,16 @@ impl BuildRequest {
|
||||
});
|
||||
}
|
||||
);
|
||||
</script></body"#,
|
||||
</script>
|
||||
{DX_TOAST_UTILITIES}
|
||||
</body"#,
|
||||
);
|
||||
|
||||
*html = match self.serve && !self.build_arguments.release {
|
||||
true => html.replace("{DX_TOAST_UTILITIES}", TOAST_HTML),
|
||||
false => html.replace("{DX_TOAST_UTILITIES}", ""),
|
||||
};
|
||||
|
||||
// And try to insert preload links for the wasm and js files
|
||||
*html = html.replace(
|
||||
"</head",
|
||||
|
||||
@@ -43,6 +43,7 @@ impl std::fmt::Display for Stage {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct UpdateBuildProgress {
|
||||
pub stage: Stage,
|
||||
pub update: UpdateStage,
|
||||
|
||||
Reference in new issue
Block a user