Commit graph

731 commits

Author SHA1 Message Date
Kailash Nadh
d86438bde9 Introduce @TrackLink shorthand for generating tracking links.
The default `{{ TrackLink "https://listmonk.app" }}` template function
is clumsy to write and does breaks WYSIWYG editors and HTML syntax
highlighting because of the quotes. The new syntax doesn't break HTML
and is easier to write.

Eg: `<a href="https://listmonk.app@TrackLink">Link</a>`

- Introduce @TrackLink shorthand.
- Add first-class support for tracking links in the WYSIWYG (TinyMCE)
  editor by introducing an on/off checkbox on the link dialog.
- Improve default dummy campaign content to highlight this.
2021-09-26 16:03:05 +05:30
Kailash Nadh
d3f543cb15 Fix issues with Buefy responsive styles.
- Fix button and input sizing and alignments.
- Make settings tabs responsive.
- Fix toast and modal overlay issues.
- Fix Buefy table top-left/right controls.
- Fix 'New' buttons across pages.
- Fix search and bulk-select controls on subscribers page.
2021-09-26 13:12:12 +05:30
Kailash Nadh
e0bf1f1b77 Fix broken Cypress tests.
- DOM / UI / JS spaghetti state management is just ...
2021-09-25 18:05:15 +05:30
Kailash Nadh
492efe1ffa Bump Go compiler to v1.17 in GitHub actions. 2021-09-25 16:03:18 +05:30
Kailash Nadh
4dbac141f2 Add Romanian i18n language pack contributed by @gabrielpioaru.
- Also add TinyMCE Romaninan language pack.

Closes #482.
2021-09-25 15:53:24 +05:30
Kailash Nadh
7aee36eab1 Add support for blocklisting e-mail domains.
E-mails in the domain blocklist are disallowed on the admin UI, public
subscription forms, API, and in the bulk importer.

- Add blocklist setting that takes a list of multi-line domains on the
  Settings -> Privacy UI.
- Refactor e-mail validation in subimporter to add blocklist checking
  centrally.
- Add Cypress testr testing domain blocklist behaviour on admin
  and non-admin views.

Closes #336.
2021-09-25 15:39:09 +05:30
Kailash Nadh
9f3eb7e4a4 Fix Cypress tests to accommodate new admin UI URI. 2021-09-25 12:44:09 +05:30
Kailash Nadh
9f8e9c018b Fix subscriber form UI to have a default status value. 2021-09-25 10:45:04 +05:30
Kailash Nadh
e71115db26 Add option to toggle sending opt-in confirmation. Closes #363. 2021-09-25 10:38:13 +05:30
Kailash Nadh
51da1a16a0 Add check to skip admin notifications with no e-mails. Closes #300. 2021-09-24 19:28:32 +05:30
Kailash Nadh
c2a3f7d9d7
Merge pull request #472 from henk23/feature/replace-quill-with-tinymce
Replace Quill editor with TinyMCE
2021-09-23 20:08:07 +05:30
Kailash Nadh
68512d2dcd Add i18n support to TinyMCE.
- Load bundled TinyMCE i18n language file based on a
  listmonk -> TinyMCE map.
- Refactor editor initialisation to accommodate this change.
- Introduce `constants.js -> uris.static` to make the static URI
  available to TinyMCE for loading language files.
2021-09-23 20:04:48 +05:30
Kailash Nadh
0dc9e78710 Refactor HTML formatting and indentation in richtext -> HTML on UI. 2021-09-23 19:27:53 +05:30
Kailash Nadh
b6f68b8786 Tweak editor page and box styles. 2021-09-23 19:27:53 +05:30
Kailash Nadh
ffcb9879c8 Fix incorrect init and change events on TinyMCE.
- Moved the init event to init_instance_callback() from
@init event which doesn't fire.
- Add watcher for form.body to fire onEditorChange event. This
  fixes TinyMCE editor changes not getting saved.
2021-09-23 19:27:53 +05:30
Kailash Nadh
a0addc7edc Clean up syntax, toolbar, and editor styles. 2021-09-23 19:27:53 +05:30
Heiko Salmon
1e4f97425f Make media selection work and add more plugins and tools 2021-09-23 19:27:52 +05:30
Heiko Salmon
c140578c65 Put TinyMce init options into variable, add some TODOs 2021-09-23 19:27:52 +05:30
Heiko Salmon
4afe4a7cea Re-add changes from master, that got lost by accident 2021-09-23 19:27:52 +05:30
Heiko Salmon
71fc73fa33 Fix long line issue in dist build 2021-09-23 19:27:52 +05:30
Heiko Salmon
c09d2fcd5d Replace Quill editor with TinyMCE 2021-09-23 19:27:52 +05:30
Kailash Nadh
a97d81a8dc Merge branch 'refactor-frontend-path' 2021-09-23 19:26:45 +05:30
Kailash Nadh
6904b1f3d0 Remove redundant clause from the Makefile. 2021-09-23 19:26:38 +05:30
Kailash Nadh
bb340b8785 Refactor frontend build and name space all admin URIs behind /admin/.
- Namespace all admin UI URLs behind `/admin/*`.
  This breaks the current admin UI URLs.
- Make Vue output build assets to `frontend/dist/*` instead of
  `frontend/dist/frontend`.
- Namespace Vue static assets to `/admin/static/*`.

This commit reduces the cofusing and convoluted Vue+WebPack build URI
and static path schemes. In addition, it removes ambiguity in URLs
where non-UI URLs like `/public`, `/api`, `/webhooks` etc. were in the
same name space as UI URLs like `/campaigns`, `/lists` etc. Now all UI
URLs are behind `/admin/`, also simplifying security rules for proxies.
2021-09-23 19:21:35 +05:30
Kailash Nadh
855d440d5b
Merge pull request #477 from aiac/patch-1
CD to directory before install script
2021-09-22 10:34:25 +05:30
aiac
0ebf4949de
CD to directory before install script
Change directory to newly created before running install script
2021-09-21 20:33:37 +02:00
Kailash Nadh
13f16486fb
Merge pull request #476 from knadh/dependabot/npm_and_yarn/frontend/prismjs-1.25.0
Bump prismjs from 1.24.0 to 1.25.0 in /frontend
2021-09-21 22:11:08 +05:30
dependabot[bot]
7d4bac687e
Bump prismjs from 1.24.0 to 1.25.0 in /frontend
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.24.0...v1.25.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 21:58:49 +00:00
Kailash Nadh
956e990fe6 Improve codeflask HTML syntax highlighting colours. 2021-09-19 17:11:48 +05:30
Kailash Nadh
4b13f0c74f Add public URIs to yarn dev proxy. 2021-09-19 17:10:40 +05:30
Kailash Nadh
9f9425c408 Refresh i18n files. 2021-09-19 15:05:15 +05:30
Kailash Nadh
4b127f1eda Merge branch 'campaign-analytics' 2021-09-19 15:02:32 +05:30
Kailash Nadh
623030a0c5 Replace go get with go install stuffbin (Go 1.17 deprecation). 2021-09-19 15:02:29 +05:30
Kailash Nadh
6a316979f8 Fix inconsistent non-ii18n tag and label displays. 2021-09-19 14:51:42 +05:30
Kailash Nadh
2ed54b8609 Fix Buefy UI modal breaking body and sidebar scroll. 2021-09-19 14:26:37 +05:30
Kailash Nadh
71fd71d18c Refactor individual subscriber edit view.
- Add route /lists/:id URI to load subscriber edit modal.
- Make list name open the edit popup to be consistent with all other
  table views.
- Refactor get-lists query to make single list look up faster.
2021-09-19 13:27:14 +05:30
Kailash Nadh
070472c12d Add missing speedometer Fontello icon to the campaigns UI. 2021-09-19 13:03:13 +05:30
Kailash Nadh
d19728c533 Make container size uniform on multiple views on the UI. 2021-09-19 12:56:46 +05:30
Kailash Nadh
6f2aa1a318 Fix and refactor list selector UI component.
- Refactor font-size tag colours and dropdown padding.
- Fixed oninput list filter that wasn't working.
2021-09-19 12:49:22 +05:30
Kailash Nadh
1df827c58a Fix automatic field camel casing for subscriber attribs 2021-09-19 12:39:00 +05:30
Kailash Nadh
4e5e466b03 Add a ?minimal mode to GET /lists API.
Passing `?minimal=true` to the /lists API returns all lists without
additional metadata (subscriber count) which is orders of magnitude
faster than counting subscribers per list in large DBs.

The frontend intitialization always calls the GET /lists API on load
to keep it available in multiple contexts like the new campaign page.
However, this "boot up" call does not need additional metdata. This
initialization GET /lists call now calls /lists?minimal=true.
2021-09-18 20:15:24 +05:30
Kailash Nadh
f86a64787d Add Intl formatting to large numbers on the UI. 2021-09-18 19:24:25 +05:30
Kailash Nadh
56629ccb1c Fix lists pagination breaking on the UI. 2021-09-18 19:14:58 +05:30
Kailash Nadh
f1fbcd473e Fix automatic camel casing of subscriber attribs on the UI. 2021-09-18 17:26:09 +05:30
Kailash Nadh
8733b205a0 Refactor SQL schema and queries for performance improvements.
- Add indexes.
- Refactor dashboard charts and view/click count queries.
  (~10x speed bump on a setup of 7mn subscribers and 80mn views)
- Refactor get subscriber queries.
  (~10x speed bump on 7mn subscribers)
- Make subscriber UI issue an equality query for email seach strings.
2021-09-18 17:25:08 +05:30
Kailash Nadh
6eb589444a Fix 'Analytics' menu item not getting highlighted. 2021-09-17 22:20:56 +05:30
Kailash Nadh
1bb630cf83 Fix Buefy taginput padding 2021-09-17 22:19:18 +05:30
Kailash Nadh
54f1b55006 Merge branch 'analytics-migration' into campaign-analytics 2021-09-17 21:43:59 +05:30
Kailash Nadh
61e88681ed Add campaign analytics APIs and UI 2021-09-17 21:41:25 +05:30
Kailash Nadh
fd8f5a96c9 Add missing bounce_type to v2 migration. 2021-09-17 20:18:53 +05:30