From c0f316d049481953ed270397f8e4ed317f0815a0 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Mon, 3 May 2021 18:35:27 +0100 Subject: [PATCH] add preview to Announcements --- api.go | 5 ++++- html/admin.html | 28 ++++++++++++++---------- package-lock.json | 13 +++++------ package.json | 1 + ts/modules/accounts.ts | 49 +++++++++++++++++++++++++++++++++++++----- ts/modules/invites.ts | 8 +++---- ts/modules/settings.ts | 6 +++--- views.go | 6 ++++-- 8 files changed, 84 insertions(+), 32 deletions(-) diff --git a/api.go b/api.go index 2a0b9eb..4656522 100644 --- a/api.go +++ b/api.go @@ -1712,6 +1712,9 @@ func (app *appContext) GetCustomEmailTemplate(gc *gin.Context) { } writeVars = func(variables []string) { app.storage.customEmails.UserExpired.Variables = variables } values = app.email.userExpiredValues(app, false) + // Just send the email html + case "Announcement": + content = "" default: respondBool(400, false, gc) return @@ -1747,7 +1750,7 @@ func (app *appContext) GetCustomEmailTemplate(gc *gin.Context) { respondBool(500, false, gc) return } - email, err := app.email.constructTemplate("", "
", app) + email, err := app.email.constructTemplate("", "
", app) if err != nil { respondBool(500, false, gc) return diff --git a/html/admin.html b/html/admin.html index a1b7295..fb5912d 100644 --- a/html/admin.html +++ b/html/admin.html @@ -156,18 +156,24 @@