Implement DCC streaming
This commit is contained in:
parent
973578bb49
commit
e33b9f05e4
15 changed files with 407 additions and 218 deletions
|
@ -134,6 +134,22 @@ export default function handleSocket({
|
|||
}
|
||||
},
|
||||
|
||||
dcc_send({ server, from, filename, url }) {
|
||||
const serverName = getState().servers[server]?.name || server;
|
||||
|
||||
dispatch(
|
||||
openModal('confirm', {
|
||||
question: `${from} on ${serverName} is sending you: ${filename}`,
|
||||
confirmation: 'Download',
|
||||
onConfirm: () => {
|
||||
const a = document.createElement('a');
|
||||
a.href = url;
|
||||
a.click();
|
||||
}
|
||||
})
|
||||
);
|
||||
},
|
||||
|
||||
_connected(connected) {
|
||||
dispatch(setConnected(connected));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue