summaryrefslogtreecommitdiffstats
path: root/web/react/utils
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/utils')
-rw-r--r--web/react/utils/client.jsx7
-rw-r--r--web/react/utils/constants.jsx4
-rw-r--r--web/react/utils/emoticons.jsx1
-rw-r--r--web/react/utils/markdown.jsx8
-rw-r--r--web/react/utils/utils.jsx3
5 files changed, 13 insertions, 10 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index 09e962161..5d02a8c88 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -590,7 +590,12 @@ export function updateChannel(channel, success, error) {
track('api', 'api_channels_update');
}
-export function updateChannelHeader(data, success, error) {
+export function updateChannelHeader(channelId, header, success, error) {
+ const data = {
+ channel_id: channelId,
+ channel_header: header
+ };
+
$.ajax({
url: '/api/v1/channels/update_header',
dataType: 'json',
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 27cf2b175..d23c18b5d 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -123,6 +123,7 @@ export default {
POST_DELETED: 'deleted',
POST_TYPE_JOIN_LEAVE: 'system_join_leave',
SYSTEM_MESSAGE_PREFIX: 'system_',
+ SYSTEM_MESSAGE_PROFILE_NAME: 'System',
SYSTEM_MESSAGE_PROFILE_IMAGE: '/static/images/logo_compact.png',
RESERVED_TEAM_NAMES: [
'www',
@@ -150,7 +151,7 @@ export default {
],
MONTHS: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
MAX_DMS: 20,
- MAX_CHANNEL_POPOVER_COUNT: 20,
+ MAX_CHANNEL_POPOVER_COUNT: 100,
DM_CHANNEL: 'D',
OPEN_CHANNEL: 'O',
PRIVATE_CHANNEL: 'P',
@@ -362,7 +363,6 @@ export default {
'Droid Serif': 'font--droid_serif',
'Roboto Slab': 'font--roboto_slab',
Lora: 'font--lora',
- Slabo: 'font--slabo',
Arvo: 'font--arvo',
'Open Sans': 'font--open_sans',
Roboto: 'font--roboto',
diff --git a/web/react/utils/emoticons.jsx b/web/react/utils/emoticons.jsx
index ab04936c0..fa5177232 100644
--- a/web/react/utils/emoticons.jsx
+++ b/web/react/utils/emoticons.jsx
@@ -13,7 +13,6 @@ const emoticonPatterns = {
rage: /(^|\s)(:-?[\[@])(?=$|\s)/g, // :@
frowning: /(^|\s)(:-?\()(?=$|\s)/g, // :(
sob: /(^|\s)(:['’]-?\(|:'\(|:'\()(?=$|\s)/g, // :`(
- kissing_heart: /(^|\s)(:-?\*)(?=$|\s)/g, // :*
pensive: /(^|\s)(:-?\/)(?=$|\s)/g, // :/
confounded: /(^|\s)(:-?s)(?=$|\s)/gi, // :s
flushed: /(^|\s)(:-?\|)(?=$|\s)/g, // :|
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index d600ef069..826b87d08 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -69,13 +69,11 @@ class MattermostInlineLexer extends marked.InlineLexer {
this.rules = Object.assign({}, this.rules);
- // modified version of the regex that doesn't break up words in snake_case,
- // allows for links starting with www, and allows links succounded by parentheses
+ // modified version of the regex that allows for links starting with www and those surrounded by parentheses
// the original is /^[\s\S]+?(?=[\\<!\[_*`~]|https?:\/\/| {2,}\n|$)/
- this.rules.text = /^[\s\S]+?(?:[^\w\/](?=_)|(?=_\W|[\\<!\[*`~]|https?:\/\/|www\.|\(| {2,}\n|$))/;
+ this.rules.text = /^[\s\S]+?(?=[\\<!\[_*`~]|https?:\/\/|www\.|\(| {2,}\n|$)/;
- // modified version of the regex that allows links starting with www and those surrounded
- // by parentheses
+ // modified version of the regex that allows links starting with www and those surrounded by parentheses
// the original is /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/
this.rules.url = /^(\(?(?:https?:\/\/|www\.)[^\s<.][^\s<]*[^<.,:;"'\]\s])/;
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 304713528..fb8b89252 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -300,7 +300,7 @@ export function extractLinks(text) {
Autolinker.link(text, {
replaceFn,
- urls: true,
+ urls: {schemeMatches: true, wwwMatches: true, tldMatches: false},
emails: false,
twitter: false,
phone: false,
@@ -576,6 +576,7 @@ export function applyTheme(theme) {
if (theme.sidebarHeaderTextColor) {
changeCss('.sidebar--left .team__header .header__info, .sidebar--menu .team__header .header__info', 'color:' + theme.sidebarHeaderTextColor, 1);
+ changeCss('.sidebar--left .team__header .navbar-right .dropdown__icon, .sidebar--menu .team__header .navbar-right .dropdown__icon', 'fill:' + theme.sidebarHeaderTextColor, 1);
changeCss('.sidebar--left .team__header .user__name, .sidebar--menu .team__header .user__name', 'color:' + changeOpacity(theme.sidebarHeaderTextColor, 0.8), 1);
changeCss('.sidebar--left .team__header:hover .user__name, .sidebar--menu .team__header:hover .user__name', 'color:' + theme.sidebarHeaderTextColor, 1);
changeCss('.modal .modal-header .modal-title, .modal .modal-header .modal-title .name, .modal .modal-header button.close', 'color:' + theme.sidebarHeaderTextColor, 1);