Ver código fonte

customization

marek 1 mês atrás
pai
commit
6412a92a16

+ 2 - 0
.env.example

@@ -3,6 +3,7 @@
 # general
 
 BASE_URL="http://127.0.0.1:3000"
+APP_NAME="meteostanica"
 
 HOSTNAME="127.0.0.1"
 PORT="3000"
@@ -36,5 +37,6 @@ TURNSTILE_SECRET_KEY=""
 
 AUTH_EMAIL_SMTP_HOSTNAME=""
 AUTH_EMAIL_SMTP_PORT=""
+AUTH_EMAIL_SMTP_FROM=""
 AUTH_EMAIL_SMTP_USERNAME=""
 AUTH_EMAIL_SMTP_PASSWORD=""

+ 1 - 1
lang/en.js

@@ -46,7 +46,7 @@ export default {
 
         if you did not request this email, feel free to ignore it.
 
-        meteostanica
+        ${process.env.APP_NAME}
       `,
     },
   },

+ 1 - 1
lang/sk.js

@@ -50,7 +50,7 @@ export default {
 
         ak ste tento email nevyžiadali, môžete ho kľudne ignorovať.
 
-        meteostanica
+        ${process.env.APP_NAME}
       `,
     },
   },

+ 2 - 2
templates/en/email/auth.eta

@@ -43,7 +43,7 @@
     </style>
 </head>
 <body>
-    <h2>meteostanica</h2>
+    <h2><%= process.env.APP_NAME %></h2>
 
     <p>hi,</p>
 
@@ -58,7 +58,7 @@
 
     <footer>
         <p><small>if you did not request this email, you can safely ignore it.</small></p>
-        <p><small>meteostanica <%= new Date().getFullYear() %></small></p>
+        <p><small><%= process.env.APP_NAME %> <%= new Date().getFullYear() %></small></p>
     </footer>
 </body>
 </html>

+ 1 - 1
templates/en/layout.eta

@@ -3,7 +3,7 @@
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title><%= it.title ? `${it.title} — meteostanica` : "meteostanica" %></title>
+    <title><%= it.title ? `${it.title} — ${process.env.APP_NAME}` : process.env.APP_NAME %></title>
     <link rel="stylesheet" href="/assets/css/style.css">
 </head>
 <body>

+ 1 - 1
templates/en/panel/partials/navbar.eta

@@ -57,7 +57,7 @@
         <a role="button" href="/en"><%~ homeIcon %></a>
     </div>
 
-    <h2>meteostanica panel</h2>
+    <h2><%= process.env.APP_NAME %></h2>
 
     <div class="links">
         <a role="button" href="/en/panel"><%~ dashboardIcon %> dashboard</a>

+ 1 - 1
templates/en/partials/navbar.eta

@@ -38,7 +38,7 @@
         <a role="button" href="/"><%~ skFlag %></a>
     </div>
 
-    <h2>meteostanica</h2>
+    <h2><%= process.env.APP_NAME %></h2>
 
     <div class="links">
         <a role="button" href="/en"><%~ homeIcon %> home</a>

+ 2 - 2
templates/sk/email/auth.eta

@@ -43,7 +43,7 @@
     </style>
 </head>
 <body>
-    <h2>meteostanica</h2>
+    <h2><%= process.env.APP_NAME %></h2>
 
     <p>dobrý deň,</p>
 
@@ -58,7 +58,7 @@
 
     <footer>
         <p><small>ak ste si tento email nevyžiadali, môžete ho kľudne ignorovať.</small></p>
-        <p><small>meteostanica <%= new Date().getFullYear() %></small></p>
+        <p><small><%= process.env.APP_NAME %> <%= new Date().getFullYear() %></small></p>
     </footer>
 </body>
 </html>

+ 1 - 1
templates/sk/layout.eta

@@ -3,7 +3,7 @@
 <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title><%= it.title ? `${it.title} — meteostanica` : "meteostanica" %></title>
+    <title><%= it.title ? `${it.title} — ${process.env.APP_NAME}` : process.env.APP_NAME %></title>
     <link rel="stylesheet" href="/assets/css/style.css">
 </head>
 <body>

+ 1 - 1
templates/sk/panel/partials/navbar.eta

@@ -54,7 +54,7 @@
         <a role="button" href="/"><%~ homeIcon %></a>
     </div>
 
-    <h2>meteostanica panel</h2>
+    <h2><%= process.env.APP_NAME %></h2>
 
     <div class="links">
         <a role="button" href="/panel"><%~ dashboardIcon %> dashboard</a>

+ 1 - 1
templates/sk/partials/navbar.eta

@@ -35,7 +35,7 @@
         <a role="button" href="/en"><%~ usFlag %></a>
     </div>
 
-    <h2>meteostanica</h2>
+    <h2><%= process.env.APP_NAME %></h2>
 
     <div class="links">
         <a role="button" href="/"><%~ homeIcon %> domov</a>

+ 1 - 1
utils/auth.js

@@ -55,7 +55,7 @@ export default class Auth {
 
     static async sendVerification(email, subject, text, html) {
         return await transporter.sendMail({
-            from: '"auth — meteostanica" <auth@meteostanica.com>',
+            from: process.env.AUTH_EMAIL_SMTP_FROM,
             to: email,
             subject,
             text, // Plain-text version of the message