Commit Graph

15 Commits

Author SHA1 Message Date
Kailash Nadh 65d25fc3f9 Improve campaign content format conversion.
Previously, converting between formats simply copied over raw content.
This update does actual conversion between different formats. While
lossy, this seems to a good enough approximation for even reasonbly
rich HTML content. Closes #348.

- richtext, html => plain
  Strips HTML and converts content to plain text.

- richtext, html => markdown
  Uses turndown (JS) lib to convert HTML to Markdown.

- plain => richtext, html
  Converts line breaks in plain text to HTML breaks.

- richtext => html
  "Beautifies" the HTML generated by the WYSIWYG editor unlike the
  earlier behaviour of dumping one long line of HTML.

- markdown => richtext, html
  Makes an API call to the backend to use the Goldmark lib to convert
  Markdown to HTML.
2021-05-09 15:36:31 +05:30
Kailash Nadh 570a81f966 WIP: Add tests 2021-04-10 12:26:33 +05:30
dependabot[bot] 1ac0e65dd8
Bump elliptic from 6.5.3 to 6.5.4 in /frontend
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-11 00:27:23 +00:00
Kailash Nadh 68afd61024 Add support for alternate plaintext body for e-mails.
This commit removes the Go html2text lib that would automatically
convert all HTML messages to plaintext and add them as the alt
text body to outgoing e-mails. This lib also had memory leak
issues with certain kinds of HTML templates.

A new UI field for optionally adding an alt plaintext body to
a campaign is added. On enabling, it converts the HTML message in
the campaign editor into plaintext (using the textversionjs lib).

This introduces breaking changes in the campaigns table schema,
model, and template compilation.
2021-01-30 18:49:47 +05:30
Kailash Nadh 3498a727f5 WIP: Add i18n support 2021-01-17 20:59:01 +05:30
dependabot[bot] 3975ccc4b7
Bump axios from 0.19.2 to 0.21.1 in /frontend
Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-06 06:20:31 +00:00
Kailash Nadh f6511b68d8 Update JS dep (security): node-forge 2020-10-18 18:07:26 +05:30
Kailash Nadh 494c519359 Upgrade JS dependencies (security fixes) 2020-08-01 20:28:39 +05:30
Kailash Nadh dc4020679f Add syntax highlighted HTML code editor 2020-07-06 00:46:08 +05:30
Kailash Nadh feb5ba09be Add new dashboard (with new metrics) 2020-07-04 22:25:02 +05:30
Kailash Nadh 97583fe4b4 Rewrite frontend with Vue+Buevy and ditch React+Ant Design.
- antd+react was resulting in extremely clunky and unreadable
  spaghetti frontend code (primarily due to how antd is).
- Buefy is lighter by an order of magnitude, has excellent
  responsive views (especially tables) and usability.
- Vue's templating produces far more readable template code.
2020-07-04 00:12:14 +05:30
Kailash Nadh 2ee2e68230 Inject version during build into the frontend 2020-02-09 18:50:08 +05:30
Kailash Nadh d0a7c3baf7 Add Prettier conf 2019-08-26 23:42:47 +05:30
Vivek R 11ca4beddb chore: fix frontend directory structure 2019-05-27 17:17:26 +05:30
Kailash Nadh 3ab21383b1 Fresh start 2018-10-25 19:21:47 +05:30