summaryrefslogtreecommitdiffstats
path: root/webapp/components/help/components/messaging.jsx
blob: dd1c90f8bc4c6f99e4036378eaff94d7c88e3bd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import {localizeMessage} from 'utils/utils.jsx';
import {formatText} from 'utils/text_formatting.jsx';
import {FormattedMessage} from 'react-intl';
import {Link} from 'react-router/es6';

import React from 'react';

export default class HelpMessaging extends React.Component {
    render() {
        const message = [];
        message.push(localizeMessage('help.messaging.title', '# Messaging Basics\n_____'));
        message.push(localizeMessage('help.messaging.write', '**Write messages** using the text input box at the bottom of Mattermost. Press ENTER to send a message. Use SHIFT+ENTER to create a new line without sending a message.'));
        message.push(localizeMessage('help.messaging.reply', '**Reply to messages** by clicking the reply arrow next to the message text.'));
        message.push('![reply arrow](https://docs.mattermost.com/_images/replyIcon.PNG)');
        message.push(localizeMessage('help.messaging.notify', '**Notify teammates** when they are needed by typing `@username`.'));
        message.push(localizeMessage('help.messaging.format', '**Format your messages** using Markdown that supports text styling, headings, links, emoticons, code blocks, block quotes, tables, lists and in-line images.'));
        message.push('![markdown](https://docs.mattermost.com/_images/messagesTable1.PNG)');
        message.push(localizeMessage('help.messaging.emoji', '**Quickly add emoji** by typing ":", which will open an emoji autocomplete. If the existing emoji don\'t cover what you want to express, you can also create your own [Custom Emoji](http://docs.mattermost.com/help/settings/custom-emoji.html).'));
        message.push(localizeMessage('help.messaging.attach', '**Attach files** by dragging and dropping into Mattermost or clicking the attachment icon in the text input box.'));

        return (
            <div>
                <span
                    dangerouslySetInnerHTML={{__html: formatText(message.join('\n\n'))}}
                />
                <p className='links'>
                    <FormattedMessage
                        id='help.learnMore'
                        defaultMessage='Learn more about:'
                    />
                </p>
                <ul>
                    <li>
                        <Link to='/help/composing'>
                            <FormattedMessage
                                id='help.link.composing'
                                defaultMessage='Composing Messages and Replies'
                            />
                        </Link>
                    </li>
                    <li>
                        <Link to='/help/mentioning'>
                            <FormattedMessage
                                id='help.link.mentioning'
                                defaultMessage='Mentioning Teammates'
                            />
                        </Link>
                    </li>
                    <li>
                        <Link to='/help/formatting'>
                            <FormattedMessage
                                id='help.link.formatting'
                                defaultMessage='Formatting Messages using Markdown'
                            />
                        </Link>
                    </li>
                    <li>
                        <Link to='/help/attaching'>
                            <FormattedMessage
                                id='help.link.attaching'
                                defaultMessage='Attaching Files'
                            />
                        </Link>
                    </li>
                    <li>
                        <Link to='/help/commands'>
                            <FormattedMessage
                                id='help.link.commands'
                                defaultMessage='Executing Commands'
                            />
                        </Link>
                    </li>
                </ul>
            </div>
        );
    }
}