Create GUI for onionshare chat mode with the tab workflow

This commit is contained in:
Saptak S 2020-03-09 17:44:00 +05:30
parent ec7a969dde
commit bc3df3319a
8 changed files with 214 additions and 2 deletions

View file

@ -16,6 +16,9 @@
"gui_share_start_server": "Start sharing",
"gui_share_stop_server": "Stop sharing",
"gui_share_stop_server_autostop_timer": "Stop Sharing ({})",
"gui_chat_stop_server_autostop_timer": "Stop Chat Server ({})",
"gui_chat_start_server": "Start chat server",
"gui_chat_stop_server": "Stop chat server",
"gui_stop_server_autostop_timer_tooltip": "Auto-stop timer ends at {}",
"gui_start_server_autostart_timer_tooltip": "Auto-start timer ends at {}",
"gui_receive_start_server": "Start Receive Mode",
@ -182,6 +185,8 @@
"gui_new_tab_receive_description": "Turn your computer into an online dropbox. People will be able to use Tor Browser to send files to your computer.",
"gui_new_tab_website_button": "Publish Website",
"gui_new_tab_website_description": "Host a static HTML onion website from your computer.",
"gui_new_tab_chat_button": "Start Chat Server",
"gui_new_tab_chat_description": "Start an onion chat server and use it to chat in Tor Browser.",
"gui_close_tab_warning_title": "Are you sure?",
"gui_close_tab_warning_persistent_description": "This tab is persistent. If you close it you'll lose the onion address that it's using. Are you sure you want to close it?",
"gui_close_tab_warning_share_description": "You're in the process of sending files. Are you sure you want to close this tab?",

View file

@ -130,6 +130,26 @@ table.file-list td:last-child {
width: 100%;
}
.chat-wrapper {
display: flex;
flex-direction: column;
margin: 0 1rem;
height: calc(100vh - (45px + 2em));
}
.chat-wrapper #chat {
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 2px;
flex: 1;
overflow: auto;
background: #f2f2f2;
padding: 0 1rem;
}
.chat-wrapper .chat-form {
display: flex;
}
.upload-wrapper {
align-items: center;
justify-content: center;

View file

@ -6,7 +6,6 @@ $(function(){
socket.emit('joined', {});
});
socket.on('status', function(data) {
console.log("received")
$('#chat').append('<p><small><i>' + data.msg + '</i></small></p>');
$('#chat').scrollTop($('#chat')[0].scrollHeight);
});