Misc fixes

- I've no idea how to describe these but they're really not that important
This commit is contained in:
shockrah 2021-03-11 17:20:13 -08:00
parent e4f6e71ac8
commit 049e8aea82
3 changed files with 6 additions and 4 deletions

View File

@ -4,6 +4,7 @@ pyvenv.cfg
static/css/
.sass-cache
src/types.js
resources/js/
resources/css/

View File

@ -1,5 +1,6 @@
const { ipcRenderer } = require('electron')
const got = require('got')
const channels = require('./channels.js')
function push_srv(remote, user, enabled) {
@ -13,10 +14,9 @@ function push_srv(remote, user, enabled) {
value: remote['name']
})
$('#server-list').append(btn)
let cb = async () => { await channels.list(remote, user) }
$(`#${remote['hostname']}`).on('click', cb)
$('#server-list').append(btn)
}
/**

View File

@ -37,6 +37,7 @@ function push(server, user, channel) {
)
)
)
// Not using jquery for this because it breaks with weird id names really easily
let ref = document.getElementById(`${server.hostname}:${channel['name']}`)
ref.addEventListener('click', function() {
// now for the actual handler where we deal with clicks
@ -48,7 +49,7 @@ function push(server, user, channel) {
msg.recent_messages(user, server, channel, yesterday , now, 1000)
.then(()=>{}, reason => {
console.log(reason)
console.error(reason)
})
})
}
@ -75,7 +76,7 @@ exports.list = async function(server, user) {
for(const channel of channels) {
console.log(server, user, channel)
console.log(channel)
push(server, user, channel)
}