diff --git a/ChangeLog.md b/ChangeLog.md
index 211cb525..4c6acf1d 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,4 +1,8 @@
# Changelog:
+* **21.12.19**
+ - Improved background performance when the microphone has been muted
+ - Added support for `[ul]` and `[ol]` tags within the chat
+
* **20.12.19**
- Fixing chat URL escaping
- Fixed issue [#77](https://github.com/TeaSpeak/TeaWeb/issues/77)
diff --git a/shared/css/static/frame-chat.scss b/shared/css/static/frame-chat.scss
index 2eba0f28..e79682af 100644
--- a/shared/css/static/frame-chat.scss
+++ b/shared/css/static/frame-chat.scss
@@ -1334,5 +1334,26 @@ $client_info_avatar_size: 10em;
vertical-align: text-bottom;
}
}
+
+ .container-format-helper {
+ flex-shrink: 0;
+ flex-grow: 0;
+
+ min-height: unset;
+ height: initial;
+
+ color: #555555;
+ font-size: .8em;
+ text-align: right;
+ margin: -3px 2px 2px 2.5em;
+
+ @include text-dotdotdot();
+ @include transition($button_hover_animation_time ease-in-out);
+
+ max-height: 2em; /* for a smooth transition */
+ &.hidden {
+ max-height: 0;
+ }
+ }
}
}
diff --git a/shared/html/templates.html b/shared/html/templates.html
index 5a11cf21..dcbd1b3e 100644
--- a/shared/html/templates.html
+++ b/shared/html/templates.html
@@ -288,6 +288,7 @@
{{tr "Chat-icon size:" /}}
100%
diff --git a/shared/js/settings.ts b/shared/js/settings.ts
index f0cabdb9..b8405d24 100644
--- a/shared/js/settings.ts
+++ b/shared/js/settings.ts
@@ -264,7 +264,7 @@ class Settings extends StaticSettings {
static readonly KEY_CHAT_ENABLE_BBCODE: SettingsKey = {
key: 'chat_enable_bbcode',
- default_value: true,
+ default_value: false,
description: 'Enabled bbcode support in chat.'
};
diff --git a/shared/js/ui/frames/chat.ts b/shared/js/ui/frames/chat.ts
index 492524fb..ded611f2 100644
--- a/shared/js/ui/frames/chat.ts
+++ b/shared/js/ui/frames/chat.ts
@@ -97,11 +97,14 @@ namespace MessageHelper {
"b", "big",
"i", "italic",
"u", "underlined",
+ "s", "strikethrough",
"color",
"url",
"code",
"icode",
"i-code",
+ "sub", "sup",
+ "h1", "h2", "h3",
"ul", "ol", "list",
"li",
diff --git a/shared/js/ui/frames/chat_frame.ts b/shared/js/ui/frames/chat_frame.ts
index d6b0f19c..ed22b37b 100644
--- a/shared/js/ui/frames/chat_frame.ts
+++ b/shared/js/ui/frames/chat_frame.ts
@@ -1768,6 +1768,7 @@ test
this._container_conversation_list = this._html_tag.find(".conversation-list");
this._html_no_chats = this._container_conversation_list.find(".no-chats");
this._container_typing = this._html_tag.find(".container-typing");
+ this.update_input_format_helper();
}
try_input_focus() {
@@ -1778,6 +1779,15 @@ test
if(this._current_conversation)
this._current_conversation.fix_scroll(false);
}
+
+ update_input_format_helper() {
+ const tag = this._html_tag.find(".container-format-helper");
+ if(settings.static_global(Settings.KEY_CHAT_ENABLE_MARKDOWN)) {
+ tag.removeClass("hidden").text(tr("*italic*, **bold**, ~~strikethrough~~, `code`, and more..."));
+ } else {
+ tag.addClass("hidden");
+ }
+ }
}
export namespace channel {
@@ -2325,6 +2335,7 @@ test
if(this._current_conversation)
this._current_conversation.mark_read();
});
+ this.update_input_format_helper();
}
set_current_channel(channel_id: number, update_info_frame?: boolean) {
@@ -2378,6 +2389,15 @@ test
if(this._current_conversation)
this._current_conversation.fix_scroll(false);
}
+
+ update_input_format_helper() {
+ const tag = this._html_tag.find(".container-format-helper");
+ if(settings.static_global(Settings.KEY_CHAT_ENABLE_MARKDOWN)) {
+ tag.removeClass("hidden").text(tr("*italic*, **bold**, ~~strikethrough~~, `code`, and more..."));
+ } else {
+ tag.addClass("hidden");
+ }
+ }
}
}
diff --git a/shared/js/ui/modal/ModalSettings.ts b/shared/js/ui/modal/ModalSettings.ts
index 2e51b1e5..06251eac 100644
--- a/shared/js/ui/modal/ModalSettings.ts
+++ b/shared/js/ui/modal/ModalSettings.ts
@@ -344,12 +344,24 @@ namespace Modals {
}).prop("checked", settings.static_global(Settings.KEY_CHAT_COLORED_EMOJIES));
}
+ const update_format_helper = () => server_connections.server_connection_handlers().map(e => e.side_bar).forEach(e => {
+ e.private_conversations().update_input_format_helper();
+ e.channel_conversations().update_input_format_helper();
+ });
{
const option = container.find(".option-support-markdown") as JQuery;
option.on('change', event => {
settings.changeGlobal(Settings.KEY_CHAT_ENABLE_MARKDOWN, option[0].checked);
+ update_format_helper();
}).prop("checked", settings.static_global(Settings.KEY_CHAT_ENABLE_MARKDOWN));
}
+ {
+ const option = container.find(".option-support-bbcode") as JQuery;
+ option.on('change', event => {
+ settings.changeGlobal(Settings.KEY_CHAT_ENABLE_BBCODE, option[0].checked);
+ update_format_helper();
+ }).prop("checked", settings.static_global(Settings.KEY_CHAT_ENABLE_BBCODE));
+ }
{
const option = container.find(".option-url-tagging") as JQuery;
option.on('change', event => {
diff --git a/vendor/xbbcode b/vendor/xbbcode
index b65dc080..daf528bd 160000
--- a/vendor/xbbcode
+++ b/vendor/xbbcode
@@ -1 +1 @@
-Subproject commit b65dc080a8e2410563f9ce7e50a6c7e99f6eee09
+Subproject commit daf528bd7b4a51a8b83f1b9c50ce63bab672ac35