mirror of
https://github.com/waku-org/examples.waku.org.git
synced 2025-02-24 11:48:18 +00:00
Updates
This commit is contained in:
parent
9647b73341
commit
e5030b27f5
@ -56,7 +56,7 @@
|
|||||||
const textInput = document.getElementById('textInput');
|
const textInput = document.getElementById('textInput');
|
||||||
const sendButton = document.getElementById('sendButton');
|
const sendButton = document.getElementById('sendButton');
|
||||||
|
|
||||||
const ContentTopic = "/light-js/0/message/utf8";
|
const ContentTopic = "/js-waku-examples/1/chat/utf8";
|
||||||
let messages = []
|
let messages = []
|
||||||
let unsubscribe;
|
let unsubscribe;
|
||||||
|
|
||||||
@ -106,12 +106,14 @@
|
|||||||
subscribeButton.onclick = async () => {
|
subscribeButton.onclick = async () => {
|
||||||
unsubscribe = await node.filter.subscribe(callback, [ContentTopic])
|
unsubscribe = await node.filter.subscribe(callback, [ContentTopic])
|
||||||
unsubscribeButton.disabled = false;
|
unsubscribeButton.disabled = false;
|
||||||
|
subscribeButton.disabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsubscribeButton.onclick = async () => {
|
unsubscribeButton.onclick = async () => {
|
||||||
await unsubscribe();
|
await unsubscribe();
|
||||||
unsubscribe = undefined
|
unsubscribe = undefined
|
||||||
unsubscribeButton.disabled = true;
|
unsubscribeButton.disabled = true;
|
||||||
|
subscribeButton.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
sendButton.onclick = async () => {
|
sendButton.onclick = async () => {
|
||||||
|
@ -7,6 +7,6 @@
|
|||||||
<link rel="stylesheet" href="styles.ef46db3751d8e999.css"></head>
|
<link rel="stylesheet" href="styles.ef46db3751d8e999.css"></head>
|
||||||
<body>
|
<body>
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
<script src="runtime.85abfe8aa64fdd33.js" type="module"></script><script src="main.19e54953c2b04148.js" type="module"></script>
|
<script src="runtime.85abfe8aa64fdd33.js" type="module"></script><script src="main.30c153659dd6ac69.js" type="module"></script>
|
||||||
|
|
||||||
</body></html>
|
</body></html>
|
File diff suppressed because one or more lines are too long
@ -50,7 +50,7 @@
|
|||||||
// Recommendation: `/dapp-name/version/functionality/codec`
|
// Recommendation: `/dapp-name/version/functionality/codec`
|
||||||
// We recommend to use protobuf as codec (`proto`), this demo uses utf-8
|
// We recommend to use protobuf as codec (`proto`), this demo uses utf-8
|
||||||
// for simplicity's sake.
|
// for simplicity's sake.
|
||||||
const contentTopic = '/relay-demo/1/message/utf-8';
|
const contentTopic = '/js-waku-examples/1/chat/utf8';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
statusDiv.innerHTML = '<p>Starting</p>';
|
statusDiv.innerHTML = '<p>Starting</p>';
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"files": {
|
"files": {
|
||||||
"main.css": "/relay-reactjs-chat/static/css/main.e6c13ad2.css",
|
"main.css": "/relay-reactjs-chat/static/css/main.e6c13ad2.css",
|
||||||
"main.js": "/relay-reactjs-chat/static/js/main.8a4afe82.js",
|
"main.js": "/relay-reactjs-chat/static/js/main.ba6c8d6d.js",
|
||||||
"index.html": "/relay-reactjs-chat/index.html",
|
"index.html": "/relay-reactjs-chat/index.html",
|
||||||
"main.e6c13ad2.css.map": "/relay-reactjs-chat/static/css/main.e6c13ad2.css.map",
|
"main.e6c13ad2.css.map": "/relay-reactjs-chat/static/css/main.e6c13ad2.css.map",
|
||||||
"main.8a4afe82.js.map": "/relay-reactjs-chat/static/js/main.8a4afe82.js.map"
|
"main.ba6c8d6d.js.map": "/relay-reactjs-chat/static/js/main.ba6c8d6d.js.map"
|
||||||
},
|
},
|
||||||
"entrypoints": [
|
"entrypoints": [
|
||||||
"static/css/main.e6c13ad2.css",
|
"static/css/main.e6c13ad2.css",
|
||||||
"static/js/main.8a4afe82.js"
|
"static/js/main.ba6c8d6d.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1 +1 @@
|
|||||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/relay-reactjs-chat/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/relay-reactjs-chat/logo192.png"/><link rel="manifest" href="/relay-reactjs-chat/manifest.json"/><title>React App</title><script defer="defer" src="/relay-reactjs-chat/static/js/main.8a4afe82.js"></script><link href="/relay-reactjs-chat/static/css/main.e6c13ad2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/relay-reactjs-chat/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/relay-reactjs-chat/logo192.png"/><link rel="manifest" href="/relay-reactjs-chat/manifest.json"/><title>React App</title><script defer="defer" src="/relay-reactjs-chat/static/js/main.ba6c8d6d.js"></script><link href="/relay-reactjs-chat/static/css/main.e6c13ad2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user