improved splash screen action
This commit is contained in:
@@ -36,10 +36,10 @@ pub fn open_splash_window() {
|
||||
let webview_window = match tauri::WebviewWindowBuilder::new(
|
||||
app_handle,
|
||||
SPLASH_WINDOW_LABEL,
|
||||
tauri::WebviewUrl::App("/splash".into()),
|
||||
tauri::WebviewUrl::App("/splash.html".into()),
|
||||
)
|
||||
.title("Friendolls Splash")
|
||||
.inner_size(600.0, 300.0)
|
||||
.inner_size(800.0, 400.0)
|
||||
.resizable(false)
|
||||
.decorations(false)
|
||||
.transparent(true)
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
<div id="splash" class="w-screen h-screen object-contain bg-base-100"></div>
|
||||
|
||||
<style>
|
||||
#splash {
|
||||
background-image: url("../../assets/media/splash-dev.jpeg");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
</style>
|
||||
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
28
static/splash.html
Normal file
28
static/splash.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Friendolls</title>
|
||||
<script>
|
||||
document.addEventListener("contextmenu", function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="width: 100%; height: 100%">
|
||||
<div id="splash"></div>
|
||||
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
#splash {
|
||||
background-image: url("/splash-dev.jpeg");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
width: 800px;
|
||||
height: 400px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user