-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathindex.html
More file actions
80 lines (77 loc) · 1.93 KB
/
index.html
File metadata and controls
80 lines (77 loc) · 1.93 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
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tauri Awesome RPC Example</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
}
.container {
max-width: 600px;
margin: 0 auto;
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
h1 {
color: #333;
margin-bottom: 30px;
text-align: center;
}
.section {
margin-bottom: 30px;
padding: 20px;
background: #f9f9f9;
border-radius: 5px;
}
h5 {
color: #666;
margin-bottom: 10px;
font-size: 16px;
}
.result {
padding: 10px;
background: #e8f5e9;
border-radius: 3px;
font-family: monospace;
min-height: 30px;
display: flex;
align-items: center;
}
#time_elapsed {
background: #e3f2fd;
}
.info {
color: #888;
font-size: 14px;
margin-top: 20px;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<h1>😎 tauri-awesome-rpc</h1>
<div class="section">
<h5>Invoke Test</h5>
<div id="response" class="result">Waiting for response...</div>
</div>
<div class="section">
<h5>AwesomeEvent.listen Test</h5>
<div id="time_elapsed" class="result">Waiting for events...</div>
</div>
<div class="info">
This example demonstrates WebSocket-based RPC communication
<br />
between the frontend and Rust backend in Tauri v2
</div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>