new splash screen
This commit is contained in:
@@ -69,8 +69,12 @@ fn harden_scene_window_on_macos(window: &tauri::Window) {
|
|||||||
pub fn open_splash_window() {
|
pub fn open_splash_window() {
|
||||||
info!("Starting splash window creation...");
|
info!("Starting splash window creation...");
|
||||||
|
|
||||||
let mut config =
|
let url = if cfg!(debug_assertions) {
|
||||||
WindowConfig::accessory(SPLASH_WINDOW_LABEL, "/splash.html", "Friendolls Splash");
|
"/splash.html?debug=Y"
|
||||||
|
} else {
|
||||||
|
"/splash.html"
|
||||||
|
};
|
||||||
|
let mut config = WindowConfig::accessory(SPLASH_WINDOW_LABEL, url, "Friendolls Splash");
|
||||||
config.width = 800.0;
|
config.width = 800.0;
|
||||||
config.height = 400.0;
|
config.height = 400.0;
|
||||||
config.visible = false;
|
config.visible = false;
|
||||||
|
|||||||
@@ -2,22 +2,29 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>Friendolls</title>
|
<title>Friendolls Splash</title>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener("contextmenu", function (e) {
|
document.addEventListener("contextmenu", function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
|
const debug = urlParams.get("debug") === "Y";
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body style="width: 100%; height: 100%">
|
<body style="width: 100%; height: 100%">
|
||||||
<div id="splash"></div>
|
<div id="splash"></div>
|
||||||
|
<script>
|
||||||
|
document.getElementById("splash").style.backgroundImage = debug
|
||||||
|
? 'url("/splash-dev.jpeg")'
|
||||||
|
: 'url("/splash.jpg")';
|
||||||
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
#splash {
|
#splash {
|
||||||
background-image: url("/splash-dev.jpeg");
|
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
width: 800px;
|
width: 800px;
|
||||||
|
|||||||
BIN
static/splash.jpg
Normal file
BIN
static/splash.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 71 KiB |
Reference in New Issue
Block a user