switch to only use emoji one smileys; remove setting to switch

Этот коммит содержится в:
Florian Orben
2015-12-01 22:40:24 +01:00
родитель c111777f85
Коммит 8a39d160f6
4199 изменённых файлов: 13 добавлений и 1025 удалений

Просмотреть файл

@@ -1,8 +1,6 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import * as Utils from './utils.jsx';
const emoticonPatterns = {
smile: /(^|\s)(:-?\))(?=$|\s)/g, // :)
wink: /(^|\s)(;-?\))(?=$|\s)/g, // ;)
@@ -135,7 +133,7 @@ export function handleEmoticons(text, tokens) {
const alias = `MM_EMOTICON${index}`;
tokens.set(alias, {
value: `<img align="absmiddle" alt="${matchText}" class="emoji" src="${Utils.getImagePathForEmoticon(name)}" title="${matchText}" />`,
value: `<img align="absmiddle" alt="${matchText}" class="emoji" src="${getImagePathForEmoticon(name)}" title="${matchText}" />`,
originalText: fullMatch
});
@@ -156,3 +154,9 @@ export function handleEmoticons(text, tokens) {
return output;
}
export function getImagePathForEmoticon(name) {
if (name) {
return `/static/images/emoji/${name}.png`;
}
return `/static/images/emoji`;
}