Implement email template generation
Variables are surrounded by {}, and initial (default) templates are
generated on demand from the plaintext version of emails. The custom
emails are intended to only be used if the user actually changes them,
as they lose the features of the default ones, such as tables.
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
<p>{{ .clickBelow }}</p>
|
||||
<p>{{ .ifItWasNotYou }}</p>
|
||||
</mj-text>
|
||||
<mj-button mj-class="blue bold" href="{{ .urlVal }}">{{ .confirmEmail }}</mj-button>
|
||||
<mj-button mj-class="blue bold" href="{{ .confirmationURL }}">{{ .confirmEmail }}</mj-button>
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
<mj-section mj-class="bg2">
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
{{ .clickBelow }}
|
||||
{{ .ifItWasNotYou }}
|
||||
|
||||
{{ .urlVal }}
|
||||
{{ .confirmationURL }}
|
||||
|
||||
{{ .message }}
|
||||
|
||||
+6
-6
@@ -64,14 +64,14 @@
|
||||
</mj-text>
|
||||
<mj-table mj-class="text" container-background-color="#242424">
|
||||
<tr style="text-align: left;">
|
||||
<th>{{ .name }}</th>
|
||||
<th>{{ .address }}</th>
|
||||
<th>{{ .time }}</th>
|
||||
<th>{{ .nameString }}</th>
|
||||
<th>{{ .addressString }}</th>
|
||||
<th>{{ .timeString }}</th>
|
||||
</tr>
|
||||
<tr style="font-style: italic; text-align: left; color: rgb(153,153,153);">
|
||||
<th>{{ .nameVal }}</th>
|
||||
<th>{{ .addressVal }}</th>
|
||||
<th>{{ .timeVal }}</th>
|
||||
<th>{{ .name }}</th>
|
||||
<th>{{ .address }}</th>
|
||||
<th>{{ .time }}</th>
|
||||
</mj-table>
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{{ .aUserWasCreated }}
|
||||
|
||||
{{ .name }}: {{ .nameVal }}
|
||||
{{ .address }}: {{ .addressVal }}
|
||||
{{ .time }}: {{ .timeVal }}
|
||||
{{ .nameString }}: {{ .name }}
|
||||
{{ .addressString }}: {{ .address }}
|
||||
{{ .timeString }}: {{ .time }}
|
||||
|
||||
{{ .notificationNotice }}
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@
|
||||
<mj-column>
|
||||
<mj-text mj-class="text" font-size="16px" font-family="Noto Sans, Helvetica, Arial, sans-serif">
|
||||
<h3>{{ .yourAccountWasDeleted }}</h3>
|
||||
<p>{{ .reason }}: <i>{{ .reasonVal }}</i></p>
|
||||
<p>{{ .reasonString }}: <i>{{ .reason }}</i></p>
|
||||
</mj-text>
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
{{ .yourAccountWasDeleted }}
|
||||
{{ .reason }}: {{ .reasonVal }}
|
||||
{{ .reasonString }}: {{ .reason }}
|
||||
|
||||
{{ .message }}
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@
|
||||
<p>{{ .codeExpiry }}</p>
|
||||
<p>{{ .ifItWasNotYou }}</p>
|
||||
</mj-text>
|
||||
<mj-button mj-class="blue bold"><mj-raw>{{ .pinVal }}</mj-raw></mj-button>
|
||||
<mj-button mj-class="blue bold"><mj-raw>{{ .pin }}</mj-raw></mj-button>
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
<mj-section mj-class="bg2">
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@
|
||||
{{ .codeExpiry }}
|
||||
{{ .ifItWasNotYou }}
|
||||
|
||||
{{ .pin }}: {{ .pinVal }}
|
||||
{{ .pinString }}: {{ .pin }}
|
||||
|
||||
{{ .message }}
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<p>{{ .toJoin }}</p>
|
||||
<p>{{ .inviteExpiry }}</p>
|
||||
</mj-text>
|
||||
<mj-button mj-class="blue bold" href="{{ .invite_link }}">{{ .linkButton }}</mj-button>
|
||||
<mj-button mj-class="blue bold" href="{{ .inviteURL }}">{{ .linkButton }}</mj-button>
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
<mj-section mj-class="bg2">
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
{{ .toJoin }}
|
||||
{{ .inviteExpiry }}
|
||||
|
||||
{{ .invite_link }}
|
||||
{{ .inviteURL }}
|
||||
|
||||
{{ .message }}
|
||||
|
||||
+2
-2
@@ -62,8 +62,8 @@
|
||||
<mj-text mj-class="text" font-size="16px" font-family="Noto Sans, Helvetica, Arial, sans-serif">
|
||||
<h3>{{ .welcome }}</h3>
|
||||
<p>{{ .youCanLoginWith }}:</p>
|
||||
{{ .jellyfinURL }}: <a href="{{ .jellyfinURLVal }}">{{ .jellyfinURLVal }}</a>
|
||||
<p>{{ .username }}: <i>{{ .usernameVal }}</i></p>
|
||||
{{ .jellyfinURLString }}: <a href="{{ .jellyfinURLVal }}">{{ .jellyfinURL }}</a>
|
||||
<p>{{ .usernameString }}: <i>{{ .username }}</i></p>
|
||||
</mj-text>
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
|
||||
{{ .youCanLoginWith }}:
|
||||
|
||||
{{ .jellyfinURL }}: {{ .jellyfinURLVal }}
|
||||
{{ .username }}: {{ .usernameVal }}
|
||||
{{ .jellyfinURLString }}: {{ .jellyfinURL }}
|
||||
{{ .usernameString }}: {{ .username }}
|
||||
|
||||
|
||||
{{ .message }}
|
||||
|
||||
Reference in New Issue
Block a user