Commit edad8832 authored by Hugo Lefeuvre's avatar Hugo Lefeuvre Committed by Sébastien Blin

chatview: implement navbar

Currently the navbar is implemented in native GTK, and has a pretty
bad integration with the chatview. In this patch we implement a
modern navbar *in* the chatview and remove the old GTK bar.

*Changes summary*

chatview, HTML/JS/CSS side:
- Remove useless function setSendIcon from the chatview
- Simplify setTemporary in the chatview
- Use only one single showInvitation function instead of two
  showInvitation and hideInvitation functions.
- Remove pointless/copy&pasted comments

chatview, GTK side:
- Simplify chatview update methods: instead of providing several
separate functions to update the invitation/banned status of the chat
view, only provide one (update_chatview_frame). This should have a
good impact on the performances and simplify webkit crash handling.

Change-Id: I6959240efd357fedb07d3c60d551efc8fca84812
Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
parent 8127fe12
......@@ -4,6 +4,7 @@
* Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
* Author: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
* Author: Hugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -52,19 +53,11 @@ struct _ChatViewPrivate
{
GtkWidget *box_webkit_chat_container;
GtkWidget *webkit_chat_container;
GtkWidget *hbox_chat_info;
GtkWidget *label_peer;
GtkWidget *label_cm;
GtkWidget *button_close_chatview;
GtkWidget *button_placecall;
GtkWidget *button_add_to_conversations;
GtkWidget *button_place_audio_call;
GSettings *settings;
lrc::api::conversation::Info* conversation_;
AccountInfoPointer const * accountInfo_;
bool isTemporary_;
QMetaObject::Connection new_interaction_connection;
QMetaObject::Connection update_interaction_connection;
......@@ -191,8 +184,10 @@ file_to_manipulate(GtkWindow* top_window, bool send)
return filename;
}
static void update_chatview_frame(ChatView *self);
static void
webkit_chat_container_script_dialog(G_GNUC_UNUSED GtkWidget* webview, gchar *interaction, ChatView* self)
webkit_chat_container_script_dialog(GtkWidget* webview, gchar *interaction, ChatView* self)
{
auto priv = CHAT_VIEW_GET_PRIVATE(self);
auto order = std::string(interaction);
......@@ -203,6 +198,20 @@ webkit_chat_container_script_dialog(G_GNUC_UNUSED GtkWidget* webview, gchar *int
(*priv->accountInfo_)->conversationModel->removeConversation(priv->conversation_->uid);
} else if (order == "BLOCK") {
(*priv->accountInfo_)->conversationModel->removeConversation(priv->conversation_->uid, true);
} else if (order == "UNBLOCK") {
try {
auto contactUri = priv->conversation_->participants.front();
auto& contact = (*priv->accountInfo_)->contactModel->getContact(contactUri);
(*priv->accountInfo_)->contactModel->addContact(contact);
} catch (std::out_of_range) {
g_debug("webkit_chat_container_script_dialog: oor while retrieving invalid contact info. Chatview bug ?");
}
} else if (order.find("PLACE_CALL") == 0) {
placecall_clicked(self);
} else if (order.find("PLACE_AUDIO_CALL") == 0) {
place_audio_call_clicked(self);
} else if (order.find("CLOSE_CHATVIEW") == 0) {
hide_chat_view(webview, self);
} else if (order.find("SEND:") == 0) {
// Get text body
auto toSend = order.substr(std::string("SEND:").size());
......@@ -258,6 +267,8 @@ webkit_chat_container_script_dialog(G_GNUC_UNUSED GtkWidget* webview, gchar *int
g_debug("Could not open file: %s", error->message);
g_error_free(error);
}
} else if (order.find("ADD_TO_CONVERSATIONS") == 0) {
button_add_to_conversations_clicked(self);
}
}
......@@ -268,11 +279,6 @@ chat_view_init(ChatView *view)
ChatViewPrivate *priv = CHAT_VIEW_GET_PRIVATE(view);
priv->settings = g_settings_new_full(get_ring_schema(), NULL, NULL);
g_signal_connect(priv->button_close_chatview, "clicked", G_CALLBACK(hide_chat_view), view);
g_signal_connect_swapped(priv->button_placecall, "clicked", G_CALLBACK(placecall_clicked), view);
g_signal_connect_swapped(priv->button_add_to_conversations, "clicked", G_CALLBACK(button_add_to_conversations_clicked), view);
g_signal_connect_swapped(priv->button_place_audio_call, "clicked", G_CALLBACK(place_audio_call_clicked), view);
}
static void
......@@ -284,13 +290,6 @@ chat_view_class_init(ChatViewClass *klass)
"/cx/ring/RingGnome/chatview.ui");
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, box_webkit_chat_container);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, hbox_chat_info);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, label_peer);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, label_cm);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, button_close_chatview);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, button_placecall);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, button_add_to_conversations);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), ChatView, button_place_audio_call);
chat_view_signals[NEW_MESSAGES_DISPLAYED] = g_signal_new (
"new-interactions-displayed",
......@@ -396,89 +395,6 @@ print_text_recording(ChatView *self)
QObject::disconnect(priv->new_interaction_connection);
}
static void
update_if_banned(ChatView *self)
{
ChatViewPrivate *priv = CHAT_VIEW_GET_PRIVATE(self);
if (!priv->conversation_) return;
auto participant = priv->conversation_->participants[0];
try {
auto contactInfo = (*priv->accountInfo_)->contactModel->getContact(participant);
if (contactInfo.isBanned) {
gtk_widget_set_sensitive (priv->button_placecall, FALSE);
gtk_widget_set_tooltip_text(priv->button_placecall, _("Can't place call with banned contact"));
gtk_widget_set_sensitive (priv->button_add_to_conversations, FALSE);
gtk_widget_set_tooltip_text(priv->button_add_to_conversations, _("Can't start conversation with banned contact"));
gtk_widget_set_sensitive (priv->button_place_audio_call, FALSE);
gtk_widget_set_tooltip_text(priv->button_place_audio_call, _("Can't place audio call with banned contact"));
webkit_chat_hide_message_bar(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container), true);
} else {
gtk_widget_set_sensitive (priv->button_placecall, TRUE);
gtk_widget_set_sensitive (priv->button_add_to_conversations, TRUE);
gtk_widget_set_sensitive (priv->button_place_audio_call, TRUE);
webkit_chat_hide_message_bar(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container), false);
}
} catch (const std::out_of_range&) {
// ContactModel::getContact() exception
}
}
static void
update_add_to_conversations(ChatView *self)
{
ChatViewPrivate *priv = CHAT_VIEW_GET_PRIVATE(self);
if (!priv->conversation_) return;
auto participant = priv->conversation_->participants[0];
try {
auto contactInfo = (*priv->accountInfo_)->contactModel->getContact(participant);
if(contactInfo.profileInfo.type != lrc::api::profile::Type::TEMPORARY
&& contactInfo.profileInfo.type != lrc::api::profile::Type::PENDING)
gtk_widget_hide(priv->button_add_to_conversations);
} catch (const std::out_of_range&) {
// ContactModel::getContact() exception
}
}
static void
update_contact_methods(ChatView *self)
{
g_return_if_fail(IS_CHAT_VIEW(self));
ChatViewPrivate *priv = CHAT_VIEW_GET_PRIVATE(self);
if (!priv->conversation_) return;
auto contactUri = priv->conversation_->participants.front();
try {
auto contactInfo = (*priv->accountInfo_)->contactModel->getContact(contactUri);
auto bestId = std::string(contactInfo.registeredName).empty() ? contactInfo.profileInfo.uri : contactInfo.registeredName;
if (contactInfo.profileInfo.alias == bestId) {
gtk_widget_hide(priv->label_cm);
} else {
gtk_label_set_text(GTK_LABEL(priv->label_cm), bestId.c_str());
gtk_widget_show(priv->label_cm);
}
} catch (const std::out_of_range&) {
// ContactModel::getContact() exception
}
}
static void
update_name(ChatView *self)
{
g_return_if_fail(IS_CHAT_VIEW(self));
ChatViewPrivate *priv = CHAT_VIEW_GET_PRIVATE(self);
if (!priv->conversation_) return;
auto contactUri = priv->conversation_->participants.front();
try {
auto contactInfo = (*priv->accountInfo_)->contactModel->getContact(contactUri);
auto alias = contactInfo.profileInfo.alias;
alias.erase(std::remove(alias.begin(), alias.end(), '\r'), alias.end());
gtk_label_set_text(GTK_LABEL(priv->label_peer), alias.c_str());
} catch (const std::out_of_range&) {
// ContactModel::getContact() exception
}
}
static void
webkit_chat_container_ready(ChatView* self)
{
......@@ -517,24 +433,55 @@ webkit_chat_container_ready(ChatView* self)
auto contactUri = priv->conversation_->participants.front();
try {
auto contactInfo = (*priv->accountInfo_)->contactModel->getContact(contactUri);
priv->isTemporary_ = contactInfo.profileInfo.type == lrc::api::profile::Type::TEMPORARY
|| contactInfo.profileInfo.type == lrc::api::profile::Type::PENDING;
webkit_chat_container_set_temporary(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container), priv->isTemporary_);
auto bestName = contactInfo.profileInfo.alias;
if (bestName.empty())
bestName = contactInfo.registeredName;
if (bestName.empty())
bestName = contactInfo.profileInfo.uri;
bestName.erase(std::remove(bestName.begin(), bestName.end(), '\r'), bestName.end());
webkit_chat_container_set_invitation(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container),
(contactInfo.profileInfo.type == lrc::api::profile::Type::PENDING),
bestName);
webkit_chat_disable_send_interaction(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container),
(contactInfo.profileInfo.type == lrc::api::profile::Type::SIP)
&& priv->conversation_->callId.empty());
} catch (const std::out_of_range&) {
// ContactModel::getContact() exception
}
update_chatview_frame(self);
}
static void
update_chatview_frame(ChatView* self)
{
g_return_if_fail(IS_CHAT_VIEW(self));
ChatViewPrivate *priv = CHAT_VIEW_GET_PRIVATE(self);
if (!priv->conversation_) return;
auto contactUri = priv->conversation_->participants.front();
lrc::api::contact::Info contactInfo;
try {
contactInfo = (*priv->accountInfo_)->contactModel->getContact(contactUri);
} catch (const std::out_of_range&) {
g_debug("update_chatview_frame: failed to retrieve contactInfo");
return;
}
// get alias and bestName
auto alias = contactInfo.profileInfo.alias;
auto bestName = contactInfo.registeredName;
if (bestName.empty())
bestName = contactInfo.profileInfo.uri;
bestName.erase(std::remove(bestName.begin(), bestName.end(), '\r'), bestName.end());
alias.erase(std::remove(alias.begin(), alias.end(), '\r'), alias.end());
// get temporary status
bool temp = contactInfo.profileInfo.type == lrc::api::profile::Type::TEMPORARY || contactInfo.profileInfo.type == lrc::api::profile::Type::PENDING;
webkit_chat_update_chatview_frame(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container), contactInfo.isBanned, temp, alias.c_str(), bestName.c_str());
webkit_chat_container_set_invitation(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container),
(contactInfo.profileInfo.type == lrc::api::profile::Type::PENDING),
bestName);
}
static void
......@@ -545,10 +492,7 @@ build_chat_view(ChatView* self)
gtk_container_add(GTK_CONTAINER(priv->box_webkit_chat_container), priv->webkit_chat_container);
gtk_widget_show(priv->webkit_chat_container);
update_name(self);
update_add_to_conversations(self);
update_contact_methods(self);
update_if_banned(self);
update_chatview_frame(self);
priv->webkit_ready = g_signal_connect_swapped(
priv->webkit_chat_container,
......@@ -564,8 +508,6 @@ build_chat_view(ChatView* self)
if (webkit_chat_container_is_ready(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container)))
webkit_chat_container_ready(self);
gtk_widget_set_visible(priv->hbox_chat_info, TRUE);
}
GtkWidget *
......@@ -590,34 +532,8 @@ chat_view_update_temporary(ChatView* self, bool showAddButton, bool showInvitati
g_return_if_fail(IS_CHAT_VIEW(self));
auto priv = CHAT_VIEW_GET_PRIVATE(self);
priv->isTemporary_ = showAddButton;
if (!priv->isTemporary_) {
gtk_widget_hide(priv->button_add_to_conversations);
}
webkit_chat_container_set_temporary(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container), priv->isTemporary_);
if (!priv->conversation_) return;
auto contactUri = priv->conversation_->participants.front();
try {
auto contactInfo = (*priv->accountInfo_)->contactModel->getContact(contactUri);
auto bestName = contactInfo.profileInfo.alias;
if (bestName.empty())
bestName = contactInfo.registeredName;
if (bestName.empty())
bestName = contactInfo.profileInfo.uri;
webkit_chat_container_set_invitation(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container),
showInvitation,
bestName);
} catch (const std::out_of_range&) {
// ContactModel::getContact() exception
}
}
bool
chat_view_get_temporary(ChatView *self)
{
g_return_val_if_fail(IS_CHAT_VIEW(self), false);
auto priv = CHAT_VIEW_GET_PRIVATE(self);
return priv->isTemporary_;
g_debug("chat_view_update_temporary(%s, %s)", showAddButton ? "true":"false", showInvitation ? "true":"false");
update_chatview_frame(self);
}
lrc::api::conversation::Info
......@@ -632,5 +548,5 @@ void
chat_view_set_header_visible(ChatView *self, gboolean visible)
{
auto priv = CHAT_VIEW_GET_PRIVATE(self);
gtk_widget_set_visible(priv->hbox_chat_info, visible);
webkit_chat_set_header_visible(WEBKIT_CHAT_CONTAINER(priv->webkit_chat_container), visible);
}
......@@ -3,6 +3,7 @@
* Author: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
* Author: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
* Author: Hugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -56,7 +57,6 @@ GtkWidget *chat_view_new (WebKitChatContainer* view,
AccountInfoPointer const & accountInfo,
lrc::api::conversation::Info* conversation);
lrc::api::conversation::Info chat_view_get_conversation(ChatView*);
bool chat_view_get_temporary(ChatView*);
void chat_view_update_temporary(ChatView*, bool, bool);
void chat_view_set_header_visible(ChatView*, gboolean);
......
......@@ -1031,6 +1031,11 @@ current_call_view_dispose(GObject *object)
auto* view = CURRENT_CALL_VIEW(object);
auto* priv = CURRENT_CALL_VIEW_GET_PRIVATE(view);
// navbar was hidden during setCallInfo, we need to make it visible again before view destruction
auto children = gtk_container_get_children(GTK_CONTAINER(priv->frame_chat));
auto chat_view = children->data;
chat_view_set_header_visible(CHAT_VIEW(chat_view), TRUE);
delete priv->cpp;
priv->cpp = nullptr;
......
......@@ -86,6 +86,11 @@ incoming_call_view_dispose(GObject *object)
view = INCOMING_CALL_VIEW(object);
priv = INCOMING_CALL_VIEW_GET_PRIVATE(view);
// navbar was hidden during init, we need to make it visible again before view destruction
auto children = gtk_container_get_children(GTK_CONTAINER(priv->frame_chat));
auto chat_view = children->data;
chat_view_set_header_visible(CHAT_VIEW(chat_view), TRUE);
QObject::disconnect(priv->state_change_connection);
g_clear_object(&priv->settings);
......
......@@ -1424,7 +1424,7 @@ CppImpl::slotNewConversation(const std::string& uid)
accountInfo_->conversationModel->setFilter("");
// Select new conversation if contact added
auto* old_view = gtk_bin_get_child(GTK_BIN(widgets->frame_call));
if (IS_RING_WELCOME_VIEW(old_view) || (IS_CHAT_VIEW(old_view) && chat_view_get_temporary(CHAT_VIEW(old_view)))) {
if (IS_RING_WELCOME_VIEW(old_view)) {
accountInfo_->conversationModel->selectConversation(uid);
try {
auto contactUri = chatViewConversation_->participants.front();
......
......@@ -2,6 +2,7 @@
* Copyright (C) 2016-2018 Savoir-faire Linux Inc.
* Author: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com>
* Author: Hugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -670,22 +671,6 @@ webkit_chat_container_print_history(WebKitChatContainer *view,
g_free(function_call);
}
void
webkit_chat_container_set_temporary(WebKitChatContainer *view, bool temporary)
{
WebKitChatContainerPrivate *priv = WEBKIT_CHAT_CONTAINER_GET_PRIVATE(view);
gchar* function_call = g_strdup_printf("setTemporary(%s)", temporary ? "true" : "false");
webkit_web_view_run_javascript(
WEBKIT_WEB_VIEW(priv->webview_chat),
function_call,
NULL,
NULL,
NULL
);
g_free(function_call);
}
void
webkit_chat_container_set_invitation(WebKitChatContainer *view, bool show,
const std::string& contactUri)
......@@ -693,12 +678,8 @@ webkit_chat_container_set_invitation(WebKitChatContainer *view, bool show,
auto priv = WEBKIT_CHAT_CONTAINER_GET_PRIVATE(view);
gchar* function_call = nullptr;
if (show) {
function_call = g_strdup_printf("showInvitation('%s')",
contactUri.c_str());
} else {
function_call = g_strdup_printf("hideInvitation()");
}
// TODO better escape names
function_call = g_strdup_printf(show ? "showInvitation(\"%s\")" : "showInvitation()", contactUri.c_str());
webkit_web_view_run_javascript(
WEBKIT_WEB_VIEW(priv->webview_chat),
......@@ -732,3 +713,38 @@ webkit_chat_container_is_ready(WebKitChatContainer *view)
WebKitChatContainerPrivate *priv = WEBKIT_CHAT_CONTAINER_GET_PRIVATE(view);
return priv->js_libs_loaded;
}
void
webkit_chat_set_header_visible(WebKitChatContainer *view, bool isVisible)
{
WebKitChatContainerPrivate *priv = WEBKIT_CHAT_CONTAINER_GET_PRIVATE(view);
gchar* function_call = g_strdup_printf("displayNavbar(%s)", isVisible ? "true" : "false");
webkit_web_view_run_javascript(
WEBKIT_WEB_VIEW(priv->webview_chat),
function_call,
NULL,
NULL,
NULL
);
g_free(function_call);
}
void
webkit_chat_update_chatview_frame(WebKitChatContainer *view, bool isBanned, bool isTemporary, const gchar* alias, const gchar* bestId)
{
WebKitChatContainerPrivate *priv = WEBKIT_CHAT_CONTAINER_GET_PRIVATE(view);
gchar* function_call = g_strdup_printf("update_chatview_frame(%s, %s, \"%s\", \"%s\")",
isBanned ? "true" : "false", isTemporary ? "true" : "false", alias, bestId);
webkit_web_view_run_javascript(
WEBKIT_WEB_VIEW(priv->webview_chat),
function_call,
NULL,
NULL,
NULL
);
g_free(function_call);
}
......@@ -54,7 +54,8 @@ gboolean webkit_chat_container_is_ready (WebKitChatContainer *view
void webkit_chat_container_set_display_links (WebKitChatContainer *view, bool display);
void webkit_chat_disable_send_interaction (WebKitChatContainer *view, bool isDisabled);
void webkit_chat_hide_message_bar (WebKitChatContainer *view, bool isHidden);
void webkit_chat_container_set_temporary (WebKitChatContainer *view, bool temporary);
void webkit_chat_container_set_invitation (WebKitChatContainer *view, bool show, const std::string& contactUri);
void webkit_chat_set_header_visible (WebKitChatContainer *view, bool isVisible);
void webkit_chat_update_chatview_frame (WebKitChatContainer *view, bool isBanned, bool isInvited, const gchar* alias, const gchar* bestId);
G_END_DECLS
......@@ -8,11 +8,21 @@
/* main properties */
--bg-color: #f2f2f2; /* same as macOS client */
/* navbar properties */
--navbar-height: 40px;
--navbar-padding-top: 8px;
--navbar-padding-bottom: var(--navbar-padding-top);
--navbar-size: calc(var(--navbar-height) + var(--navbar-padding-top) + var(--navbar-padding-bottom));
--messagebar-size: 57px; /* FIXME clean this up */
/* button properties */
--action-icon-color: var(--ring-dark-blue);
--deactivated-icon-color: #BEBEBE;
--action-icon-hover-color: var(--ring-light-blue);
--action-critical-icon-hover-color: rgba(211, 77, 59, 0.3); /* complementary color of ring light blue */
--action-critical-icon-press-color: rgba(211, 77, 59, 0.5);
--action-critical-icon-color: #4E1300;
--non-action-icon-color: #212121;
--action-icon-press-color: rgba(59, 193, 211, 0.5);
/* hairline properties */
......@@ -47,9 +57,155 @@ body {
margin: 0;
overflow: hidden;
background-color: var(--bg-color);
padding-top: var(--navbar-size);
padding-bottom: var(--messagebar-size);
}
/** Navbar */
.navbar-wrapper {
/* on top, over everything and full width */
position: fixed;
left:0; right:0;
z-index: 500;
top: 0;
}
#navbar {
background-color: var(--bg-color);
padding-right: 8px;
padding-left: 8px;
padding-top: var(--navbar-padding-top);
padding-bottom: var(--navbar-padding-bottom);
height: var(--navbar-height);
overflow: hidden;
align-items: center;
/* takes whole width */
left:0; right:0;
/* hairline */
border-bottom: var(--hairline-thickness) solid var(--hairline-color);
/* disable selection highlight because it looks very bad */
-webkit-user-select: none;
}
#navbar.hiddenState {
visibility: hidden;
}
.svgicon {
display: block;
margin: auto;
height: 100%;
}
.nav-button {
width: 40px;
height: 40px;
align-self: center;
display: flex;
cursor: pointer;
border-radius: 50%;
}
.nav-button.deactivated {
width: 40px;
height: 40px;
align-self: center;
display: flex;
border-radius: 50%;
cursor: auto;
}
.nav-right {
float: right;
}
.nav-left {
float: left;
}
#nav-contactid {
margin: 0px;
margin-left: 5px;
padding: 0px;
height: 100%;
font-family: emoji;
/* enable selection (it is globally disabled in the navbar) */
-webkit-user-select: auto;
}
#nav-contactid.oneEntry {
display: flex;
justify-content: center;
align-items: center;
}
#nav-contactid-alias {
font-size: 14px;
font-weight: bold;
margin: 5px 0px 3px;
}
#nav-contactid-bestId {
font-size: 11px;
}
.oneEntry #nav-contactid-bestId {
visibility: hidden;
}
.action-button svg {
fill: var(--action-icon-color);
}
.action-button.deactivated svg {
fill: var(--deactivated-icon-color);
}
.non-action-button svg {
fill: var(--non-action-icon-color);
}
.non-action-button:hover, .action-button:hover {
background: var(--action-icon-hover-color);
}
.non-action-button:active, .action-button:active {
background: var(--action-icon-press-color);
}
.action-button.deactivated:hover, .action-button.deactivated:active {
background: none;
}
.action-critical-button svg {
fill: var(--action-critical-icon-color);
}
.action-critical-button:hover {
background: var(--action-critical-icon-hover-color);
}
.action-critical-button:active {
background: var(--action-critical-icon-press-color);
}
#navbar #addBannedContactButton, #navbar #addToConversationsButton {
display: none;
}
#navbar.onBannedState #addToConvButton, #navbar.onBannedState #callButtons, #navbar.onBannedState #addToConversationsButton {
display: none;
}
#navbar.onBannedState #addBannedContactButton {
display: flex;
}
/** Invitation bar */
#invitation {
......@@ -77,7 +233,7 @@ body {
border: 0;
border-radius: 5px;
transition: all 0.3s ease;
color: #212121;
color: #f9f9f9;
padding: 10px 20px 10px 20px;
vertical-align: middle;