Build with Email enabled

This commit is contained in:
Donald Zou
2025-01-13 16:47:15 +08:00
parent 40463d9831
commit 5d84b61f18
48 changed files with 202 additions and 59 deletions
@@ -41,9 +41,9 @@ const checkEmailReady = async () => {
const sendTestEmail = async () => {
testing.value = true
await fetchPost("/api/email/send", {
receiver: testEmailReceiver.value,
subject: "WGDashboard Testing Email",
body: "Test 1, 2, 3! Hello World :)"
Receiver: testEmailReceiver.value,
Subject: "WGDashboard Testing Email",
Body: "Test 1, 2, 3! Hello World :)"
}, (res) => {
if (res.status){
store.newMessage("Server", "Test email sent successfully!", "success")
@@ -151,10 +151,12 @@ const sendTestEmail = async () => {
</div>
</div>
</form>
<hr>
<form
<hr v-if="emailIsReady">
<form
v-if="emailIsReady"
@submit="(e) => {e.preventDefault(); sendTestEmail()}"
class="input-group mb-3">
<input type="email" class="form-control rounded-start-3"
v-model="testEmailReceiver"
:disabled="testing"