use custom email template for csv imports (#4011)

This commit is contained in:
ruslandoga 2024-04-16 16:10:59 +08:00 committed by GitHub
parent cf61e47a0a
commit d2fc89e734
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View File

@ -12,9 +12,8 @@ defmodule Plausible.Imported.CSVImporter do
@impl true
def label(), do: "CSV"
# NOTE: change it once CSV import is implemented
@impl true
def email_template(), do: "google_analytics_import.html"
def email_template(), do: "csv_import.html"
@impl true
def parse_args(%{"uploads" => uploads, "storage" => storage}) do

View File

@ -0,0 +1,14 @@
<%= if @success do %>
Your CSV import has completed successfully. The Plausible dashboard for <%= @site_import.site.domain %> now contains historical imported data from <%= date_format(
@site_import.start_date
) %> to <%= date_format(@site_import.end_date) %>
<br /><br />
<%= link("Click here", to: @link) %> to view your dashboard.
<% else %>
Unfortunately, your CSV import for <%= @site_import.site.domain %> did not complete successfully. Sorry about that!
<br /><br /> Please try to do the import once again.
<%= if full_build?() do %>
<br /> <br />
Please reply to this email to let us know if you're still experiencing issues with the import.
<% end %>
<% end %>