From f469fd29d8752237c557d0384fde8248052d0f5b Mon Sep 17 00:00:00 2001 From: Drew Regitsky Date: Wed, 13 Jan 2016 12:08:41 -0800 Subject: [PATCH] fix(templates): rewritten "welcome" file / example template --- .../assets/Welcome to Quick Replies.html | 24 +++++++++++++++++++ .../assets/Welcome to Templates.html | 20 ---------------- .../lib/preferences-templates.cjsx | 2 +- .../composer-templates/lib/template-store.es6 | 2 +- 4 files changed, 26 insertions(+), 22 deletions(-) create mode 100644 internal_packages/composer-templates/assets/Welcome to Quick Replies.html delete mode 100644 internal_packages/composer-templates/assets/Welcome to Templates.html diff --git a/internal_packages/composer-templates/assets/Welcome to Quick Replies.html b/internal_packages/composer-templates/assets/Welcome to Quick Replies.html new file mode 100644 index 000000000..c8700b156 --- /dev/null +++ b/internal_packages/composer-templates/assets/Welcome to Quick Replies.html @@ -0,0 +1,24 @@ +

+ Hi there {{First Name}}, +

+

+ Welcome to the Quick Replies plugin! Here you can create email templates with + {{variable regions}} that you can quickly fill in + before you send your email. +

+
+

+ Just wrap text in {{double brackets}} to create a variable! You + can add {{variables}} inside areas of formatted + text too. +

+
+

+ When you send your message, the highlighting is always removed so the recipient + never sees it. +

+ Enjoy! +

+

+ - Nylas Team +

diff --git a/internal_packages/composer-templates/assets/Welcome to Templates.html b/internal_packages/composer-templates/assets/Welcome to Templates.html deleted file mode 100644 index 3cb97efab..000000000 --- a/internal_packages/composer-templates/assets/Welcome to Templates.html +++ /dev/null @@ -1,20 +0,0 @@ -

- Hi there First Name, -

-

- Welcome to the templates package! Templates live in the ~/.nylas/templates - directory on your computer. Each template is an HTML file - the name of the - file is the name of the template, and it's contents are the default message body. -

-

- If you include HTML <code> tags in your template, you can create - regions that you can jump between and fill easily. Check out the source of - the template for a super awesome example! -

-

- Give <code> tags the `var` class to mark them as template regions. Add - the `empty` class to make them dark yellow. When you send your message, <code> - tags are always stripped so the recipient never sees any highlighting. -

- - Nylas Team -

diff --git a/internal_packages/composer-templates/lib/preferences-templates.cjsx b/internal_packages/composer-templates/lib/preferences-templates.cjsx index 08b4c506a..236486646 100644 --- a/internal_packages/composer-templates/lib/preferences-templates.cjsx +++ b/internal_packages/composer-templates/lib/preferences-templates.cjsx @@ -247,7 +247,7 @@ class PreferencesTemplates extends React.Component

The Quick Replies plugin allows you to create templated email replies, with variables that - you can quickly fill out inside your email message. To create a variable, type a set of double curly + you can quickly fill in before sending your email message. To create a variable, type a set of double curly brackets wrapping the variable's name, like this: {"{{"}variable_name{"}}"}

diff --git a/internal_packages/composer-templates/lib/template-store.es6 b/internal_packages/composer-templates/lib/template-store.es6 index 33c12a57e..45077cc4f 100644 --- a/internal_packages/composer-templates/lib/template-store.es6 +++ b/internal_packages/composer-templates/lib/template-store.es6 @@ -32,7 +32,7 @@ class TemplateStore extends NylasStore { this._registerListeners(); this._templatesDir = templatesDir; - this._welcomeName = 'Welcome to Templates.html'; + this._welcomeName = 'Welcome to Quick Replies.html'; this._welcomePath = path.join(__dirname, '..', 'assets', this._welcomeName); this._watcher = null;