-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
55 lines (44 loc) · 2 KB
/
index.html
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
<html>
<head>
<title>ZXinger Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="importmap">
{
"imports": {
"lit": "https://cdn.jsdelivr.net/npm/lit@2/index.js",
"lit/": "https://cdn.jsdelivr.net/npm/lit@2/",
"@material/web/": "https://cdn.jsdelivr.net/npm/@material/[email protected]/",
"@lit/reactive-element": "https://cdn.jsdelivr.net/npm/@lit/reactive-element@1/reactive-element.js",
"@lit/reactive-element/": "https://cdn.jsdelivr.net/npm/@lit/reactive-element@1/",
"lit-element/lit-element.js": "https://cdn.jsdelivr.net/npm/lit-element@3/lit-element.js",
"lit-html": "https://cdn.jsdelivr.net/npm/lit-html@2/lit-html.js",
"lit-html/": "https://cdn.jsdelivr.net/npm/lit-html@2/",
"tslib": "https://cdn.jsdelivr.net/npm/tslib@2/tslib.es6.mjs",
"zxinger": "https://cdn.jsdelivr.net/gh/chainparency/zxinger@0/index.js"
}
}
</script>
</head>
<body>
<script type="module">
import './zxinger-dialog.js'
import '@material/web/button/filled-button.js'
document.querySelector("#zxinger").addEventListener("change", (e) => {
console.log("result:", e.detail.value)
document.querySelector("#result").innerHTML = e.detail.value
})
document.querySelector("#scanButton").addEventListener("click", () => document.querySelector("#zxinger").open())
</script>
<xzinger-dialog id="zxinger"></xzinger-dialog>
<div style="display: flex; flex-direction: column; gap: 20px; justify-content: center; align-items: center;">
<h1>ZXinger Demo</h1>
<div><a href="https://github.com/chainparency/zxinger">https://github.com/chainparency/zxinger</a></div>
<div>
<span id="result"></span>
</div>
<div>
<md-filled-button id="scanButton">Scan</md-filled-button>
</div>
</div>
</body>
</html>