Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Room type with Converse.js replacing jitsi #385

Merged
merged 26 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5adf316
initial converse inclusion with creation of streaming room
Mar 14, 2021
7c00673
Merge branch 'master' into chat
Mar 14, 2021
f865b07
cleaned up converse init
Mar 14, 2021
671a839
pushing for andrew to look at
Mar 14, 2021
02165d2
initial configuration for converse
rene-grigory Mar 18, 2021
dfde39e
Merge branch 'master' into chat
rene-grigory Mar 18, 2021
1d57567
merged from upstream
rene-grigory Mar 18, 2021
c10398c
merged from upstream
rene-grigory Mar 18, 2021
dfcdb08
removed node_modules from git
rene-grigory Mar 18, 2021
09b1df7
created auto logout when leaving the room
Mar 19, 2021
1fe98b3
got rid of needless code
Mar 19, 2021
b85be73
ready for styling and cleanup
Mar 19, 2021
f155948
finished hijacking css
rene-grigory Mar 22, 2021
7c00179
Merge branch 'master' into chat
rene-grigory Mar 22, 2021
21f35c3
revered iframe link
rene-grigory Mar 22, 2021
fd36859
code clean up
rene-grigory Mar 22, 2021
d7599ec
Merge branch 'master' into chat
Mar 23, 2021
80adc18
fixed comment in rooms.proto
rene-grigory Mar 23, 2021
9c99bb2
logout user in beforeUnload
rene-grigory Mar 23, 2021
a093676
hide offline users and brought in the latest convers.js lib
rene-grigory Mar 26, 2021
85c5117
Merge branch 'master' into chat
rene-grigory Mar 26, 2021
5165ca7
format cleanup
rene-grigory Apr 1, 2021
30346f8
more cleanup and useing Config.baseUrl to point at the bash service
rene-grigory Apr 1, 2021
4eaa9ed
replaced old listener with MutationObserver since none of the convers…
rene-grigory Apr 1, 2021
83df75c
removed comment and fixed console.error
rene-grigory Apr 2, 2021
f3b7421
added style variables for the chat box
rene-grigory Apr 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions app/client/jsx/ChatStreamRoom.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import Config from "./Config.jsx";
*/
export const ChatStreamRoom = ({
id: roomId,
name: roomName,
displayName,
iframeOptions: { src },
}) => {
Expand Down Expand Up @@ -48,19 +47,25 @@ export const ChatStreamRoom = ({
singleton: true,
hide_offline_users: true,
clear_cache_on_logout: true,
time_format: "hh:mm a",
visible_toolbar_buttons: {
call: false,
spoiler: false,
emoji: true,
toggle_occupants: false,
},
whitelisted_plugins: ["jitsi-plugin"],
view_mode: "embedded",
});

// use MutationObserver to restucture the chatbox
const observer = new MutationObserver((muts) => {
if (document.querySelector(".chatbox-title__buttons") !== null) {
const title = document.querySelector(".chatbox-title__text");
const dd = document.querySelector(".chatbox-title__buttons");

title.innerHTML = roomName;
dd.remove();
document.querySelector(".chat-head").remove();
}

if (document.querySelector(".send-button") !== null) {
document.querySelector(".send-button").remove();
observer.disconnect();
}
});
Expand Down
126 changes: 110 additions & 16 deletions app/client/styles/pages/_chatStreamRoom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ $mobile_portrait_length: 480px !default;
background-color: $background-color !important;
}

.chat-textarea:focus {
outline-color: $background-color !important;
}

.occupants-heading {
color: $background-color !important;
}
Expand All @@ -37,24 +33,122 @@ $mobile_portrait_length: 480px !default;
}

.chatroom {
converse-chat-toolbar {
border-top: 2px solid $background-color !important;
// color themes
.separator {
border-bottom: 2px solid $chat-separator-bars !important;
}

button:focus {
outline-color: $background-color !important;
}
.separator-text {
color: $chat-separator-text !important;
background-color: $chat-separator-text-bg !important;
}

.chat-content {
background-color: $chat-content;
}

.chat-msg__author {
color: $chat-msg-author !important;
}

.chat-msg__time {
color: $chat-msg-time !important;
}

.chat-msg__text {
color: $chat-msg-text !important;
}

.fa-bars {
color: $chat-msg-menu !important
}

.dropdown-menu {
background-color: $chat-msg-menu-bg !important;
}

.chat-msg__action {
color: $chat-msg-menu-items !important;
svg {
fill: $background-color !important;
fill: $chat-msg-menu-items !important;
}
}
}

.separator {
border-bottom: 2px solid $background-color !important;
}
.chat-content__notifications {
background-color: $chat-notification-bg !important;
color: $chat-notification-text !important;
}

.send-button {
background-color: $background-color !important;
converse-muc-sidebar {
background-color: $chat-participants !important;
border-left-color: $chat-participants-resize !important;
}

.occupants-heading {
color: $participants-title !important;
}

.occupant-nick {
color: $participants-name !important;
}

.suggestion-box {
border-top: 1px solid $message-input-top-border !important;
}

.chat-textarea {
background-color: $message-area-bg !important;
margin-bottom: -5px !important;
color: $message-text !important;
&::placeholder {
color: lighten($message-text, 20%) !important;
}
&:focus {
outline: 0px !important;
border: 2px solid $message-focus !important;
border-bottom: 3px solid $message-focus !important;
}
}

.sendXMPPMessage {
background-color: $message-area-bg !important;
}

.emoji-picker__header,
.emoji-skintone-picker {
background-color: $emoji-header-footer !important;
}

.emoji-picker {
background-color: $emoji-separator !important;
}

.emoji-picker__lists {
background-color: $emoji-popup-bg !important;
}

.emoji-category__heading {
color: $emoji-category-heading !important;
}

.toggle-emojis:focus {
outline: 0px !important;
}

// other adjustments
.chat-content__help {
border: 0px !important;
}

converse-chat-toolbar {
border-top: 0px !important;
background-color: $toolbox-bg !important;

svg {
fill: $toolbox-emoji-color !important;
} .separator {
border-bottom: 2px solid $toolbox-bg !important;
}
}
}
}
44 changes: 36 additions & 8 deletions app/client/styles/themes/_tst.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,34 @@ $dark-grey: #404040;
$matte-blue: #294b7f;
$light-grey: #ece9e9;

// Chat color variables
$chat-separator-bars: $matte-blue; // separator bars at the top of the chat area
$chat-separator-text: $matte-blue; // text between the separators
$chat-separator-text-bg: $fuckyou-turquoise; // background for the text area
$chat-content: $fuckyou-turquoise; // the main chat area on the left
$chat-notification-bg: $fuckyou-turquoise; // entry/exit notification background
$chat-notification-text: $matte-blue; // entry/exit notification text color
$chat-msg-author: $matte-blue; // color of user name
$chat-msg-time: $matte-blue; // color of the chat time
$chat-msg-text: $matte-blue; // color the chat text
$chat-msg-menu: $matte-blue; // color the hamburgar menu to the right of the chat message
$chat-msg-menu-bg: $fuckyou-turquoise; // background color of the menu dropdown
$chat-msg-menu-items: $matte-blue; // color for the menu items
$toolbox-bg: $fuckyou-turquoise; // background color for the location of the emoji picker icon
$toolbox-emoji-color: $matte-blue; // the color for the emoji icon
$emoji-header-footer: $matte-blue; // color for the header and footer inside the emoji popup
$emoji-category-heading: $matte-blue; // color for the emoji heading text in the popup
$emoji-popup-bg: $matte-purple; // background color of the emoji popup
$emoji-separator: $fuckyou-turquoise; // color for th emoji separator bar
$message-area-bg: $fuckyou-turquoise; // background for the message text area
$message-input-top-border: $matte-blue; // the border at the top of the message area
$message-focus: $matte-blue; // the color of the message area border when focused
$message-text: $matte-blue; // the text color in the message area
$chat-participants: $fuckyou-turquoise; // the participants sidebar on the right of the chat
$chat-participants-resize: $matte-blue; // color of the participants resize handle
$participants-title: $matte-blue; // the title of the participants list
$participants-name: $matte-blue; // the name of each participant in the list
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these comments, that's very helpful


// Hexing notifications & icon
$accent-color: $fuckyou-turquoise;

Expand Down Expand Up @@ -73,21 +101,21 @@ $modal-overlay-color: rgba(129, 62, 62, 0.25);
$art-image-border-color: color("grey-50"); //white

body {
font-family: $accent-font !important;
font-family: $accent-font !important;
}

.vestibule .header {
margin-bottom: 0 !important;
margin-bottom: 0 !important;
}

.custom-login-description {
text-align: center;
font-size: smaller;
opacity: 0.8;
text-align: center;
font-size: smaller;
opacity: 0.8;
}

// .tst,
// .room-header h2,
// .room-header h2,
// #map-info .room-name,
// .events-view .events-header,
// .events-view .event-list .event-info .event-name,
Expand All @@ -96,6 +124,6 @@ body {
// }

.room .room-content {
max-height: 120px;
padding: .5em 50px;
max-height: 120px;
padding: 0.5em 50px;
}