Misc fixes
- I've no idea how to describe these but they're really not that important
This commit is contained in:
parent
e4f6e71ac8
commit
049e8aea82
1
freechat-client/.gitignore
vendored
1
freechat-client/.gitignore
vendored
@ -4,6 +4,7 @@ pyvenv.cfg
|
|||||||
static/css/
|
static/css/
|
||||||
.sass-cache
|
.sass-cache
|
||||||
|
|
||||||
|
src/types.js
|
||||||
resources/js/
|
resources/js/
|
||||||
resources/css/
|
resources/css/
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
const { ipcRenderer } = require('electron')
|
const { ipcRenderer } = require('electron')
|
||||||
const got = require('got')
|
const got = require('got')
|
||||||
|
const channels = require('./channels.js')
|
||||||
|
|
||||||
|
|
||||||
function push_srv(remote, user, enabled) {
|
function push_srv(remote, user, enabled) {
|
||||||
@ -13,10 +14,9 @@ function push_srv(remote, user, enabled) {
|
|||||||
value: remote['name']
|
value: remote['name']
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$('#server-list').append(btn)
|
||||||
let cb = async () => { await channels.list(remote, user) }
|
let cb = async () => { await channels.list(remote, user) }
|
||||||
$(`#${remote['hostname']}`).on('click', cb)
|
$(`#${remote['hostname']}`).on('click', cb)
|
||||||
|
|
||||||
$('#server-list').append(btn)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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']}`)
|
let ref = document.getElementById(`${server.hostname}:${channel['name']}`)
|
||||||
ref.addEventListener('click', function() {
|
ref.addEventListener('click', function() {
|
||||||
// now for the actual handler where we deal with clicks
|
// 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)
|
msg.recent_messages(user, server, channel, yesterday , now, 1000)
|
||||||
.then(()=>{}, reason => {
|
.then(()=>{}, reason => {
|
||||||
console.log(reason)
|
console.error(reason)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -75,7 +76,7 @@ exports.list = async function(server, user) {
|
|||||||
|
|
||||||
|
|
||||||
for(const channel of channels) {
|
for(const channel of channels) {
|
||||||
console.log(server, user, channel)
|
console.log(channel)
|
||||||
push(server, user, channel)
|
push(server, user, channel)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user