Commit graph

357 commits

Author SHA1 Message Date
Kailash Nadh
f3e80da339 Clean up root and move app to cmd directory 2020-08-08 13:54:25 +05:30
Kailash Nadh
b822955ac9 Add BasicAuth to admin endpoints.
This removes the Nginx dependency for protecting admin pages.
BasicAuth is configured in config.toml. This is a "temporary"
setup until a full fledged auth mechanism is added.
2020-08-08 13:11:49 +05:30
Kailash Nadh
7ed07550ff Fix minor inconsistencies in settings.
- Add missing `app.root_url` key in migration.
- Register `/settings` handler in the backend.
- Add dummy dots in secret fields on the UI for visibility.
2020-08-07 19:28:23 +05:30
Kailash Nadh
16e47dddc1 Load env config before DB initialisation 2020-08-07 18:08:24 +05:30
Kailash Nadh
8979a2ad0b Fix Quill setup to use inline CSS styles instead of classes 2020-08-07 13:43:18 +05:30
Kailash Nadh
b54c5d8c5e Add upgrade file 2020-08-03 19:07:14 +05:30
Kailash Nadh
5fb7c6cfb0 Add support for automatic, idempotent DB migrations
- On boot, the app now checks if the DB version matches its
  expected version and refuses to start if there are pending
  migrations to be run.
- The new `--upgrade` flag runs data migrations from the last
  recorded migration (in the settings table) to the latest one
  in the binary.
- Migrations are DB/arbitrary logic functions in .go files in
  internal/migrations.
- All migration functions are idempotent.
2020-08-03 19:02:23 +05:30
Kailash Nadh
494c519359 Upgrade JS dependencies (security fixes) 2020-08-01 20:28:39 +05:30
Kailash Nadh
4703d78b39 Add a fullscreen option to the campaign richtext editor 2020-08-01 20:19:03 +05:30
Kailash Nadh
378e8145fe Add campaign search UI. 2020-08-01 19:46:47 +05:30
Kailash Nadh
ccf1c499ad Refactor pagination constants 2020-08-01 18:57:33 +05:30
Kailash Nadh
0db95799fb Suffix app name in page titles 2020-08-01 18:47:05 +05:30
Kailash Nadh
5ff5c74321 Add custom email headers to SMTP settings UI 2020-08-01 18:33:15 +05:30
Kailash Nadh
ec097909db Add support for List-Unsubscribe header.
- Added as a setting in the settings UI.
- Refactor Messenger.Push() method to accept messenger.Message{}
  instead of a growing number of positional arguments.
2020-08-01 17:54:51 +05:30
Kailash Nadh
7ead052054 Fixed reset not clearing query on subscriber search UI 2020-08-01 16:59:34 +05:30
Kailash Nadh
e4f233e2e5 Add missing root_url to settings UI 2020-08-01 16:53:29 +05:30
Kailash Nadh
8c0804ba9f Refactor blacklist to blocklist 2020-08-01 16:45:29 +05:30
Kailash Nadh
2143def136 Fix loss of caret on image insertion in campaign from popup 2020-08-01 16:09:55 +05:30
Kailash Nadh
13a252a7b3 Add missing 'opt-in' campaign feature to the new UI 2020-08-01 15:31:13 +05:30
Kailash Nadh
818da1bb4d Add 'clone template' feature to the templates UI 2020-08-01 13:28:12 +05:30
Kailash Nadh
2587d67765 Fix template creation API returning incorrect response 2020-08-01 13:21:28 +05:30
Kailash Nadh
d9197668c6 Add 'cancel' icon to campaigns UI 2020-08-01 13:15:40 +05:30
Kailash Nadh
9c8b7ad7f8 Fix broken tag clearing on lists and campaign updation 2020-08-01 13:09:52 +05:30
Kailash Nadh
0145aba30f Add missing tag UI to lists 2020-08-01 12:58:46 +05:30
Kailash Nadh
f9e4a50795 Fix incorrect handling of non-JSON responses in APIs 2020-07-26 22:15:57 +05:30
Kailash Nadh
76f4fd68f8 Show countdown on scheduled campaigns UI 2020-07-26 20:54:05 +05:30
Kailash Nadh
e2e65b1bc0 Polish UI elements and fix styling issues.
- Change global font to Inter.
- Introduce global top nav bar.
- Restyle form inputs to have inline labels.
- Restyle form inputs to have inline lengt counters.
- Override glitchy Buefy animations (sidebar, toast etc.)
- Fix tag alignment inside tables in responsive view.
- Refactor import page UI.
- Miscellaneous styling fixes.
- Add missing Fontello icons.
2020-07-26 20:35:06 +05:30
Kailash Nadh
942eb7c3d8 Add settings UI and "hot reload" support to the app.
This is a major breaking change that moves away from having the
entire app configuration in external TOML files to settings being
in the database with a UI to update them dynamically.

The app loads all config into memory (app settings, SMTP conf)
on boot. "Hot" replacing them is complex and it's a fair tradeoff
to instead just restart the application as it is practically
instant.

A new `settings` table stores arbitrary string keys with a JSONB
value field which happens to support arbitrary types. After every
settings update, the app gracefully releases all resources
(HTTP server, DB pool, SMTP pool etc.) and restarts itself,
occupying the same PID. If there are any running campaigns, the
auto-restart doesn't happen and the user is prompted to invoke
it manually with a one-click button once all running campaigns
have been paused.
2020-07-21 00:23:57 +05:30
Kailash Nadh
d294c95c9b Merge branch 'refactor-api-resp' 2020-07-09 23:32:16 +05:30
Kailash Nadh
3df889cdc1 Refactor global API response handling in axios.
Instead of using a response transformer, move the global response
JSON transformation (snake case to camel case) to the pre-existing
response interceptor. Also, fix the `data.data` and `data`
discrepancy in responses.
2020-07-09 23:29:59 +05:30
Kailash Nadh
39aa56454e Fix missing API response data{} envelope 2020-07-09 23:29:55 +05:30
Kailash Nadh
80ef60d4a7
Merge pull request #155 from RaghavSood/hotfix/add-to-lists-by-query
frontend: pass query when changing lists for subscribers
2020-07-09 14:45:14 +05:30
raghavsood
7b62a7f83d
frontend: pass query when changing lists for subscribers 2020-07-09 16:17:42 +08:00
Kailash Nadh
586defe470
Merge pull request #153 from mr-karan/docker_docs
feat: Add separate config for demo setup, tweak docs
2020-07-09 12:55:42 +05:30
Kailash Nadh
eae88c1add Add Ctrl+Enter search on the subscriber query exp box 2020-07-09 12:49:42 +05:30
Kailash Nadh
ab8dbd8314 Fix advanced subscriber query exp not propagating to search 2020-07-09 12:17:21 +05:30
Karan Sharma
06bb719a7b feat: Add separate config for demo setup, tweak docs
This PR adds `config-demo.toml` to `Dockerfile` which uses the db host
`demo-db`. This is more suited for demo setups. For normal docker installations
the db host is changed back to `db` which is a better sane default.
Reworded `INSTALL.md` and `README.md` for more clarity on docker
installation and configuration.
2020-07-08 22:38:31 +05:30
Kailash Nadh
525a5100f5
Merge pull request #147 from RaghavSood/hotfix/vue-filenameHash
frontend: Enable vue filenameHashing
2020-07-07 18:57:24 +05:30
raghavsood
ceac96b662
frontend: Enable vue filenameHash
This enables clean updates when listmonk is behind a caching proxy such as cloudflare
2020-07-06 23:54:08 +08:00
Kailash Nadh
c2613d1030 Fix ticker leak in campaign manager message push 2020-07-06 20:29:19 +05:30
Kailash Nadh
fd044f4cb6 Minor refactor to campaign manager.
- Remove external invocation of worker goroutines into Run()
- Split Run() into smaller functions.
2020-07-06 20:22:57 +05:30
Kailash Nadh
3e755596c7 Fix incorrect WYSIWYG image insertion position 2020-07-06 19:46:18 +05:30
Kailash Nadh
1b346b1c2b Fix 'cancelled' tag colour 2020-07-06 19:37:46 +05:30
Kailash Nadh
b45d49f5e0 Fix HTML editor's line bar colour 2020-07-06 00:50:43 +05:30
Kailash Nadh
dc4020679f Add syntax highlighted HTML code editor 2020-07-06 00:46:08 +05:30
Kailash Nadh
2651820e29 Fix campaign message rate display 2020-07-05 21:55:52 +05:30
Kailash Nadh
61f8fae50d Add 'overwrite?' option to bulk import.
- Fix minor UI inconsitency on import states.
- Minor refactor to importer initialisation.
2020-07-05 21:35:17 +05:30
Kailash Nadh
79dd916d09 Make DB pull batch size in campaign manager configurable 2020-07-05 19:48:39 +05:30
Kailash Nadh
b45a2a0f89 Fix incorrect record count in the importer 2020-07-05 19:39:42 +05:30
Kailash Nadh
e7da8fa668 Fix ordering of records on the subscribers page 2020-07-05 19:23:45 +05:30