-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplash.html
More file actions
67 lines (63 loc) · 1.76 KB
/
splash.html
File metadata and controls
67 lines (63 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Splash Screen</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
margin: 0;
}
.container {
text-align: center;
padding: 2rem;
background: rgba(255,255,255,0.1);
border-radius: 1rem;
}
button {
padding: 12px 24px;
font-size: 1.1rem;
cursor: pointer;
border: none;
border-radius: 8px;
background: linear-gradient(45deg, #61dafb, #21a1f1);
color: white;
}
</style>
</head>
<body>
<div class="container">
<h1>Tauri E2E Test App</h1>
<p>Splash Screen</p>
<button id="switch-main-window" class="switch-main-window">Continue</button>
</div>
<!-- CRITICAL: Load plugin JS explicitly for Tauri v2 dynamic windows -->
<script type="module">
import '@wdio/tauri-plugin';
// Debug: Verify plugin loaded
console.log('[Splash] wdioTauri available:', !!window.wdioTauri);
console.log('[Splash] __TAURI__ available:', !!window.__TAURI__);
</script>
<script type="module">
document.addEventListener('DOMContentLoaded', () => {
const btn = document.getElementById('switch-main-window');
if (!btn) return;
btn.addEventListener('click', async () => {
if (window.__TAURI__?.core?.invoke) {
try {
await window.__TAURI__.core.invoke('switch_to_main');
console.log('[Splash] switch_to_main invoked successfully');
} catch (e) {
console.error('[Splash] switch_to_main failed:', e);
}
}
});
});
</script>
</body>
</html>