Added a little note to the installation guide about setting up emails.

Alerts will be resynced whenever a WebSockets connection is re-established now.
Fixed client side overrides.
This commit is contained in:
Azareal 2019-03-05 15:53:02 +10:00
parent 836a148ee8
commit 93b292acc0
4 changed files with 18 additions and 3 deletions

View File

@ -153,7 +153,7 @@ func panelUserCheck(w http.ResponseWriter, r *http.Request, user *User) (header
var addPreScript = func(name string) { var addPreScript = func(name string) {
var tname string var tname string
if theme.OverridenMap != nil { if theme.OverridenMap != nil {
_, ok := theme.OverridenMap[name+".html"] _, ok := theme.OverridenMap[name]
if ok { if ok {
tname = "_" + theme.Name tname = "_" + theme.Name
} }
@ -240,11 +240,12 @@ func userCheck(w http.ResponseWriter, r *http.Request, user *User) (header *Head
if theme.OverridenMap != nil { if theme.OverridenMap != nil {
//fmt.Printf("name %+v\n", name) //fmt.Printf("name %+v\n", name)
//fmt.Printf("theme.OverridenMap %+v\n", theme.OverridenMap) //fmt.Printf("theme.OverridenMap %+v\n", theme.OverridenMap)
_, ok := theme.OverridenMap[name+".html"] _, ok := theme.OverridenMap[name]
if ok { if ok {
tname = "_" + theme.Name tname = "_" + theme.Name
} }
} }
//fmt.Printf("tname %+v\n", tname)
header.AddPreScriptAsync("template_" + name + tname + ".js") header.AddPreScriptAsync("template_" + name + tname + ".js")
} }
addPreScript("topics_topic") addPreScript("topics_topic")

View File

@ -99,6 +99,12 @@ You can get a free private key and certificate pair from Let's Encrypt or Cloudf
If you're using Nginx or something else as a reverse-proxy in-front of Gosora, then you will have to consult their documentation for advice on setting HTTPS. If you're using Nginx or something else as a reverse-proxy in-front of Gosora, then you will have to consult their documentation for advice on setting HTTPS.
For email, you will need a SMTP server (either provided by yourself or by a transactional mail provider who specialises in doing so)
You can setup it up via config.json with the Email setting and the ones starting with SMTP.
It is also possible to send emails without SMTP with the experimental sendmail plugin, however there is a high chance of your emails ending up in the user's spam folder, if it arrives at all.
# Advanced Installation # Advanced Installation
This section explains how to set things up without running the batch or shell files. For Windows, you will likely have to open up cmd.exe (the app called Command Prompt in Win10) to run these commands inside or something similar, while with Linux you would likely use the Terminal or console. This section explains how to set things up without running the batch or shell files. For Windows, you will likely have to open up cmd.exe (the app called Command Prompt in Win10) to run these commands inside or something similar, while with Linux you would likely use the Terminal or console.

View File

@ -186,7 +186,13 @@ function runWebSockets() {
conn.onclose = () => { conn.onclose = () => {
conn = false; conn = false;
console.log("The WebSockets connection was closed"); console.log("The WebSockets connection was closed");
setTimeout(() => runWebSockets(), 60 * 1000); setTimeout(() => {
var alertMenuList = document.getElementsByClassName("menu_alerts");
for(var i = 0; i < alertMenuList.length; i++) {
loadAlerts(alertMenuList[i]);
}
runWebSockets();
}, 60 * 1000);
} }
conn.onmessage = (event) => { conn.onmessage = (event) => {

View File

@ -135,6 +135,8 @@ func accountRoutes() *RouteGroup {
View("routes.AccountLoginMFAVerify", "/accounts/mfa_verify/"), View("routes.AccountLoginMFAVerify", "/accounts/mfa_verify/"),
AnonAction("routes.AccountLoginMFAVerifySubmit", "/accounts/mfa_verify/submit/"), // We have logic in here which filters out regular guests AnonAction("routes.AccountLoginMFAVerifySubmit", "/accounts/mfa_verify/submit/"), // We have logic in here which filters out regular guests
AnonAction("routes.AccountRegisterSubmit", "/accounts/create/submit/"), AnonAction("routes.AccountRegisterSubmit", "/accounts/create/submit/"),
//View("routes.AccountPasswordReset", "/accounts/password-reset/"),
//AnonAction("routes.AccountPasswordResetSubmit", "/accounts/password-reset/submit/"),
) )
} }