forked from cory/tildefriends
Add a stock app with local room connection info. #15
This commit is contained in:
parent
9d09607013
commit
418cfac0e3
5
apps/room.json
Normal file
5
apps/room.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"type": "tildefriends-app",
|
||||||
|
"emoji": "📦",
|
||||||
|
"previous": "&IU+TwyM7TznD8NBfnw7tgW2zxVlMqTVxSqWFjuosLwo=.sha256"
|
||||||
|
}
|
13
apps/room/app.js
Normal file
13
apps/room/app.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
async function main() {
|
||||||
|
let host = core.url.match(/.*\/\/(.*?)\//)[1];
|
||||||
|
let id = (await ssb.getServerIdentity()).substring(1);
|
||||||
|
let room = `net:${host}:${ssb.port}~shs:${id}:SSB+Room+SK3TLYC2T86EHQCUHBUHASCASE18JBV24=`;
|
||||||
|
await app.setDocument(`
|
||||||
|
<body style="color: #fff">
|
||||||
|
<h1>Server</h1>
|
||||||
|
<div>The local server address is:</div>
|
||||||
|
<div><input type="text" readonly value="${room}" style="width: 100%"></input></div>
|
||||||
|
</body>
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
main();
|
Loading…
Reference in New Issue
Block a user