misc fixes
parent
f6a868f6ec
commit
a01ad4fe0f
|
@ -43,7 +43,7 @@ then go to `https://vybe.example.domain` to start using vybe!
|
|||
## todo
|
||||
|
||||
- encrypt private threads (users already use pgp)
|
||||
- voice/video calls
|
||||
- video in calls
|
||||
- instance administration and moderation
|
||||
|
||||
let me know if you have any questions or issues. i can be reached via my website [jerl.zone](https://jerl.zone).
|
||||
|
|
|
@ -125,25 +125,28 @@ function expandInstance(event) {
|
|||
function instanceClicked(event) {
|
||||
let instance = this.parentElement.parentElement.instance;
|
||||
let div = document.getElementById('instance');
|
||||
if (div.classList.contains('hidden')) {
|
||||
let disconnect = document.getElementById('disconnect');
|
||||
if (window.instancelist[0] === instance)
|
||||
disconnect.classList.add('hidden');
|
||||
else
|
||||
disconnect.classList.remove('hidden');
|
||||
document.getElementById('instancename').textContent = instance.url;
|
||||
let userlist = document.getElementById('userlist');
|
||||
userlist.innerHTML = '';
|
||||
instance.emit?.('list_users', {}, msg =>
|
||||
userlist.replaceChildren(...msg.users.map(user => {
|
||||
let p = document.createElement('p');
|
||||
p.append(window.makeUser(user, instance.url, 'user'));
|
||||
return p;
|
||||
}))
|
||||
);
|
||||
div.instance = instance;
|
||||
if (div.classList.contains('hidden'))
|
||||
div.classList.remove('hidden');
|
||||
else if (div.instance === instance) {
|
||||
div.classList.add('hidden');
|
||||
return;
|
||||
}
|
||||
div.classList.toggle('hidden');
|
||||
let disconnect = document.getElementById('disconnect');
|
||||
if (window.instancelist[0] === instance)
|
||||
disconnect.classList.add('hidden');
|
||||
else
|
||||
disconnect.classList.remove('hidden');
|
||||
document.getElementById('instancename').textContent = instance.url;
|
||||
let userlist = document.getElementById('userlist');
|
||||
userlist.innerHTML = '';
|
||||
instance.emit?.('list_users', {}, msg =>
|
||||
userlist.replaceChildren(...msg.users.map(user => {
|
||||
let p = document.createElement('p');
|
||||
p.append(window.makeUser(user, instance.url, 'user'));
|
||||
return p;
|
||||
}))
|
||||
);
|
||||
div.instance = instance;
|
||||
}
|
||||
|
||||
function saveInstances() {
|
||||
|
@ -228,20 +231,16 @@ document.body.append(html.node`
|
|||
</div>
|
||||
<hr class='separator' color='#505050'>
|
||||
<div id='instance' class='column hidden'>
|
||||
<div class='content'>
|
||||
<p>instance: <strong id='instancename'></strong></p>
|
||||
<h4>users</h4>
|
||||
<div id='userlist'>
|
||||
</div>
|
||||
<p>instance: <strong id='instancename'></strong></p>
|
||||
<h4>users</h4>
|
||||
<div id='userlist'>
|
||||
</div>
|
||||
<p>
|
||||
<button id='disconnect' onclick=${function(event) {
|
||||
document.getElementById('instance' + this.parentElement.instance.id).remove();
|
||||
window.instancelist.splice(window.instancelist.indexOf(this.parentElement.instance), 1);
|
||||
saveInstances();
|
||||
document.getElementById('instance').classList.add('hidden');
|
||||
}}>disconnect</button>
|
||||
</p>
|
||||
<button id='disconnect' onclick=${function(event) {
|
||||
document.getElementById('instance' + this.parentElement.instance.id).remove();
|
||||
window.instancelist.splice(window.instancelist.indexOf(this.parentElement.instance), 1);
|
||||
saveInstances();
|
||||
document.getElementById('instance').classList.add('hidden');
|
||||
}}>disconnect</button>
|
||||
</div>
|
||||
<hr class='separator' color='#505050'>
|
||||
<!-- create thread column goes here -->
|
||||
|
|
|
@ -73,7 +73,6 @@ function loadCall() {
|
|||
if (!instance || !event.candidate)
|
||||
return;
|
||||
let candidate = event.candidate.toJSON();
|
||||
console.log(candidate);
|
||||
if (!candidate.candidate)
|
||||
return;
|
||||
instance.emit('ice', {
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
button {
|
||||
border: none;
|
||||
background: #303030;
|
||||
width: fit-content;
|
||||
}
|
||||
button,
|
||||
input:not([type]), input[type='text'],
|
||||
|
@ -137,7 +138,7 @@
|
|||
}
|
||||
.column {
|
||||
flex: 1;
|
||||
margin: 3px;
|
||||
margin: 2px;
|
||||
}
|
||||
.separator {
|
||||
margin: 8px 2px;
|
||||
|
@ -233,6 +234,10 @@
|
|||
justify-content: space-between;
|
||||
max-width: 250px;
|
||||
}
|
||||
#userlist {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.thread {
|
||||
padding: 2px 3px;
|
||||
white-space: pre;
|
||||
|
|
|
@ -78,7 +78,7 @@ function loadStreams() {
|
|||
let div = document.getElementById('stream');
|
||||
div.innerHTML = '';
|
||||
if (window.currentThread?.permissions.post) {
|
||||
render(div, html`
|
||||
render(div, html.node`
|
||||
<button id='streaming' onclick=${stream}>
|
||||
${window.currentThread.handle ? 'stop' : 'start'} streaming
|
||||
</button>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@roamhq/wrtc": "^0.8.0",
|
||||
"aes-js": "^3.1.2",
|
||||
|
|
Loading…
Reference in New Issue